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

[Xen-devel] [PATCH] do_set_trap_table()'s argument can be const too



Additionally the guest handle declaration doesn't need to be in a
public header.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2008-01-18/xen/arch/x86/traps.c
===================================================================
--- 2008-01-18.orig/xen/arch/x86/traps.c        2008-01-17 09:25:56.000000000 
+0100
+++ 2008-01-18/xen/arch/x86/traps.c     2008-01-18 14:43:03.000000000 +0100
@@ -49,6 +49,7 @@
 #include <xen/trace.h>
 #include <asm/paging.h>
 #include <asm/system.h>
+#include <asm/hypercall.h>
 #include <asm/io.h>
 #include <asm/atomic.h>
 #include <asm/desc.h>
@@ -2825,7 +2826,7 @@ long unregister_guest_nmi_callback(void)
     return 0;
 }
 
-long do_set_trap_table(XEN_GUEST_HANDLE(trap_info_t) traps)
+long do_set_trap_table(XEN_GUEST_HANDLE(const_trap_info_t) traps)
 {
     struct trap_info cur;
     struct vcpu *curr = current;
Index: 2008-01-18/xen/include/asm-x86/hypercall.h
===================================================================
--- 2008-01-18.orig/xen/include/asm-x86/hypercall.h     2007-06-04 
08:35:36.000000000 +0200
+++ 2008-01-18/xen/include/asm-x86/hypercall.h  2008-01-18 14:43:03.000000000 
+0100
@@ -32,9 +32,10 @@ extern long
 do_physdev_op_compat(
     XEN_GUEST_HANDLE(physdev_op_t) uop);
 
+__DEFINE_XEN_GUEST_HANDLE(const_trap_info_t, const trap_info_t);
 extern long
 do_set_trap_table(
-    XEN_GUEST_HANDLE(trap_info_t) traps);
+    XEN_GUEST_HANDLE(const_trap_info_t) traps);
 
 extern int
 do_mmu_update(
Index: 2008-01-18/xen/include/public/arch-x86/xen.h
===================================================================
--- 2008-01-18.orig/xen/include/public/arch-x86/xen.h   2008-01-18 
14:43:00.000000000 +0100
+++ 2008-01-18/xen/include/public/arch-x86/xen.h        2008-01-18 
14:43:03.000000000 +0100
@@ -98,7 +98,6 @@ struct trap_info {
     unsigned long address; /* code offset                                   */
 };
 typedef struct trap_info trap_info_t;
-DEFINE_XEN_GUEST_HANDLE(trap_info_t);
 
 typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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