All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/hvm: determine shared info format earlier
@ 2007-05-14 15:23 Jan Beulich
  2007-05-15  6:59 ` Keir Fraser
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Beulich @ 2007-05-14 15:23 UTC (permalink / raw)
  To: xen-devel

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@novell.com>

Index: 2007-05-14/xen/arch/x86/hvm/hvm.c
===================================================================
--- 2007-05-14.orig/xen/arch/x86/hvm/hvm.c	2007-05-14 08:28:38.000000000 +0200
+++ 2007-05-14/xen/arch/x86/hvm/hvm.c	2007-05-14 13:47:02.000000000 +0200
@@ -824,6 +824,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);
 }
 
@@ -1053,13 +1062,6 @@ 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);
                 break;
             }
             d->arch.hvm_domain.params[a.index] = a.value;

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-06-14 18:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-14 15:23 [PATCH] x86/hvm: determine shared info format earlier Jan Beulich
2007-05-15  6:59 ` Keir Fraser
2007-05-15  7:13   ` Jan Beulich
2007-05-15  7:16     ` Keir Fraser
2007-05-15  7:24       ` Jan Beulich
2007-05-18 19:20   ` [PATCH] calling zap_low_mappings breaks xen boot on the es7000 Subrahmanian, Raj
2007-05-19  8:19     ` Keir Fraser
2007-05-23 21:16       ` Subrahmanian, Raj
2007-05-24  9:04         ` Keir Fraser
2007-05-25 12:24           ` Subrahmanian, Raj
2007-05-25 12:39             ` Keir Fraser
2007-06-14 17:58           ` Subrahmanian, Raj
2007-06-14 18:12             ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.