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

[Xen-changelog] Rename guest_handle() macro to GUEST_HANDLE() and define_guest_handle()



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 2307bf2a4bfc615488a9a606753fbcb021532fcf
# Parent  aefc75f5db5edeb00ed94ba772804642b0bf0038
Rename guest_handle() macro to GUEST_HANDLE() and define_guest_handle()
to DEFINE_GUEST_HANDLE(). All caps for datatype declarations and
definitions got the popular vote. :-)

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r aefc75f5db5e -r 2307bf2a4bfc xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c      Fri Mar  3 18:07:55 2006
+++ b/xen/arch/ia64/xen/dom0_ops.c      Fri Mar  3 18:21:48 2006
@@ -20,7 +20,7 @@
 #include <public/sched_ctl.h>
 #include <asm/vmx.h>
 
-long arch_do_dom0_op(dom0_op_t *op, guest_handle(dom0_op_t) u_dom0_op)
+long arch_do_dom0_op(dom0_op_t *op, GUEST_HANDLE(dom0_op_t) u_dom0_op)
 {
     long ret = 0;
 
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/arch/x86/dom0_ops.c
--- a/xen/arch/x86/dom0_ops.c   Fri Mar  3 18:07:55 2006
+++ b/xen/arch/x86/dom0_ops.c   Fri Mar  3 18:21:48 2006
@@ -49,7 +49,7 @@
         (void)rdmsr_safe(msr_addr, msr_lo, msr_hi);
 }
 
-long arch_do_dom0_op(struct dom0_op *op, guest_handle(dom0_op_t) u_dom0_op)
+long arch_do_dom0_op(struct dom0_op *op, GUEST_HANDLE(dom0_op_t) u_dom0_op)
 {
     long ret = 0;
 
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Fri Mar  3 18:07:55 2006
+++ b/xen/arch/x86/mm.c Fri Mar  3 18:21:48 2006
@@ -2788,7 +2788,7 @@
 }
 
 
-long arch_memory_op(int op, guest_handle(void) arg)
+long arch_memory_op(int op, GUEST_HANDLE(void) arg)
 {
     struct xen_reserved_phys_area xrpa;
     unsigned long pfn;
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c  Fri Mar  3 18:07:55 2006
+++ b/xen/arch/x86/x86_32/mm.c  Fri Mar  3 18:21:48 2006
@@ -192,7 +192,7 @@
     }
 }
 
-long subarch_memory_op(int op, guest_handle(void) arg)
+long subarch_memory_op(int op, GUEST_HANDLE(void) arg)
 {
     struct xen_machphys_mfn_list xmml;
     unsigned long mfn;
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  Fri Mar  3 18:07:55 2006
+++ b/xen/arch/x86/x86_64/mm.c  Fri Mar  3 18:21:48 2006
@@ -183,7 +183,7 @@
     }
 }
 
-long subarch_memory_op(int op, guest_handle(void) arg)
+long subarch_memory_op(int op, GUEST_HANDLE(void) arg)
 {
     struct xen_machphys_mfn_list xmml;
     l3_pgentry_t l3e;
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c     Fri Mar  3 18:07:55 2006
+++ b/xen/common/dom0_ops.c     Fri Mar  3 18:21:48 2006
@@ -24,7 +24,7 @@
 #include <acm/acm_hooks.h>
 
 extern long arch_do_dom0_op(
-    struct dom0_op *op, guest_handle(dom0_op_t) u_dom0_op);
+    struct dom0_op *op, GUEST_HANDLE(dom0_op_t) u_dom0_op);
 extern void arch_getdomaininfo_ctxt(
     struct vcpu *, struct vcpu_guest_context *);
 
@@ -90,7 +90,7 @@
     memcpy(info->handle, d->handle, sizeof(xen_domain_handle_t));
 }
 
