* [PATCH 09/11] [PVOPS] Sync xen memory interface
@ 2010-04-04 19:30 Dulloor
0 siblings, 0 replies; only message in thread
From: Dulloor @ 2010-04-04 19:30 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 123 bytes --]
The patch just syncs the memory interface file for linux pvops.
-dulloor
Signed-off-by: Dulloor Rao <dulloor@gatech.edu>
[-- Attachment #2: linux-01-sync-interface.patch --]
[-- Type: text/x-patch, Size: 3900 bytes --]
diff --git a/arch/ia64/xen/grant-table.c b/arch/ia64/xen/grant-table.c
index 777dd9a..8bdc7a9 100644
--- a/arch/ia64/xen/grant-table.c
+++ b/arch/ia64/xen/grant-table.c
@@ -77,7 +77,7 @@ void xen_free_vm_area(struct vm_struct *area)
unsigned long gpfn = (phys_addr >> PAGE_SHIFT) + i;
struct xen_memory_reservation reservation = {
.nr_extents = 1,
- .address_bits = 0,
+ .mem_flags = 0,
.extent_order = 0,
.domid = DOMID_SELF
};
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index ba4fb57..248fc4f 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -2307,7 +2307,7 @@ static int xen_exchange_memory(unsigned long extents_in, unsigned int order_in,
.nr_extents = extents_out,
.extent_order = order_out,
.extent_start = mfns_out,
- .address_bits = address_bits,
+ .mem_flags = address_bits,
.domid = DOMID_SELF
}
};
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 3c16973..df3e84c 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -39,7 +39,7 @@ static unsigned long __init xen_release_chunk(phys_addr_t start_addr,
phys_addr_t end_addr)
{
struct xen_memory_reservation reservation = {
- .address_bits = 0,
+ .mem_flags = 0,
.extent_order = 0,
.domid = DOMID_SELF
};
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index d7c0eae..bd7a398 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -133,7 +133,7 @@ static void free_discontig_frame(void)
{
int rc;
struct xen_memory_reservation reservation = {
- .address_bits = 0,
+ .mem_flags = 0,
.domid = DOMID_SELF,
.nr_extents = balloon_npages,
.extent_order = 0
@@ -234,7 +234,7 @@ static int increase_reservation(unsigned long nr_pages)
struct page *page;
long rc;
struct xen_memory_reservation reservation = {
- .address_bits = 0,
+ .mem_flags = 0,
.domid = DOMID_SELF
};
@@ -303,7 +303,7 @@ static int decrease_reservation(unsigned long nr_pages)
int discontig, discontig_free;
int ret;
struct xen_memory_reservation reservation = {
- .address_bits = 0,
+ .mem_flags = 0,
.domid = DOMID_SELF
};
diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h
index eac3ce1..32ab005 100644
--- a/include/xen/interface/memory.h
+++ b/include/xen/interface/memory.h
@@ -19,6 +19,23 @@
#define XENMEM_increase_reservation 0
#define XENMEM_decrease_reservation 1
#define XENMEM_populate_physmap 6
+
+/*
+ * Maximum # bits addressable by the user of the allocated region (e.g., I/O
+ * devices often have a 32-bit limitation even in 64-bit systems). If zero
+ * then the user has no addressing restriction. This field is not used by
+ * XENMEM_decrease_reservation.
+ */
+#define XENMEMF_address_bits(x) (x)
+#define XENMEMF_get_address_bits(x) ((x) & 0xffu)
+/* NUMA node to allocate from. */
+#define XENMEMF_node(x) (((x) + 1) << 8)
+#define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
+/* Flag to populate physmap with populate-on-demand entries */
+#define XENMEMF_populate_on_demand (1<<16)
+#define XENMEMF_exact_node_request (1 << 17)
+#define XENMEMF_exact_node(n) (XENMEMF_node(n) | XENMEMF_exact_node_request)
+
struct xen_memory_reservation {
/*
@@ -37,13 +54,8 @@ struct xen_memory_reservation {
unsigned long nr_extents;
unsigned int extent_order;
- /*
- * Maximum # bits addressable by the user of the allocated region (e.g.,
- * I/O devices often have a 32-bit limitation even in 64-bit systems). If
- * zero then the user has no addressing restriction.
- * This field is not used by XENMEM_decrease_reservation.
- */
- unsigned int address_bits;
+ /* XENMEMF flags. */
+ unsigned int mem_flags; /* previously called address_bits */
/*
* Domain whose reservation is being changed.
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-04 19:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-04 19:30 [PATCH 09/11] [PVOPS] Sync xen memory interface Dulloor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).