From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 0/4] HVM Virtual S3 Date: Wed, 16 May 2007 23:33:51 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Yu, Ke" , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 16/5/07 22:59, "Keir Fraser" wrote: >> The main idea is: >> - emulate ACPI PM1A control resiger in QEMU to capture guest S3 request >> - when QEMU capture guest S3 request, it call hypercall to trap to Xen > > So why emulate this register in QEMU at all, rather than directly in Xen? > Xen already knows the address of the pm1a block of ports because it emulates > the pmtimer. Oh, I see there is device state to be reset in QEMU. Emulating the port access in QEMU makes sense then, but I wonder if rather than adding an extra hypercall command we could emulate it in both Xen and QEMU: Xen emulates the instruction, resets state and triggers domain shutdown, then passes the port access up to QEMU so it does its thing also. We do this emulate-in-both for other things already (e.g., the CMOS index register I believe). -- Keir