-long do_dom0_op(guest_handle(dom0_op_t) u_dom0_op)
+long do_dom0_op(GUEST_HANDLE(dom0_op_t) u_dom0_op)
 {
     long ret = 0;
     struct dom0_op curop, *op = &curop;
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/common/memory.c
--- a/xen/common/memory.c       Fri Mar  3 18:07:55 2006
+++ b/xen/common/memory.c       Fri Mar  3 18:21:48 2006
@@ -31,7 +31,7 @@
 static long
 increase_reservation(
     struct domain *d, 
-    guest_handle(ulong) extent_list,
+    GUEST_HANDLE(ulong) extent_list,
     unsigned int   nr_extents,
     unsigned int   extent_order,
     unsigned int   flags,
@@ -80,7 +80,7 @@
 static long
 populate_physmap(
     struct domain *d, 
-    guest_handle(ulong) extent_list,
+    GUEST_HANDLE(ulong) extent_list,
     unsigned int  nr_extents,
     unsigned int  extent_order,
     unsigned int  flags,
@@ -141,7 +141,7 @@
 static long
 decrease_reservation(
     struct domain *d,
-    guest_handle(ulong) extent_list,
+    GUEST_HANDLE(ulong) extent_list,
     unsigned int   nr_extents,
     unsigned int   extent_order,
     unsigned int   flags,
@@ -198,7 +198,7 @@
 
 static long
 translate_gpfn_list(
-    guest_handle(xen_translate_gpfn_list_t) uop, unsigned long *progress)
+    GUEST_HANDLE(xen_translate_gpfn_list_t) uop, unsigned long *progress)
 {
     struct xen_translate_gpfn_list op;
     unsigned long i, gpfn, mfn;
@@ -257,7 +257,7 @@
     return 0;
 }
 
-long do_memory_op(unsigned long cmd, guest_handle(void) arg)
+long do_memory_op(unsigned long cmd, GUEST_HANDLE(void) arg)
 {
     struct domain *d;
     int rc, op, flags = 0, preempted = 0;
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/common/perfc.c
--- a/xen/common/perfc.c        Fri Mar  3 18:07:55 2006
+++ b/xen/common/perfc.c        Fri Mar  3 18:21:48 2006
@@ -132,7 +132,7 @@
 
 static dom0_perfc_desc_t perfc_d[NR_PERFCTRS];
 static int               perfc_init = 0;
-static int perfc_copy_info(guest_handle(dom0_perfc_desc_t) desc)
+static int perfc_copy_info(GUEST_HANDLE(dom0_perfc_desc_t) desc)
 {
     unsigned int i, j;
     atomic_t *counters = (atomic_t *)&perfcounters;
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Fri Mar  3 18:07:55 2006
+++ b/xen/drivers/char/console.c        Fri Mar  3 18:21:48 2006
@@ -222,7 +222,7 @@
         conringc = conringp - CONRING_SIZE;
 }
 
-long read_console_ring(guest_handle(char) str, u32 *pcount, int clear)
+long read_console_ring(GUEST_HANDLE(char) str, u32 *pcount, int clear)
 {
     unsigned int idx, len, max, sofar, c;
     unsigned long flags;
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  Fri Mar  3 18:07:55 2006
+++ b/xen/include/asm-x86/mm.h  Fri Mar  3 18:21:48 2006
@@ -380,7 +380,7 @@
 int __sync_lazy_execstate(void);
 
 /* Arch-specific portion of memory_op hypercall. */
-long arch_memory_op(int op, guest_handle(void) arg);
-long subarch_memory_op(int op, guest_handle(void) arg);
+long arch_memory_op(int op, GUEST_HANDLE(void) arg);
+long subarch_memory_op(int op, GUEST_HANDLE(void) arg);
 
 #endif /* __ASM_X86_MM_H__ */
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Fri Mar  3 18:07:55 2006
+++ b/xen/include/public/arch-ia64.h    Fri Mar  3 18:21:48 2006
@@ -298,7 +298,7 @@
     arch_initrd_info_t initrd;
     char cmdline[IA64_COMMAND_LINE_SIZE];
 } vcpu_guest_context_t;
-define_guest_handle(vcpu_guest_context_t);
+DEFINE_GUEST_HANDLE(vcpu_guest_context_t);
 
 #endif /* !__ASSEMBLY__ */
 
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/public/arch-x86_32.h
--- a/xen/include/public/arch-x86_32.h  Fri Mar  3 18:07:55 2006
+++ b/xen/include/public/arch-x86_32.h  Fri Mar  3 18:21:48 2006
@@ -130,7 +130,7 @@
     unsigned long failsafe_callback_eip;
     unsigned long vm_assist;                /* VMASST_TYPE_* bitmap */
 } vcpu_guest_context_t;
-define_guest_handle(vcpu_guest_context_t);
+DEFINE_GUEST_HANDLE(vcpu_guest_context_t);
 
 typedef struct arch_shared_info {
     unsigned long max_pfn;                  /* max pfn that appears in table */
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/public/arch-x86_64.h
--- a/xen/include/public/arch-x86_64.h  Fri Mar  3 18:07:55 2006
+++ b/xen/include/public/arch-x86_64.h  Fri Mar  3 18:21:48 2006
@@ -215,7 +215,7 @@
     uint64_t      gs_base_kernel;
     uint64_t      gs_base_user;
 } vcpu_guest_context_t;
-define_guest_handle(vcpu_guest_context_t);
+DEFINE_GUEST_HANDLE(vcpu_guest_context_t);
 
 typedef struct arch_shared_info {
     unsigned long max_pfn;                  /* max pfn that appears in table */
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h     Fri Mar  3 18:07:55 2006
+++ b/xen/include/public/dom0_ops.h     Fri Mar  3 18:21:48 2006
@@ -28,21 +28,21 @@
     /* IN variables. */
     domid_t       domain;
     unsigned long max_pfns;
-    guest_handle(ulong) buffer;
+    GUEST_HANDLE(ulong) buffer;
     /* OUT variables. */
     unsigned long num_pfns;
 } dom0_getmemlist_t;
-define_guest_handle(dom0_getmemlist_t);
+DEFINE_GUEST_HANDLE(dom0_getmemlist_t);
 
 #define DOM0_SCHEDCTL          6
  /* struct sched_ctl_cmd is from sched-ctl.h   */
 typedef struct sched_ctl_cmd dom0_schedctl_t;
-define_guest_handle(dom0_schedctl_t);
+DEFINE_GUEST_HANDLE(dom0_schedctl_t);
 
 #define DOM0_ADJUSTDOM         7
 /* struct sched_adjdom_cmd is from sched-ctl.h */
 typedef struct sched_adjdom_cmd dom0_adjustdom_t;
-define_guest_handle(dom0_adjustdom_t);
+DEFINE_GUEST_HANDLE(dom0_adjustdom_t);
 
 #define DOM0_CREATEDOMAIN      8
 typedef struct dom0_createdomain {
@@ -53,28 +53,28 @@
     /* Identifier for new domain (auto-allocate if zero is specified). */
     domid_t domain;
 } dom0_createdomain_t;
-define_guest_handle(dom0_createdomain_t);
+DEFINE_GUEST_HANDLE(dom0_createdomain_t);
 
 #define DOM0_DESTROYDOMAIN     9
 typedef struct dom0_destroydomain {
     /* IN variables. */
     domid_t domain;
 } dom0_destroydomain_t;
-define_guest_handle(dom0_destroydomain_t);
+DEFINE_GUEST_HANDLE(dom0_destroydomain_t);
 
 #define DOM0_PAUSEDOMAIN      10
 typedef struct dom0_pausedomain {
     /* IN parameters. */
     domid_t domain;
 } dom0_pausedomain_t;
-define_guest_handle(dom0_pausedomain_t);
+DEFINE_GUEST_HANDLE(dom0_pausedomain_t);
 
 #define DOM0_UNPAUSEDOMAIN    11
 typedef struct dom0_unpausedomain {
     /* IN parameters. */
     domid_t domain;
 } dom0_unpausedomain_t;
-define_guest_handle(dom0_unpausedomain_t);
+DEFINE_GUEST_HANDLE(dom0_unpausedomain_t);
 
 #define DOM0_GETDOMAININFO    12
 typedef struct dom0_getdomaininfo {
@@ -100,7 +100,7 @@
     uint32_t ssidref;
     xen_domain_handle_t handle;
 } dom0_getdomaininfo_t;
-define_guest_handle(dom0_getdomaininfo_t);
+DEFINE_GUEST_HANDLE(dom0_getdomaininfo_t);
 
 #define DOM0_SETVCPUCONTEXT   13
 typedef struct dom0_setvcpucontext {
@@ -108,9 +108,9 @@
     domid_t               domain;
     uint32_t              vcpu;
     /* IN/OUT parameters */
-    guest_handle(vcpu_guest_context_t) ctxt;
+    GUEST_HANDLE(vcpu_guest_context_t) ctxt;
 } dom0_setvcpucontext_t;
-define_guest_handle(dom0_setvcpucontext_t);
+DEFINE_GUEST_HANDLE(dom0_setvcpucontext_t);
 
 #define DOM0_MSR              15
 typedef struct dom0_msr {
@@ -124,7 +124,7 @@
     uint32_t out1;
     uint32_t out2;
 } dom0_msr_t;
-define_guest_handle(dom0_msr_t);
+DEFINE_GUEST_HANDLE(dom0_msr_t);
 
 /*
  * Set clock such that it would read <secs,nsecs> after 00:00:00 UTC,
@@ -137,7 +137,7 @@
     uint32_t nsecs;
     uint64_t system_time;
 } dom0_settime_t;
-define_guest_handle(dom0_settime_t);
+DEFINE_GUEST_HANDLE(dom0_settime_t);
 
 #define DOM0_GETPAGEFRAMEINFO 18
 #define NOTAB 0         /* normal page */
@@ -158,7 +158,7 @@
     /* Is the page PINNED to a type? */
     uint32_t type;         /* see above type defs */
 } dom0_getpageframeinfo_t;
-define_guest_handle(dom0_getpageframeinfo_t);
+DEFINE_GUEST_HANDLE(dom0_getpageframeinfo_t);
 
 /*
  * Read console content from Xen buffer ring.
@@ -168,10 +168,10 @@
     /* IN variables. */
     uint32_t clear;            /* Non-zero -> clear after reading. */
     /* IN/OUT variables. */
-    guest_handle(char) buffer; /* In: Buffer start; Out: Used buffer start */
+    GUEST_HANDLE(char) buffer; /* In: Buffer start; Out: Used buffer start */
     uint32_t count;            /* In: Buffer size;  Out: Used buffer size  */
 } dom0_readconsole_t;
-define_guest_handle(dom0_readconsole_t);
+DEFINE_GUEST_HANDLE(dom0_readconsole_t);
 
 /* 
  * Set which physical cpus a vcpu can execute on.
@@ -183,7 +183,7 @@
     uint32_t  vcpu;
     cpumap_t  cpumap;
 } dom0_setvcpuaffinity_t;
-define_guest_handle(dom0_setvcpuaffinity_t);
+DEFINE_GUEST_HANDLE(dom0_setvcpuaffinity_t);
 
 /* Get trace buffers machine base address */
 #define DOM0_TBUFCONTROL       21
@@ -203,7 +203,7 @@
     unsigned long buffer_mfn;
     uint32_t size;
 } dom0_tbufcontrol_t;
