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-changelog

[Xen-changelog] [xen-unstable] x86/hvm: determine shared info format ear

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86/hvm: determine shared info format earlier.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Jun 2007 11:22:56 -0700
Delivery-date: Wed, 20 Jun 2007 11:21:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1182348219 -3600
# Node ID 2805246f6caca3f3e7ea9b4f0574916de400f211
# Parent  3187ffc5272cc1169e00423d9946abcc89a454d0
x86/hvm: determine shared info format earlier.

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>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff -r 3187ffc5272c -r 2805246f6cac xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Wed Jun 20 14:57:49 2007 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Wed Jun 20 15:03:39 2007 +0100
@@ -831,11 +831,24 @@ void hvm_update_guest_cr3(struct vcpu *v
     hvm_funcs.update_guest_cr3(v);
 }
 
+static void hvm_latch_shinfo_size(struct domain *d)
+{
+    /*
+     * Called from operations which are among the very first executed by
+     * PV drivers on initialisation or after save/restore. These are sensible
+     * points at which to sample the execution mode of the guest and latch
+     * 32- or 64-bit format for shared state.
+     */
+    if ( current->domain == d )
+        d->arch.has_32bit_shinfo = (hvm_guest_x86_mode(current) != 8);
+}
+
 /* Initialise a hypercall transfer page for a VMX domain using
    paravirtualised drivers. */
 void hvm_hypercall_page_initialise(struct domain *d,
                                    void *hypercall_page)
 {
+    hvm_latch_shinfo_size(d);
     hvm_funcs.init_hypercall_page(d, hypercall_page);
 }
 
@@ -1065,13 +1078,7 @@ long do_hvm_op(unsigned long op, XEN_GUE
                 break;
             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.
-                 */
-                d->arch.has_32bit_shinfo = (hvm_guest_x86_mode(current) != 8);
+                hvm_latch_shinfo_size(d);
                 break;
             }
             d->arch.hvm_domain.params[a.index] = a.value;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86/hvm: determine shared info format earlier., Xen patchbot-unstable <=