From: Hollis Blanchard <hollisb@us.ibm.com>
To: xen-devel <xen-devel@lists.xensource.com>
Cc: John Levon <levon@movementarian.org>, xen-ppc-devel@lists.xensource.com
Subject: [patch] [3/3] dom0_ops explicitly sized types
Date: Wed, 24 May 2006 18:04:34 -0500 [thread overview]
Message-ID: <1148511874.26460.47.camel@basalt.austin.ibm.com> (raw)
In-Reply-To: <1148511400.26460.39.camel@basalt.austin.ibm.com>
[-- Attachment #1.1: Type: text/plain, Size: 6759 bytes --]
Replace 'long' in the dom0_ops and privcmd structures with uint64_t.
As discussed previously, the these operations are not
performance-sensitive, so the additional cache footprint shouldn't be an
issue.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
diff -r c1434b779f36 linux-2.6-xen-sparse/include/xen/public/privcmd.h
--- a/linux-2.6-xen-sparse/include/xen/public/privcmd.h Wed May 24 17:45:02 2006 -0500
+++ b/linux-2.6-xen-sparse/include/xen/public/privcmd.h Wed May 24 18:03:19 2006 -0500
@@ -39,14 +39,14 @@
typedef struct privcmd_hypercall
{
- unsigned long op;
- unsigned long arg[5];
+ uint64_t op;
+ uint64_t arg[5];
} privcmd_hypercall_t;
typedef struct privcmd_mmap_entry {
- unsigned long va;
- unsigned long mfn;
- unsigned long npages;
+ uint64_t va;
+ uint64_t mfn;
+ uint64_t npages;
} privcmd_mmap_entry_t;
typedef struct privcmd_mmap {
@@ -58,7 +58,7 @@ typedef struct privcmd_mmapbatch {
typedef struct privcmd_mmapbatch {
int num; /* number of pages to populate */
domid_t dom; /* target domain */
- unsigned long addr; /* virtual address */
+ uint64_t addr; /* virtual address */
xen_pfn_t __user *arr; /* array of mfns - top nibble set on err */
} privcmd_mmapbatch_t;
diff -r c1434b779f36 xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h Wed May 24 17:45:02 2006 -0500
+++ b/xen/include/public/dom0_ops.h Wed May 24 18:03:19 2006 -0500
@@ -19,18 +19,18 @@
* This makes sure that old versions of dom0 tools will stop working in a
* well-defined way (rather than crashing the machine, for instance).
*/
-#define DOM0_INTERFACE_VERSION 0x03000000
+#define DOM0_INTERFACE_VERSION 0x03000001
/************************************************************************/
#define DOM0_GETMEMLIST 2
struct dom0_getmemlist {
/* IN variables. */
- domid_t domain;
- unsigned long max_pfns;
+ domid_t domain;
+ uint64_t max_pfns;
XEN_GUEST_HANDLE(xen_pfn_t) buffer;
/* OUT variables. */
- unsigned long num_pfns;
+ uint64_t num_pfns;
};
typedef struct dom0_getmemlist dom0_getmemlist_t;
DEFINE_XEN_GUEST_HANDLE(dom0_getmemlist_t);
@@ -96,9 +96,9 @@ struct dom0_getdomaininfo {
#define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code. */
#define DOMFLAGS_SHUTDOWNSHIFT 16
uint32_t flags;
- unsigned long tot_pages;
- unsigned long max_pages;
- unsigned long shared_info_frame; /* MFN of shared_info struct */
+ uint64_t tot_pages;
+ uint64_t max_pages;
+ uint64_t shared_info_frame; /* MFN of shared_info struct */
uint64_t cpu_time;
uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */
uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */
@@ -162,7 +162,7 @@ DEFINE_XEN_GUEST_HANDLE(dom0_settime_t);
struct dom0_getpageframeinfo {
/* IN variables. */
- unsigned long mfn; /* Machine page frame number to query. */
+ uint64_t mfn; /* Machine page frame number to query. */
domid_t domain; /* To which domain does the frame belong? */
/* OUT variables. */
/* Is the page PINNED to a type? */
@@ -213,7 +213,7 @@ struct dom0_tbufcontrol {
cpumap_t cpu_mask;
uint32_t evt_mask;
/* OUT variables */
- unsigned long buffer_mfn;
+ uint64_t buffer_mfn;
uint32_t size;
};
typedef struct dom0_tbufcontrol dom0_tbufcontrol_t;
@@ -229,8 +229,8 @@ struct dom0_physinfo {
uint32_t sockets_per_node;
uint32_t nr_nodes;
uint32_t cpu_khz;
- unsigned long total_pages;
- unsigned long free_pages;
+ uint64_t total_pages;
+ uint64_t free_pages;
uint32_t hw_cap[8];
};
typedef struct dom0_physinfo dom0_physinfo_t;
@@ -276,7 +276,7 @@ struct dom0_shadow_control {
uint32_t op;
XEN_GUEST_HANDLE(ulong) dirty_bitmap;
/* IN/OUT variables. */
- unsigned long pages; /* size of buffer, updated with actual size */
+ uint64_t pages; /* size of buffer, updated with actual size */
/* OUT variables. */
struct dom0_shadow_control_stats stats;
};
@@ -286,8 +286,8 @@ DEFINE_XEN_GUEST_HANDLE(dom0_shadow_cont
#define DOM0_SETDOMAINMAXMEM 28
struct dom0_setdomainmaxmem {
/* IN variables. */
- domid_t domain;
- unsigned long max_memkb;
+ domid_t domain;
+ uint64_t max_memkb;
};
typedef struct dom0_setdomainmaxmem dom0_setdomainmaxmem_t;
DEFINE_XEN_GUEST_HANDLE(dom0_setdomainmaxmem_t);
@@ -295,8 +295,8 @@ DEFINE_XEN_GUEST_HANDLE(dom0_setdomainma
#define DOM0_GETPAGEFRAMEINFO2 29 /* batched interface */
struct dom0_getpageframeinfo2 {
/* IN variables. */
- domid_t domain;
- unsigned long num;
+ domid_t domain;
+ uint64_t num;
/* IN/OUT variables. */
XEN_GUEST_HANDLE(ulong) array;
};
@@ -313,12 +313,12 @@ DEFINE_XEN_GUEST_HANDLE(dom0_getpagefram
#define DOM0_ADD_MEMTYPE 31
struct dom0_add_memtype {
/* IN variables. */
- unsigned long mfn;
- unsigned long nr_mfns;
- uint32_t type;
- /* OUT variables. */
- uint32_t handle;
- uint32_t reg;
+ uint64_t mfn;
+ uint64_t nr_mfns;
+ uint32_t type;
+ /* OUT variables. */
+ uint32_t handle;
+ uint32_t reg;
};
typedef struct dom0_add_memtype dom0_add_memtype_t;
DEFINE_XEN_GUEST_HANDLE(dom0_add_memtype_t);
@@ -345,8 +345,8 @@ struct dom0_read_memtype {
/* IN variables. */
uint32_t reg;
/* OUT variables. */
- unsigned long mfn;
- unsigned long nr_mfns;
+ uint64_t mfn;
+ uint64_t nr_mfns;
uint32_t type;
};
typedef struct dom0_read_memtype dom0_read_memtype_t;
@@ -499,8 +499,8 @@ DEFINE_XEN_GUEST_HANDLE(dom0_irq_permiss
#define DOM0_IOMEM_PERMISSION 47
struct dom0_iomem_permission {
domid_t domain; /* domain to be affected */
- unsigned long first_mfn; /* first page (physical page number) in range */
- unsigned long nr_mfns; /* number of pages in range (>0) */
+ uint64_t first_mfn; /* first page (physical page number) in range */
+ uint64_t nr_mfns; /* number of pages in range (>0) */
uint8_t allow_access; /* allow (!0) or deny (0) access to range? */
};
typedef struct dom0_iomem_permission dom0_iomem_permission_t;
@@ -509,7 +509,7 @@ DEFINE_XEN_GUEST_HANDLE(dom0_iomem_permi
#define DOM0_HYPERCALL_INIT 48
struct dom0_hypercall_init {
domid_t domain; /* domain to be affected */
- unsigned long mfn; /* machine frame to be initialised */
+ uint64_t mfn; /* machine frame to be initialised */
};
typedef struct dom0_hypercall_init dom0_hypercall_init_t;
DEFINE_XEN_GUEST_HANDLE(dom0_hypercall_init_t);
[-- Attachment #1.2: Type: text/html, Size: 9971 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2006-05-24 23:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1148509900.26460.22.camel@basalt.austin.ibm.com>
2006-05-24 23:08 ` [patch] [1/3] global build configuration file Hollis Blanchard
2006-05-25 16:28 ` [XenPPC] " Hollis Blanchard
[not found] ` <1148511175.26460.35.camel@basalt.austin.ibm.com>
[not found] ` <1148511400.26460.39.camel@basalt.austin.ibm.com>
2006-05-24 23:04 ` Hollis Blanchard [this message]
2006-05-25 15:39 ` [patch] [3/3] dom0_ops explicitly sized types Muli Ben-Yehuda
2006-05-25 19:02 ` Hollis Blanchard
2006-05-26 13:32 ` Muli Ben-Yehuda
2006-05-26 14:28 ` Ian Campbell
2006-05-26 15:30 ` Hollis Blanchard
2006-05-26 16:27 ` Ian Campbell
2006-05-26 17:32 ` Anthony Liguori
2006-05-26 18:21 ` Markus Armbruster
2006-05-26 17:37 ` Hollis Blanchard
2006-05-26 18:57 ` Chris Wright
2006-05-26 19:38 ` John Levon
2006-05-26 19:57 ` Chris Wright
2006-05-27 0:42 ` John Levon
2006-05-24 23:09 ` [patch] [2/3] use new 'xen_pfn_t' type to represent PFNs in the Xen ABI Hollis Blanchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1148511874.26460.47.camel@basalt.austin.ibm.com \
--to=hollisb@us.ibm.com \
--cc=levon@movementarian.org \
--cc=xen-devel@lists.xensource.com \
--cc=xen-ppc-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.