-define_guest_handle(dom0_tbufcontrol_t);
+DEFINE_GUEST_HANDLE(dom0_tbufcontrol_t);
 
 /*
  * Get physical information about the host machine
@@ -219,7 +219,7 @@
     unsigned long free_pages;
     uint32_t hw_cap[8];
 } dom0_physinfo_t;
-define_guest_handle(dom0_physinfo_t);
+DEFINE_GUEST_HANDLE(dom0_physinfo_t);
 
 /*
  * Get the ID of the current scheduler.
@@ -229,7 +229,7 @@
     /* OUT variable */
     uint32_t sched_id;
 } dom0_sched_id_t;
-define_guest_handle(dom0_sched_id_t);
+DEFINE_GUEST_HANDLE(dom0_sched_id_t);
 
 /* 
  * Control shadow pagetables operation
@@ -251,19 +251,19 @@
     uint32_t dirty_net_count;     
     uint32_t dirty_block_count;     
 } dom0_shadow_control_stats_t;
-define_guest_handle(dom0_shadow_control_stats_t);
+DEFINE_GUEST_HANDLE(dom0_shadow_control_stats_t);
 
 typedef struct dom0_shadow_control {
     /* IN variables. */
     domid_t        domain;
     uint32_t       op;
-    guest_handle(ulong) dirty_bitmap;
+    GUEST_HANDLE(ulong) dirty_bitmap;
     /* IN/OUT variables. */
     unsigned long  pages;        /* size of buffer, updated with actual size */
     /* OUT variables. */
     dom0_shadow_control_stats_t stats;
 } dom0_shadow_control_t;
