WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: Paravirtualizing bits of acpi access

To: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
Subject: Re: [Xen-devel] Re: Paravirtualizing bits of acpi access
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 24 Mar 2009 10:28:18 -0700
Cc: "Brown, Len" <len.brown@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, "Rafael J. Wysocki" <rjw@xxxxxxx>, "linux-acpi@xxxxxxxxxxxxxxx" <linux-acpi@xxxxxxxxxxxxxxx>, "Cihula, Joseph" <joseph.cihula@xxxxxxxxx>
Delivery-date: Tue, 24 Mar 2009 10:28:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200903241045.19194.bjorn.helgaas@xxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <49C484B7.20100@xxxxxxxx> <0A882F4D99BBF6449D58E61AAFD7EDD60E5E877B@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <49C88647.8080404@xxxxxxxx> <200903241045.19194.bjorn.helgaas@xxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
Bjorn Helgaas wrote:
On Tuesday 24 March 2009 01:05:43 am Jeremy Fitzhardinge wrote:
Tian, Kevin wrote:
OK, then it's safe to avoid that change. I had thought that dom0's 0-1M
is identity-mapped to machine 0-1M... :-)
No, only the ISA 640k-1M region.

I'm speaking out of turn here because I don't work on Xen or
suspend/resume.  However, I do try to clean up random bits of
ACPI, and I have to say this patch looks like a pain in the
maintenance department.  Having tests for a specific hypervisor
is unpleasant.  We don't want to end up with tests for a collection
of hypervisors.

I agree. If we start to see other hypervisor-specific changes in this area, we'd need to rethink this approach. But I'm not inclined to add a layer of infrastructure to just deal with Xen. (IOW, abstract only when there's something to abstract.)

  It looks like suspend becomes a weird hybrid of
ACPI and Xen, which makes it harder to reason about future suspend
changes.  And all this discussion about 640k-1M and dom0 identity
mapping and "there's no special effort to remap it" and whether
there are conflicts makes me nervous.  There's no way all those
assumptions can be remembered or verified five years down the road.

Well, I think Kevin was over-complicating things in his own mind. The upshot is that the normal "running on bare metal" code can do its normal thing, and if we happen to be running under Xen we can make it a no-op. In other words, the acpi developers don't really need to worry about the "running under Xen case", for the most part.

The two changes this patch makes are, unfortunately, unavoidable:

  1. Turn the final "enter sleep" into a hypercall, so that Xen can do
     all the low-level context save/restore.  The normal baremetal case
     is still localized in acpica/hwsleep.c, but it (may) make an
     excursion into arch code to see if it should do something else, and
  2. Directly enter the sleep state, rather than save cpu context
     (which Xen does)

Though, come to think of it, perhaps there's no harm in letting the kernel do its own state-saving. I'll check.

   J

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>