Skip to contentSkip to conversation

x86-64: fix HYPERVISOR_update_descriptor()

PATCH In review Jan Beulich 2 participants 2 messages Dec 16, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86-64: fix HYPERVISOR_update_descriptor()

---
 arch/x86/include/asm/xen/hypercall.h |    2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/xen/hypercall.h +2 -0
@@ -290,6 +290,8 @@ HYPERVISOR_get_debugreg(int reg)
 static inline int
 HYPERVISOR_update_descriptor(u64 ma, u64 desc)
 {
+	if (sizeof(u64) == sizeof(long))
+		return _hypercall2(int, update_descriptor, ma, desc);
 	return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
 }
 
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Jan Beulich
Quoted 19 lines
---
 arch/x86/include/asm/xen/hypercall.h |    2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/xen/hypercall.h +2 -0
@@ -290,6 +290,8 @@ HYPERVISOR_get_debugreg(int reg)
 static inline int
 HYPERVISOR_update_descriptor(u64 ma, u64 desc)
 {
+	if (sizeof(u64) == sizeof(long))
+		return _hypercall2(int, update_descriptor, ma, desc);
 	return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
 }