-define_guest_handle(dom0_shadow_control_t);
+DEFINE_GUEST_HANDLE(dom0_shadow_control_t);
 
 #define DOM0_SETDOMAINMAXMEM   28
 typedef struct dom0_setdomainmaxmem {
@@ -271,7 +271,7 @@
     domid_t       domain;
     unsigned long max_memkb;
 } dom0_setdomainmaxmem_t;
-define_guest_handle(dom0_setdomainmaxmem_t);
+DEFINE_GUEST_HANDLE(dom0_setdomainmaxmem_t);
 
 #define DOM0_GETPAGEFRAMEINFO2 29   /* batched interface */
 typedef struct dom0_getpageframeinfo2 {
@@ -279,9 +279,9 @@
     domid_t        domain;
     unsigned long  num;
     /* IN/OUT variables. */
-    guest_handle(ulong) array;
+    GUEST_HANDLE(ulong) array;
 } dom0_getpageframeinfo2_t;
-define_guest_handle(dom0_getpageframeinfo2_t);
+DEFINE_GUEST_HANDLE(dom0_getpageframeinfo2_t);
 
 /*
  * Request memory range (@mfn, @mfn+@nr_mfns-1) to have type @type.
@@ -300,7 +300,7 @@
     uint32_t      handle;
     uint32_t      reg;
 } dom0_add_memtype_t;
-define_guest_handle(dom0_add_memtype_t);
+DEFINE_GUEST_HANDLE(dom0_add_memtype_t);
 
 /*
  * Tear down an existing memory-range type. If @handle is remembered then it
@@ -315,7 +315,7 @@
     uint32_t handle;
     uint32_t reg;
 } dom0_del_memtype_t;
-define_guest_handle(dom0_del_memtype_t);
+DEFINE_GUEST_HANDLE(dom0_del_memtype_t);
 
 /* Read current type of an MTRR (x86-specific). */
 #define DOM0_READ_MEMTYPE        33
