All of lore.kernel.org
 help / color / mirror / Atom feed
* [rfc] [patch] more 'long' in the hypervisor interface
@ 2006-06-28 21:03 Hollis Blanchard
  2006-06-28 21:02 ` Keir Fraser
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Hollis Blanchard @ 2006-06-28 21:03 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, xen-ppc-devel

Hi Keir, we've come across some more users of 'long' in the hypervisor
interface: xen/include/public/memory.h. Unlike the dom0_ops, we can't
just change these to be 64 bits because 32-bit kernels use these
structures for the balloon driver.

I would like to create a new type, say "legacy_ulong_t", to cover these
cases and future instances we'll undoubtedly come across. What do you
think?

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r 10db0f8c710d xen/include/public/arch-x86_64.h
--- a/xen/include/public/arch-x86_64.h	Wed Jun 28 15:37:45 2006 -0400
+++ b/xen/include/public/arch-x86_64.h	Wed Jun 28 16:02:21 2006 -0500
@@ -104,6 +104,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 #define MAX_VIRT_CPUS 32
 
 #ifndef __ASSEMBLY__
+
+typedef unsigned long legacy_ulong_t;
 
 /*
  * int HYPERVISOR_set_segment_base(unsigned int which, unsigned long base)
diff -r 10db0f8c710d xen/include/public/memory.h
--- a/xen/include/public/memory.h	Wed Jun 28 15:37:45 2006 -0400
+++ b/xen/include/public/memory.h	Wed Jun 28 16:02:21 2006 -0500
@@ -32,7 +32,7 @@ struct xen_memory_reservation {
     XEN_GUEST_HANDLE(xen_pfn_t) extent_start;
 
     /* Number of extents, and size/alignment of each (2^extent_order pages). */
-    unsigned long  nr_extents;
+    legacy_ulong_t  nr_extents;
     unsigned int   extent_order;
 
     /*
@@ -90,7 +90,7 @@ struct xen_memory_exchange {
      *     command will be non-zero.
      *  5. THIS FIELD MUST BE INITIALISED TO ZERO BY THE CALLER!
      */
-    unsigned long nr_exchanged;
+    legacy_ulong_t nr_exchanged;
 };
 typedef struct xen_memory_exchange xen_memory_exchange_t;
 DEFINE_XEN_GUEST_HANDLE(xen_memory_exchange_t);
@@ -148,8 +148,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_machphys_mfn
  */
 #define XENMEM_machphys_mapping     12
 struct xen_machphys_mapping {
-    unsigned long v_start, v_end; /* Start and end virtual addresses.   */
-    unsigned long max_mfn;        /* Maximum MFN that can be looked up. */
+    legacy_ulong_t v_start, v_end; /* Start and end virtual addresses.   */
+    legacy_ulong_t max_mfn;        /* Maximum MFN that can be looked up. */
 };
 typedef struct xen_machphys_mapping xen_machphys_mapping_t;
 DEFINE_XEN_GUEST_HANDLE(xen_machphys_mapping_t);
@@ -170,7 +170,7 @@ struct xen_add_to_physmap {
     unsigned int space;
 
     /* Index into source mapping space. */
-    unsigned long idx;
+    legacy_ulong_t idx;
 
     /* GPFN where the source mapping page should appear. */
     xen_pfn_t     gpfn;
@@ -188,7 +188,7 @@ struct xen_translate_gpfn_list {
     domid_t domid;
 
     /* Length of list. */
-    unsigned long nr_gpfns;
+    legacy_ulong_t nr_gpfns;
 
     /* List of GPFNs to translate. */
     XEN_GUEST_HANDLE(xen_pfn_t) gpfn_list;


-- 
Hollis Blanchard
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-06-29 21:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-28 21:03 [rfc] [patch] more 'long' in the hypervisor interface Hollis Blanchard
2006-06-28 21:02 ` Keir Fraser
2006-06-28 21:19   ` Hollis Blanchard
2006-06-28 21:09 ` Chris Wright
2006-06-28 21:21   ` Hollis Blanchard
2006-06-28 21:36     ` Chris Wright
2006-06-28 21:58       ` Hollis Blanchard
2006-06-28 22:42         ` [RFC] Erratic mouse in HVM guest Ross Maxfield
2006-06-28 23:05         ` [rfc] [patch] more 'long' in the hypervisor interface Chris Wright
2006-06-29 14:37           ` Steve Ofsthun
2006-06-29 17:02             ` Chris Wright
2006-06-29 17:55               ` Steve Ofsthun
2006-06-29 18:14             ` Hollis Blanchard
2006-06-29 21:04               ` Steve Ofsthun
2006-06-28 21:10 ` Hollis Blanchard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.