ia64/xen-unstable

changeset 14920:74b712492dba

hvm: Choose correct shared_info format for 32-bit PV drivers on 64-bit Xen.
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Tue Apr 24 22:00:45 2007 +0100 (2007-04-24)
parents b43bd71ee65b
children 3b8bf61f2ad6
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Tue Apr 24 21:50:00 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Tue Apr 24 22:00:45 2007 +0100
     1.3 @@ -1049,6 +1049,15 @@ long do_hvm_op(unsigned long op, XEN_GUE
     1.4                  break;
     1.5              case HVM_PARAM_CALLBACK_IRQ:
     1.6                  hvm_set_callback_via(d, a.value);
     1.7 +#if defined(__x86_64__)
     1.8 +                /*
     1.9 +                 * Since this operation is one of the very first executed
    1.10 +                 * by PV drivers on initialisation or after save/restore, it
    1.11 +                 * is a sensible point at which to sample the execution mode of
    1.12 +                 * the guest and latch 32- or 64-bit format for shared state.
    1.13 +                 */
    1.14 +                d->is_compat = (hvm_guest_x86_mode(current) == 4);
    1.15 +#endif
    1.16                  break;
    1.17              }
    1.18              d->arch.hvm_domain.params[a.index] = a.value;