Skip to content

Commit e3d2697

Browse files
Jeremy Fitzhardingejsgf
authored andcommitted
xen: fix incorrect vcpu_register_vcpu_info hypercall argument
The kernel's copy of struct vcpu_register_vcpu_info was out of date, at best causing the hypercall to fail and the guest kernel to fall back to the old mechanism, or worse, causing random memory corruption. [ Stable folks: applies to 2.6.23 ] Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Stable Kernel <stable@kernel.org> Cc: Morten =?utf-8?q?B=C3=B8geskov?= <xen-users@morten.bogeskov.dk> Cc: Mark Williamson <mark.williamson@cl.cam.ac.uk>
1 parent fb1d840 commit e3d2697

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎arch/x86/xen/enlighten.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static void __init xen_vcpu_setup(int cpu)
113113
info.mfn = virt_to_mfn(vcpup);
114114
info.offset = offset_in_page(vcpup);
115115

116-
printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %x, offset %d\n",
116+
printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %llx, offset %d\n",
117117
cpu, vcpup, info.mfn, info.offset);
118118

119119
/* Check to see if the hypervisor will put the vcpu_info

‎include/xen/interface/vcpu.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ struct vcpu_set_singleshot_timer {
160160
*/
161161
#define VCPUOP_register_vcpu_info 10 /* arg == struct vcpu_info */
162162
struct vcpu_register_vcpu_info {
163-
uint32_t mfn; /* mfn of page to place vcpu_info */
164-
uint32_t offset; /* offset within page */
163+
uint64_t mfn; /* mfn of page to place vcpu_info */
164+
uint32_t offset; /* offset within page */
165+
uint32_t rsvd; /* unused */
165166
};
166167

167168
#endif /* __XEN_PUBLIC_VCPU_H__ */

0 commit comments

Comments
 (0)