qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/6] hw/arm/boot: register cpu reset handlers if


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 4/6] hw/arm/boot: register cpu reset handlers if using -bios
Date: Wed, 17 Sep 2014 18:40:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

Am 17.09.2014 um 18:17 schrieb Peter Maydell:
> On 17 September 2014 08:55, Andreas Färber <address@hidden> wrote:
>> IIRC each machine is responsible for registering a reset hook that calls
>> - in most cases - cpu_reset().
>>
>> The thing to look out for here is, does any machine already register a
>> reset hook and would reset twice with this patch?
> 
> Probably not -- any such double-reset would already be happening
> if the user passed -kernel.
> 
> So in that sense this patch won't break things, but I wasn't
> sure if it's the right direction to go -- should we be fixing
> all the board and/or SoC models to do the CPU reset instead?
> 
> QOM devices get reset when their bus gets reset, right?
> (so everything on a bus gets reset eventually as part of
> the process that starts when the top level sysbus gets reset).

We avoided that by not using DeviceClass::reset but CPUClass::reset.
It's a question of assuring appropriate reset ordering between CPU and
devices. PowerPC needed a special reset order via hook in (what is now)
MachineClass.

So while I agree that CPU reset registration is not ideal and needs
changing, I am not convinced that we can generally make the change and
hope for the best. I wouldn't mind an incremental transition though,
with arm taking the first step - still leaves the question of exact
direction. If you look at x86, you will find that despite my protest
against this inconsistency, the reset hook registration was moved into
CPU code but none of the other targets changed alongside.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]