[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] make all (native) hypercalls consistently have "long" return type


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Wed, 05 Sep 2012 01:01:38 +0000
  • Delivery-date: Wed, 05 Sep 2012 01:01:46 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1346763408 -7200
# Node ID d28a9ba889c02f835df05bc007c2b4828d86cff2
# Parent  52f3ddacd148cf6b1cc4567fadc28bcdf161cd6e
make all (native) hypercalls consistently have "long" return type

for common and x86 ones at least, to address the problem of storing
zero-extended values into the multicall result field otherwise.

Reported-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset: 25744:47080c965937
xen-unstable date: Fri Aug 10 07:51:01 UTC 2012
---


diff -r 52f3ddacd148 -r d28a9ba889c0 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Tue Sep 04 14:54:49 2012 +0200
+++ b/xen/arch/x86/mm.c Tue Sep 04 14:56:48 2012 +0200
@@ -2893,7 +2893,7 @@ static inline void fixunmap_domain_page(
 #define fixunmap_domain_page(ptr) ((void)(ptr))
 #endif
 
-int do_mmuext_op(
+long do_mmuext_op(
     XEN_GUEST_HANDLE(mmuext_op_t) uops,
     unsigned int count,
     XEN_GUEST_HANDLE(uint) pdone,
@@ -3346,7 +3346,7 @@ int do_mmuext_op(
     return rc;
 }
 
-int do_mmu_update(
+long do_mmu_update(
     XEN_GUEST_HANDLE(mmu_update_t) ureqs,
     unsigned int count,
     XEN_GUEST_HANDLE(uint) pdone,
@@ -4344,15 +4344,15 @@ static int __do_update_va_mapping(
     return rc;
 }
 
-int do_update_va_mapping(unsigned long va, u64 val64,
-                         unsigned long flags)
+long do_update_va_mapping(unsigned long va, u64 val64,
+                          unsigned long flags)
 {
     return __do_update_va_mapping(va, val64, flags, current->domain);
 }
 
-int do_update_va_mapping_otherdomain(unsigned long va, u64 val64,
-                                     unsigned long flags,
-                                     domid_t domid)
+long do_update_va_mapping_otherdomain(unsigned long va, u64 val64,
+                                      unsigned long flags,
+                                      domid_t domid)
 {
     struct domain *pg_owner;
     int rc;
diff -r 52f3ddacd148 -r d28a9ba889c0 xen/common/compat/xenoprof.c
--- a/xen/common/compat/xenoprof.c      Tue Sep 04 14:54:49 2012 +0200
+++ b/xen/common/compat/xenoprof.c      Tue Sep 04 14:56:48 2012 +0200
@@ -5,6 +5,7 @@
 #include <compat/xenoprof.h>
 
 #define COMPAT
+#define ret_t int
 
 #define do_xenoprof_op compat_xenoprof_op
 
diff -r 52f3ddacd148 -r d28a9ba889c0 xen/common/kexec.c
--- a/xen/common/kexec.c        Tue Sep 04 14:54:49 2012 +0200
+++ b/xen/common/kexec.c        Tue Sep 04 14:56:48 2012 +0200
@@ -601,8 +601,8 @@ static int kexec_exec(XEN_GUEST_HANDLE(v
     return -EINVAL; /* never reached */
 }
 
-int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg,
-                           int compat)
+static int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg,
+                                bool_t compat)
 {
     unsigned long flags;
     int ret = -EINVAL;
diff -r 52f3ddacd148 -r d28a9ba889c0 xen/common/xenoprof.c
--- a/xen/common/xenoprof.c     Tue Sep 04 14:54:49 2012 +0200
+++ b/xen/common/xenoprof.c     Tue Sep 04 14:56:48 2012 +0200
@@ -612,6 +612,8 @@ static int xenoprof_op_init(XEN_GUEST_HA
     return (copy_to_guest(arg, &xenoprof_init, 1) ? -EFAULT : 0);
 }
 
+#define ret_t long
+
 #endif /* !COMPAT */
 
 static int xenoprof_op_get_buffer(XEN_GUEST_HANDLE(void) arg)
@@ -665,7 +667,7 @@ static int xenoprof_op_get_buffer(XEN_GU
                       || (op == XENOPROF_disable_virq)  \
                       || (op == XENOPROF_get_buffer))
  
-int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg)
+ret_t do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg)
 {
     int ret = 0;
     
@@ -909,6 +911,7 @@ int do_xenoprof_op(int op, XEN_GUEST_HAN
 }
 
 #if defined(CONFIG_COMPAT) && !defined(COMPAT)
+#undef ret_t
 #include "compat/xenoprof.c"
 #endif
 
diff -r 52f3ddacd148 -r d28a9ba889c0 xen/include/asm-x86/hypercall.h
--- a/xen/include/asm-x86/hypercall.h   Tue Sep 04 14:54:49 2012 +0200
+++ b/xen/include/asm-x86/hypercall.h   Tue Sep 04 14:56:48 2012 +0200
@@ -25,7 +25,7 @@ extern long
 do_set_trap_table(
     XEN_GUEST_HANDLE(const_trap_info_t) traps);
 
-extern int
+extern long
 do_mmu_update(
     XEN_GUEST_HANDLE(mmu_update_t) ureqs,
     unsigned int count,
@@ -63,7 +63,7 @@ do_update_descriptor(
 extern long
 do_mca(XEN_GUEST_HANDLE(xen_mc_t) u_xen_mc);
 
-extern int
+extern long
 do_update_va_mapping(
     unsigned long va,
     u64 val64,
@@ -73,14 +73,14 @@ extern long
 do_physdev_op(
     int cmd, XEN_GUEST_HANDLE(void) arg);
 
-extern int
+extern long
 do_update_va_mapping_otherdomain(
     unsigned long va,
     u64 val64,
     unsigned long flags,
     domid_t domid);
 
-extern int
+extern long
 do_mmuext_op(
     XEN_GUEST_HANDLE(mmuext_op_t) uops,
     unsigned int count,
@@ -101,10 +101,6 @@ arch_do_domctl(
     struct xen_domctl *domctl,
     XEN_GUEST_HANDLE(xen_domctl_t) u_domctl);
 
-extern int
-do_kexec(
-    unsigned long op, unsigned arg1, XEN_GUEST_HANDLE(void) uarg);
-
 #ifdef __x86_64__
 
 extern long
diff -r 52f3ddacd148 -r d28a9ba889c0 xen/include/xen/hypercall.h
--- a/xen/include/xen/hypercall.h       Tue Sep 04 14:54:49 2012 +0200
+++ b/xen/include/xen/hypercall.h       Tue Sep 04 14:56:48 2012 +0200
@@ -121,7 +121,7 @@ extern long
 do_tmem_op(
     XEN_GUEST_HANDLE(tmem_op_t) uops);
 
-extern int
+extern long
 do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);
 
 #ifdef CONFIG_COMPAT

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.