@@ -327,7 +327,7 @@
     unsigned long nr_mfns;
     uint32_t type;
 } dom0_read_memtype_t;
-define_guest_handle(dom0_read_memtype_t);
+DEFINE_GUEST_HANDLE(dom0_read_memtype_t);
 
 /* Interface for controlling Xen software performance counters. */
 #define DOM0_PERFCCONTROL        34
@@ -339,23 +339,23 @@
     uint32_t     nr_vals;              /* number of values for this counter */
     uint32_t     vals[64];             /* array of values */
 } dom0_perfc_desc_t;
-define_guest_handle(dom0_perfc_desc_t);
+DEFINE_GUEST_HANDLE(dom0_perfc_desc_t);
 typedef struct dom0_perfccontrol {
     /* IN variables. */
     uint32_t       op;                /*  DOM0_PERFCCONTROL_OP_??? */
     /* OUT variables. */
     uint32_t       nr_counters;       /*  number of counters */
-    guest_handle(dom0_perfc_desc_t) desc; /*  counter information (or NULL) */
+    GUEST_HANDLE(dom0_perfc_desc_t) desc; /*  counter information (or NULL) */
 } dom0_perfccontrol_t;
-define_guest_handle(dom0_perfccontrol_t);
+DEFINE_GUEST_HANDLE(dom0_perfccontrol_t);
 
 #define DOM0_MICROCODE           35
 typedef struct dom0_microcode {
     /* IN variables. */
-    guest_handle(void) data;          /* Pointer to microcode data */
+    GUEST_HANDLE(void) data;          /* Pointer to microcode data */
     uint32_t length;                  /* Length of microcode data. */
 } dom0_microcode_t;
