[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Change compat-check in set_vcpucontext again. Give caller leeway for



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172743311 0
# Node ID d5c4d43da89e262dd42c1386dfdce0c1352d53ae
# Parent  b703aa29424f07fb0800753af5fc9c0347fd7613
Change compat-check in set_vcpucontext again. Give caller leeway for
HVM guests only.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domain.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r b703aa29424f -r d5c4d43da89e xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Thu Mar 01 09:52:40 2007 +0000
+++ b/xen/arch/x86/domain.c     Thu Mar 01 10:01:51 2007 +0000
@@ -501,9 +501,12 @@ int arch_set_info_guest(
     unsigned long flags;
     int i, rc = 0, compat;
 
-    /* The context is a compat-mode one if the target domain is compat-mode;
-     * we expect the tools to DTRT even in compat-mode callers. */
-    compat = IS_COMPAT(d);
+    /*
+     * HVM domain builder always builds caller-bitsize vcpu context.
+     * The PV builder is smarter and builds the appropriate type of context for
+     * the target domain. So the compat check here differs in the two cases.
+     */
+    compat = is_hvm_domain(d) ? IS_COMPAT(current->domain) : IS_COMPAT(d);
 
 #ifdef CONFIG_COMPAT
 #define c(fld) (compat ? (c.cmp->fld) : (c.nat->fld))

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.