So that the size of the structure is the same on 32 and 64bit.

Signed-off-by: Roger Pau Monné <roger....@citrix.com>
---
Cc: Ian Campbell <ian.campb...@citrix.com>
Cc: Ian Jackson <ian.jack...@eu.citrix.com>
Cc: Jan Beulich <jbeul...@suse.com>
Cc: Andrew Cooper <andrew.coop...@citrix.com>
---
This should fix the issues seen on OSSTest when using a 32bit toolstack on
a 64bit hypervisor to create a Windows 7 HVM guest.
---
Changes since v1:
 - Instead of adding padding, change the flags field to be a uint64_t.
---
 xen/arch/x86/hvm/hvm.c                 | 2 +-
 xen/include/public/arch-x86/hvm/save.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a99edc2..1364d16 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2017,7 +2017,7 @@ static int hvm_load_cpu_ctxt(struct domain *d, 
hvm_domain_context_t *h)
 
     if ( (ctxt.flags & ~XEN_X86_FPU_INITIALISED) != 0 )
     {
-        gprintk(XENLOG_ERR, "bad flags value in CPU context: %#x\n",
+        gprintk(XENLOG_ERR, "bad flags value in CPU context: %#lx\n",
                 ctxt.flags);
         return -EINVAL;
     }
diff --git a/xen/include/public/arch-x86/hvm/save.h 
b/xen/include/public/arch-x86/hvm/save.h
index b6b1bf8..3fac45b 100644
--- a/xen/include/public/arch-x86/hvm/save.h
+++ b/xen/include/public/arch-x86/hvm/save.h
@@ -161,8 +161,8 @@ struct hvm_hw_cpu {
     uint32_t error_code;
 
 #define _XEN_X86_FPU_INITIALISED        0
-#define XEN_X86_FPU_INITIALISED         (1U<<_XEN_X86_FPU_INITIALISED)
-    uint32_t flags;
+#define XEN_X86_FPU_INITIALISED         (1UL<<_XEN_X86_FPU_INITIALISED)
+    uint64_t flags;
 };
 
 struct hvm_hw_cpu_compat {
-- 
1.9.5 (Apple Git-50.3)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to