From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOXWd-00012J-2R for qemu-devel@nongnu.org; Wed, 08 Jul 2009 09:49:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOXWY-0000wX-6S for qemu-devel@nongnu.org; Wed, 08 Jul 2009 09:49:30 -0400 Received: from [199.232.76.173] (port=52213 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOXWX-0000wF-UH for qemu-devel@nongnu.org; Wed, 08 Jul 2009 09:49:25 -0400 Received: from mx2.redhat.com ([66.187.237.31]:48115) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOXWX-0004DA-A6 for qemu-devel@nongnu.org; Wed, 08 Jul 2009 09:49:25 -0400 Date: Wed, 8 Jul 2009 16:49:22 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH][RESEND] Add monitor command for system_reboot Message-ID: <20090708134922.GQ28046@redhat.com> References: <20090707192631.GQ11590@us.ibm.com> <20090708075601.GJ28046@redhat.com> <4A549990.2060205@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A549990.2060205@us.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Ryan Harper , qemu-devel@nongnu.org On Wed, Jul 08, 2009 at 08:05:20AM -0500, Anthony Liguori wrote: > Gleb Natapov wrote: >> On Tue, Jul 07, 2009 at 02:26:31PM -0500, Ryan Harper wrote: >> >>> Add a new monitor command (system_reboot) for a soft reboot which uses >>> system_powerdown to trigger ACPI shutdown in the guest and once shutdown >>> is complete, trigger a reset instead of exiting qemu. >>> >>> Depends on commit a6d6552426dcbf726e5549f08b70c9318d6be14b which enabled >>> ACPI power button support. >>> >>> V2: >>> -added reset handler to lower the reboot flag on reset. >>> >> OS is free to ignore ACPI shutdown request and in this case >> reboot_requested will not be reset. On the next user initiated >> guest power down qemu will reboot instead of exit. >> > > Indeed. This is what has kept me from applying this but I just can't > think of any better solution. > > Any ideas? > > The drive behind implementing this feature is so that we can implement a > proper virDomainReboot in libvirt. > I don't know what is the definition of virDomainReboot is, but what this patch is trying to do is to change a guest OS behaviour from the host. Guest OSes can control their behaviour on ACPI shutdown event by themselves (on Windows you can configure what power button action should be, on Linux I don't know I never power it down), so why would we want to override this? -- Gleb.