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

[Xen-devel] [PATCH, resubmit] x86/hvm: determine shared info format earl

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH, resubmit] x86/hvm: determine shared info format earlier
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 19 Jun 2007 11:40:41 +0200
Delivery-date: Tue, 19 Jun 2007 02:38:06 -0700
Envelope-to: www-data@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Latch guest shared info format when hypercall page is being set up rather
than during an arbitrarily selected hypercall.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-06-18/xen/arch/x86/hvm/hvm.c
===================================================================
--- 2007-06-18.orig/xen/arch/x86/hvm/hvm.c      2007-06-18 08:34:29.000000000 
+0200
+++ 2007-06-18/xen/arch/x86/hvm/hvm.c   2007-06-18 10:22:58.000000000 +0200
@@ -836,6 +836,15 @@ void hvm_update_guest_cr3(struct vcpu *v
 void hvm_hypercall_page_initialise(struct domain *d,
                                    void *hypercall_page)
 {
+#ifdef __x86_64__
+    /*
+     * Since this operation is one of the very first executed by PV drivers
+     * on initialisation or after save/restore, it is a sensible point at
+     * which to sample the execution mode of the guest and latch 32- or 64-
+     * bit format for shared state.
+     */
+    d->arch.has_32bit_shinfo = (hvm_guest_x86_mode(current) != 8);
+#endif
     hvm_funcs.init_hypercall_page(d, hypercall_page);
 }
 
@@ -1066,10 +1075,8 @@ long do_hvm_op(unsigned long op, XEN_GUE
             case HVM_PARAM_CALLBACK_IRQ:
                 hvm_set_callback_via(d, a.value);
                 /*
-                 * Since this operation is one of the very first executed
-                 * by PV drivers on initialisation or after save/restore, it
-                 * is a sensible point at which to sample the execution mode of
-                 * the guest and latch 32- or 64-bit format for shared state.
+                 * For compatibility with older PV drivers, also latch guest
+                 * execution mode here.
                  */
                 d->arch.has_32bit_shinfo = (hvm_guest_x86_mode(current) != 8);
                 break;




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

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