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/
Home Products Support Community News


RE: [Xen-devel] resume of HVM guest without PV drivers

To: "Jan Beulich" <JBeulich@xxxxxxxxxx>, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] resume of HVM guest without PV drivers
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Fri, 7 Aug 2009 21:34:20 +1000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 07 Aug 2009 04:34:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A7C2AB6020000780000EA9E@xxxxxxxxxxxxxxxxxx>
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: <4A7C1FAC020000780000EA4F@xxxxxxxxxxxxxxxxxx><C6A1C620.119CE%keir.fraser@xxxxxxxxxxxxx> <4A7C2AB6020000780000EA9E@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoXUY5ocDFoNq9eQGiHo5ZFlqLptgAAN7qg
Thread-topic: [Xen-devel] resume of HVM guest without PV drivers
> >>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 07.08.09 12:53 >>>
> >On 07/08/2009 11:35, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
> >
> >> Besides that, doing hypercalls here also requires that I'll be able
to re-
> >> setup the hypercall (or the hypercall page) in case I got migrated
> >> between VMX and SVM. While this could certainly be done in a fixup
> >> handler invoked from #UD (a little tricky for the hypercall page
case), I
> >> find it preferable to synchronously fix things up beforehand.
> >
> >Won't you always have a race between checking for migration and then
> >entering the cpu-specific hypercall stub?
> Indeed. However, the fixup handler in this case can be trivial - it
> needs to restart the whole operation (including the
> check).

What if it happens this way:
if (just_been_resumed)
/* suspend/resume happens here */

suddenly do_hypercall() jumps into empty space.

The chance of it happening isn't even that small if there is a lot of
spinning going on.

You could resolve it by having an MSR or something that you could write
to to tell Xen you are in a critical section and it can't do a suspend
right now, but suddenly you're doing more work than if you'd just put a
xenbus driver in in the first place.


Xen-devel mailing list