]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86/HVM: add padding to struct hvm_hw_cpu
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 19 Jan 2016 15:08:39 +0000 (16:08 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 Jan 2016 15:08:39 +0000 (16:08 +0100)
So that the size of the structure is the same on 32 and 64bit.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c
xen/include/public/arch-x86/hvm/save.h

index e0cb82d2a39de0402bfcad74de1e3e2963a62310..8f98956e306b8240739dfae547c0db4fd41bfe50 100644 (file)
@@ -1987,6 +1987,9 @@ static int hvm_load_cpu_ctxt(struct domain *d, hvm_domain_context_t *h)
     if ( hvm_load_entry_zeroextend(CPU, h, &ctxt) != 0 )
         return -EINVAL;
 
+    if ( ctxt.pad0 != 0 )
+        return -EINVAL;
+
     /* Sanity check some control registers. */
     if ( (ctxt.cr0 & HVM_CR0_GUEST_RESERVED_BITS) ||
          !(ctxt.cr0 & X86_CR0_ET) ||
index b6b1bf894b581f07d4d5566e7aa6c84c7a1b09f1..68627201378af252bc9f402baf6bd8d9669f08cc 100644 (file)
@@ -163,6 +163,7 @@ struct hvm_hw_cpu {
 #define _XEN_X86_FPU_INITIALISED        0
 #define XEN_X86_FPU_INITIALISED         (1U<<_XEN_X86_FPU_INITIALISED)
     uint32_t flags;
+    uint32_t pad0;
 };
 
 struct hvm_hw_cpu_compat {