xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dulloor <dulloor@gmail.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 09/11] [PVOPS] Sync xen memory interface
Date: Sun, 4 Apr 2010 15:30:40 -0400	[thread overview]
Message-ID: <y2h940bcfd21004041230rcdbe4f4fh7960d122cbee3f35@mail.gmail.com> (raw)

[-- 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

                 reply	other threads:[~2010-04-04 19:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=y2h940bcfd21004041230rcdbe4f4fh7960d122cbee3f35@mail.gmail.com \
    --to=dulloor@gmail.com \
    --cc=xen-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 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).