-define_guest_handle(dom0_microcode_t);
+DEFINE_GUEST_HANDLE(dom0_microcode_t);
 
 #define DOM0_IOPORT_PERMISSION   36
 typedef struct dom0_ioport_permission {
@@ -364,7 +364,7 @@
     uint32_t nr_ports;                /* size of port range */
     uint8_t  allow_access;            /* allow or deny access to range? */
 } dom0_ioport_permission_t;
-define_guest_handle(dom0_ioport_permission_t);
+DEFINE_GUEST_HANDLE(dom0_ioport_permission_t);
 
 #define DOM0_GETVCPUCONTEXT      37
 typedef struct dom0_getvcpucontext {
@@ -372,9 +372,9 @@
     domid_t  domain;                  /* domain to be affected */
     uint32_t vcpu;                    /* vcpu # */
     /* OUT variables. */
-    guest_handle(vcpu_guest_context_t) ctxt;
+    GUEST_HANDLE(vcpu_guest_context_t) ctxt;
 } dom0_getvcpucontext_t;
-define_guest_handle(dom0_getvcpucontext_t);
+DEFINE_GUEST_HANDLE(dom0_getvcpucontext_t);
 
 #define DOM0_GETVCPUINFO         43
 typedef struct dom0_getvcpuinfo {
@@ -389,18 +389,18 @@
     uint32_t cpu;                     /* current mapping   */
     cpumap_t cpumap;                  /* allowable mapping */
 } dom0_getvcpuinfo_t;
-define_guest_handle(dom0_getvcpuinfo_t);
+DEFINE_GUEST_HANDLE(dom0_getvcpuinfo_t);
 
 #define DOM0_GETDOMAININFOLIST   38
 typedef struct dom0_getdomaininfolist {
     /* IN variables. */
     domid_t               first_domain;
     uint32_t              max_domains;
-    guest_handle(dom0_getdomaininfo_t) buffer;
+    GUEST_HANDLE(dom0_getdomaininfo_t) buffer;
     /* OUT variables. */
     uint32_t              num_domains;
 } dom0_getdomaininfolist_t;
-define_guest_handle(dom0_getdomaininfolist_t);
+DEFINE_GUEST_HANDLE(dom0_getdomaininfolist_t);
 
 #define DOM0_PLATFORM_QUIRK      39  
 #define QUIRK_NOIRQBALANCING  1
@@ -408,7 +408,7 @@
     /* IN variables. */
     uint32_t quirk_id;
 } dom0_platform_quirk_t;
-define_guest_handle(dom0_platform_quirk_t);
+DEFINE_GUEST_HANDLE(dom0_platform_quirk_t);
 
 #define DOM0_PHYSICAL_MEMORY_MAP 40
 typedef struct dom0_memory_map_entry {
@@ -416,36 +416,36 @@
     uint32_t flags; /* reserved */
     uint8_t  is_ram;
 } dom0_memory_map_entry_t;
-define_guest_handle(dom0_memory_map_entry_t);
+DEFINE_GUEST_HANDLE(dom0_memory_map_entry_t);
 typedef struct dom0_physical_memory_map {
     /* IN variables. */
     uint32_t max_map_entries;
     /* OUT variables. */
     uint32_t nr_map_entries;
-    guest_handle(dom0_memory_map_entry_t) memory_map;
+    GUEST_HANDLE(dom0_memory_map_entry_t) memory_map;
 } dom0_physical_memory_map_t;
-define_guest_handle(dom0_physical_memory_map_t);
+DEFINE_GUEST_HANDLE(dom0_physical_memory_map_t);
 
 #define DOM0_MAX_VCPUS 41
 typedef struct dom0_max_vcpus {
     domid_t  domain;        /* domain to be affected */
     uint32_t max;           /* maximum number of vcpus */
 } dom0_max_vcpus_t;
-define_guest_handle(dom0_max_vcpus_t);
+DEFINE_GUEST_HANDLE(dom0_max_vcpus_t);
 
 #define DOM0_SETDOMAINHANDLE 44
 typedef struct dom0_setdomainhandle {
     domid_t domain;
     xen_domain_handle_t handle;
 } dom0_setdomainhandle_t;
