qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.4 1/2] core: reset handler for bus-less de


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH for-2.4 1/2] core: reset handler for bus-less devices
Date: Mon, 13 Jul 2015 18:06:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Am 13.07.2015 um 16:37 schrieb Cornelia Huck:
> On Mon, 13 Jul 2015 16:20:09 +0200
> Andreas Färber <address@hidden> wrote:
> 
>> Am 13.07.2015 um 16:11 schrieb Cornelia Huck:
>>> On Mon, 13 Jul 2015 14:22:05 +0200
>>> Christian Borntraeger <address@hidden> wrote:
>>>
>>> Any objections against taking this through s390-next? I'd like to fix
>>> diag288 reset (+ that annoying migration regession) for 2.4-rc1 and
>>> send a pull request soon.
>>
>> Which device does this fix (only this diag88?), and is it really not
>> possible to register a reset handler where it's being created?
> 
> The original patch did this
> (<address@hidden>). Peter
> C. suspected NAND may also be affected
> (<address@hidden>).

Found it. So the problem *is* different from what I understood! It's not
directly attached to /machine by s390x code, but rather instantiated via
-device by the user.

Peter C. suggested you to do it in realize, which affects all devices.

The solution would be to instead either do the reset registration in
qdev-monitor.c, where it's specific to devices that do not have a bus
and on /machine/peripheral or /machine/periph-anon are not managed by a
parent, or to add a further check here in realized. Right now I can only
think of a hot-plug flag...? Not sure about unrealizing in the
qdev-monitor case, but I think we can ignore that in this case?

>> Peter C.'s theory does not match practice for x86, and this patch will
>> lead to bus-less devices that are properly being reset by their parent
>> getting reset twice, potentially causing issues due to qemu_irqs. I'd
>> rather avoid that.
> 
> Introducing new bugs is not something I want to do. Are double resets a
> problem in practice, though?

Not the double part, the relative ordering.

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)



reply via email to

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