ia64/xen-unstable

changeset 14189:d5c4d43da89e

Change compat-check in set_vcpucontext again. Give caller leeway for
HVM guests only.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Mar 01 10:01:51 2007 +0000 (2007-03-01)
parents b703aa29424f
children 44048a3f7caa
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Thu Mar 01 09:52:40 2007 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Thu Mar 01 10:01:51 2007 +0000
     1.3 @@ -501,9 +501,12 @@ int arch_set_info_guest(
     1.4      unsigned long flags;
     1.5      int i, rc = 0, compat;
     1.6  
     1.7 -    /* The context is a compat-mode one if the target domain is compat-mode;
     1.8 -     * we expect the tools to DTRT even in compat-mode callers. */
     1.9 -    compat = IS_COMPAT(d);
    1.10 +    /*
    1.11 +     * HVM domain builder always builds caller-bitsize vcpu context.
    1.12 +     * The PV builder is smarter and builds the appropriate type of context for
    1.13 +     * the target domain. So the compat check here differs in the two cases.
    1.14 +     */
    1.15 +    compat = is_hvm_domain(d) ? IS_COMPAT(current->domain) : IS_COMPAT(d);
    1.16  
    1.17  #ifdef CONFIG_COMPAT
    1.18  #define c(fld) (compat ? (c.cmp->fld) : (c.nat->fld))