-define_guest_handle(dom0_setdomainhandle_t);
+DEFINE_GUEST_HANDLE(dom0_setdomainhandle_t);
 
 #define DOM0_SETDEBUGGING 45
 typedef struct dom0_setdebugging {
     domid_t domain;
     uint8_t enable;
 } dom0_setdebugging_t;
-define_guest_handle(dom0_setdebugging_t);
+DEFINE_GUEST_HANDLE(dom0_setdebugging_t);
 
 #define DOM0_IRQ_PERMISSION 46
 typedef struct dom0_irq_permission {
@@ -453,7 +453,7 @@
     uint8_t pirq;
     uint8_t allow_access;    /* flag to specify enable/disable of IRQ access */
 } dom0_irq_permission_t;
-define_guest_handle(dom0_irq_permission_t);
+DEFINE_GUEST_HANDLE(dom0_irq_permission_t);
 
 #define DOM0_IOMEM_PERMISSION 47
 typedef struct dom0_iomem_permission {
@@ -462,14 +462,14 @@
     unsigned long nr_mfns;    /* number of pages in range (>0) */
     uint8_t allow_access;     /* allow (!0) or deny (0) access to range? */
 } dom0_iomem_permission_t;
-define_guest_handle(dom0_iomem_permission_t);
+DEFINE_GUEST_HANDLE(dom0_iomem_permission_t);
  
 #define DOM0_HYPERCALL_INIT   48
 typedef struct dom0_hypercall_init {
     domid_t  domain;          /* domain to be affected */
     unsigned long mfn;        /* machine frame to be initialised */
 } dom0_hypercall_init_t;
-define_guest_handle(dom0_hypercall_init_t);
+DEFINE_GUEST_HANDLE(dom0_hypercall_init_t);
  
 typedef struct dom0_op {
     uint32_t cmd;
@@ -515,7 +515,7 @@
         uint8_t                       pad[128];
     } u;
 } dom0_op_t;
-define_guest_handle(dom0_op_t);
+DEFINE_GUEST_HANDLE(dom0_op_t);
 
 #endif /* __XEN_PUBLIC_DOM0_OPS_H__ */
 
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/public/memory.h
--- a/xen/include/public/memory.h       Fri Mar  3 18:07:55 2006
+++ b/xen/include/public/memory.h       Fri Mar  3 18:21:48 2006
@@ -29,7 +29,7 @@
      *   OUT: GMFN bases of extents that were allocated
      *   (NB. This command also updates the mach_to_phys translation table)
      */
-    guest_handle(ulong) extent_start;
+    GUEST_HANDLE(ulong) extent_start;
 
     /* Number of extents, and size/alignment of each (2^extent_order pages). */
     unsigned long  nr_extents;
@@ -50,7 +50,7 @@
     domid_t        domid;
 
 } xen_memory_reservation_t;
-define_guest_handle(xen_memory_reservation_t);
+DEFINE_GUEST_HANDLE(xen_memory_reservation_t);
 
 /*
  * Returns the maximum machine frame number of mapped RAM in this system.
@@ -86,7 +86,7 @@
      * any large discontiguities in the machine address space, 2MB gaps in
      * the machphys table will be represented by an MFN base of zero.
      */
-    guest_handle(ulong) extent_start;
+    GUEST_HANDLE(ulong) extent_start;
 
     /*
      * Number of extents written to the above array. This will be smaller
@@ -94,7 +94,7 @@
      */
     unsigned int nr_extents;
 } xen_machphys_mfn_list_t;
-define_guest_handle(xen_machphys_mfn_list_t);
+DEFINE_GUEST_HANDLE(xen_machphys_mfn_list_t);
 
 /*
  * Returns the base and size of the specified reserved 'RAM hole' in the
@@ -115,7 +115,7 @@
     /* Base and size of the specified reserved area. */
     unsigned long first_gpfn, nr_gpfns;
 } xen_reserved_phys_area_t;
-define_guest_handle(xen_reserved_phys_area_t);
+DEFINE_GUEST_HANDLE(xen_reserved_phys_area_t);
 
 /*
  * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
@@ -130,15 +130,15 @@
     unsigned long nr_gpfns;
 
     /* List of GPFNs to translate. */
-    guest_handle(ulong) gpfn_list;
+    GUEST_HANDLE(ulong) gpfn_list;
 
     /*
      * Output list to contain MFN translations. May be the same as the input
      * list (in which case each input GPFN is overwritten with the output MFN).
      */
-    guest_handle(ulong) mfn_list;
+    GUEST_HANDLE(ulong) mfn_list;
 } xen_translate_gpfn_list_t;
-define_guest_handle(xen_translate_gpfn_list_t);
+DEFINE_GUEST_HANDLE(xen_translate_gpfn_list_t);
 
 #endif /* __XEN_PUBLIC_MEMORY_H__ */
 
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/public/xen.h
--- a/xen/include/public/xen.h  Fri Mar  3 18:07:55 2006
+++ b/xen/include/public/xen.h  Fri Mar  3 18:21:48 2006
@@ -10,25 +10,25 @@
 #define __XEN_PUBLIC_XEN_H__
 
 #ifdef __XEN__
-#define __define_guest_handle(name, type) \
+#define __DEFINE_GUEST_HANDLE(name, type) \
     typedef struct { type *p; } __guest_handle_ ## name
 #else
-#define __define_guest_handle(name, type) \
+#define __DEFINE_GUEST_HANDLE(name, type) \
     typedef type * __guest_handle_ ## name
 #endif
 
-#define define_guest_handle(name) __define_guest_handle(name, name)
-#define guest_handle(name)        __guest_handle_ ## name
+#define DEFINE_GUEST_HANDLE(name) __DEFINE_GUEST_HANDLE(name, name)
+#define GUEST_HANDLE(name)        __guest_handle_ ## name
 
 #ifndef __ASSEMBLY__
 /* Guest handles for primitive C types. */
-__define_guest_handle(uchar, unsigned char);
-__define_guest_handle(uint,  unsigned int);
-__define_guest_handle(ulong, unsigned long);
-define_guest_handle(char);
-define_guest_handle(int);
-define_guest_handle(long);
-define_guest_handle(void);
+__DEFINE_GUEST_HANDLE(uchar, unsigned char);
+__DEFINE_GUEST_HANDLE(uint,  unsigned int);
+__DEFINE_GUEST_HANDLE(ulong, unsigned long);
+DEFINE_GUEST_HANDLE(char);
+DEFINE_GUEST_HANDLE(int);
+DEFINE_GUEST_HANDLE(long);
+DEFINE_GUEST_HANDLE(void);
 #endif
 
 #if defined(__i386__)
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/xen/console.h
--- a/xen/include/xen/console.h Fri Mar  3 18:07:55 2006
+++ b/xen/include/xen/console.h Fri Mar  3 18:21:48 2006
@@ -13,7 +13,7 @@
 
 void set_printk_prefix(const char *prefix);
 
-long read_console_ring(guest_handle(char), u32 *, int);
+long read_console_ring(GUEST_HANDLE(char), u32 *, int);
 
 void init_console(void);
 void console_endboot(int disable_vga);
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/xen/guest_access.h
--- a/xen/include/xen/guest_access.h    Fri Mar  3 18:07:55 2006
+++ b/xen/include/xen/guest_access.h    Fri Mar  3 18:21:48 2006
@@ -18,7 +18,7 @@
 /* Cast a guest handle to the specified type of handle. */
 #define guest_handle_cast(hnd, type) ({         \
     type *_x = (hnd).p;                         \
-    (guest_handle(type)) { _x };                \
+    (GUEST_HANDLE(type)) { _x };                \
 })
 
 /*
diff -r aefc75f5db5e -r 2307bf2a4bfc xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   Fri Mar  3 18:07:55 2006
+++ b/xen/include/xen/sched.h   Fri Mar  3 18:21:48 2006
@@ -311,7 +311,7 @@
  *  'i' [unsigned] {char, int}
  *  'l' [unsigned] long
  *  'p' pointer (foo *)
- *  'h' guest handle (guest_handle(foo))
+ *  'h' guest handle (GUEST_HANDLE(foo))
  */
 unsigned long hypercall_create_continuation(
     unsigned int op, const char *format, ...);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.