xen64: implement 64-bit update_descriptor
authorJeremy Fitzhardinge <jeremy@goop.org>
Tue, 8 Jul 2008 22:07:11 +0000 (15:07 -0700)
committerIngo Molnar <mingo@elte.hu>
Wed, 16 Jul 2008 09:05:09 +0000 (11:05 +0200)
64-bit hypercall interface can pass a maddr in one argument rather
than splitting it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/xen/hypercall.h

index d9e4cf7b23ac76d650495f39658df3fa94fca4b5..91cb7fd5c1234be0f549b44f8a93208c7fedd92d 100644 (file)
@@ -466,10 +466,15 @@ MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
                        struct desc_struct desc)
 {
        mcl->op = __HYPERVISOR_update_descriptor;
-       mcl->args[0] = maddr;
-       mcl->args[1] = maddr >> 32;
-       mcl->args[2] = desc.a;
-       mcl->args[3] = desc.b;
+       if (sizeof(maddr) == sizeof(long)) {
+               mcl->args[0] = maddr;
+               mcl->args[1] = *(unsigned long *)&desc;
+       } else {
+               mcl->args[0] = maddr;
+               mcl->args[1] = maddr >> 32;
+               mcl->args[2] = desc.a;
+               mcl->args[3] = desc.b;
+       }
 }
 
 static inline void