# HG changeset 15173 patch # User Ian Campbell # Node ID 88e41a91301c109b99443db3a4bf3c8e6bbad042 # Parent f2d2d5f18543de04191c1f5e22471e74d8767147 Correct 32on64 handling of VCPUOP_register_runstate_memory_area. We were copying too many bytes from the guest so the test for area.addr.h.c != area.addr.p was failing. Added a WARN_ON to the kernel to catch this case. It would be a BUG_ON but this would break the new kernel on older hypervisors and the only real problem is that stolen time is not updated, which we can live with. Signed-off-by: Ian Campbell Index: 2007-05-14/xen/arch/x86/x86_64/domain.c =================================================================== --- 2007-05-14.orig/xen/arch/x86/x86_64/domain.c 2007-04-23 10:01:42.000000000 +0200 +++ 2007-05-14/xen/arch/x86/x86_64/domain.c 2007-07-02 10:47:40.000000000 +0200 @@ -22,8 +22,10 @@ arch_compat_vcpu_op( struct compat_vcpu_register_runstate_memory_area area; struct compat_vcpu_runstate_info info; + area.addr.p = 0; + rc = -EFAULT; - if ( copy_from_guest(&area, arg, 1) ) + if ( copy_from_guest(&area.addr.h, arg, 1) ) break; if ( area.addr.h.c != area.addr.p ||