qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 5/5] RFC: distinguish warm reset from cold r


From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH 5/5] RFC: distinguish warm reset from cold reset.
Date: Mon, 30 Aug 2010 08:03:19 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6

On 08/30/2010 03:50 AM, Paolo Bonzini wrote:
On 08/30/2010 09:49 AM, Isaku Yamahata wrote:
+/* those two functions are obsoleted by cold/warm reset API. */
[qemu_register_reset/qemu_unregister_reset]

Are they?

Yes, but introduce more reset functions isn't the right approach.

Reset should be a method of the device tree, not a stand alone function.

Regards,

Anthony Liguori


They have a _lot_ of callers and most of the time you do not really care about cold vs. warm reset. So, I think either you define a new API where you can request cold reset/warm reset/both, or qemu_register_reset is here to stay forever.

In general, I don't like the duplication you introduce between cold reset, warm reset, shutdown, powerdown, etc. Maybe you can introduce a new "VMEvent" abstraction with functions like "request", "is requested", "register handler"?

It could also be interesting to convert everything to the Notifier API, if someone wants to play with Coccinelle...

Paolo





reply via email to

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