[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/hvm: determine shared info format earlier.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |