WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] do_set_trap_table()'s argument can be const too
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 18 Jan 2008 14:38:20 +0000
Delivery-date: Fri, 18 Jan 2008 06:38:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] do_set_trap_table()'s argument can be const too, Jan Beulich <=