All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] x86/hvm: determine shared info format earlier
Date: Mon, 14 May 2007 17:23:00 +0200	[thread overview]
Message-ID: <46489AF4.76E4.0078.0@novell.com> (raw)

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;

             reply	other threads:[~2007-05-14 15:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14 15:23 Jan Beulich [this message]
2007-05-15  6:59 ` [PATCH] x86/hvm: determine shared info format earlier 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46489AF4.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.