WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [xenppc-unstable] [XEN] Add arch hook for max_mem domctl.

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [XEN] Add arch hook for max_mem domctl.
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 03 Mar 2007 02:47:18 -0800
Delivery-date: Mon, 05 Mar 2007 05:43:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1172776731 21600
# Node ID 9f49a53fea30a031d3cc6315cfcbcc330b2464d1
# Parent  6b42b8c08731d7bc1abedac2239707e14ae8599d
[XEN] Add arch hook for max_mem domctl.

This patch introduces an arch hook in the MAX_MEM hcall. In particular, PowerPC
will use this hook to create/update a p2m mapping array. This patch introduces
the hook only and should compile away on all arches.

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/common/domctl.c              |    4 ++++
 xen/include/asm-ia64/shadow.h    |    2 ++
 xen/include/asm-powerpc/shadow.h |    7 ++++++-
 xen/include/asm-x86/shadow.h     |    2 ++
 4 files changed, 14 insertions(+), 1 deletion(-)

diff -r 6b42b8c08731 -r 9f49a53fea30 xen/common/domctl.c
--- a/xen/common/domctl.c       Thu Mar 01 14:32:58 2007 -0600
+++ b/xen/common/domctl.c       Thu Mar 01 13:18:51 2007 -0600
@@ -20,6 +20,7 @@
 #include <xen/rcupdate.h>
 #include <xen/guest_access.h>
 #include <xen/bitmap.h>
+#include <xen/shadow.h>
 #include <asm/current.h>
 #include <public/domctl.h>
 #include <acm/acm_hooks.h>
@@ -608,6 +609,9 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
         spin_lock(&d->page_alloc_lock);
         if ( new_max >= d->tot_pages )
         {
+            ret = guest_physmap_max_mem_pages(d, new_max);
+            if ( ret != 0 )
+                break;
             d->max_pages = new_max;
             ret = 0;
         }
diff -r 6b42b8c08731 -r 9f49a53fea30 xen/include/asm-ia64/shadow.h
--- a/xen/include/asm-ia64/shadow.h     Thu Mar 01 14:32:58 2007 -0600
+++ b/xen/include/asm-ia64/shadow.h     Thu Mar 01 13:18:51 2007 -0600
@@ -61,6 +61,8 @@ shadow_mark_page_dirty(struct domain *d,
         return 0;
 }
 
+#define guest_physmap_max_mem_pages(d, n) (0)
+
 #endif // _XEN_SHADOW_H
 
 /*
diff -r 6b42b8c08731 -r 9f49a53fea30 xen/include/asm-powerpc/shadow.h
--- a/xen/include/asm-powerpc/shadow.h  Thu Mar 01 14:32:58 2007 -0600
+++ b/xen/include/asm-powerpc/shadow.h  Thu Mar 01 13:18:51 2007 -0600
@@ -13,9 +13,10 @@
  * along with this program; if not, write to the Free Software
  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
- * Copyright (C) IBM Corp. 2005, 2006
+ * Copyright IBM Corp. 2005, 2006, 2007
  *
  * Authors: Hollis Blanchard <hollisb@xxxxxxxxxx>
+ *          Ryan Harper <ryanh@xxxxxxxxxx>
  */
 
 #ifndef _ASM_SHADOW_H_
@@ -58,4 +59,8 @@ static inline unsigned int shadow_get_al
 {
     return (1ULL << (d->arch.htab.order + PAGE_SHIFT)) >> 20;
 }
+
+#define guest_physmap_max_mem_pages(d, n) (0)
+
 #endif
+
diff -r 6b42b8c08731 -r 9f49a53fea30 xen/include/asm-x86/shadow.h
--- a/xen/include/asm-x86/shadow.h      Thu Mar 01 14:32:58 2007 -0600
+++ b/xen/include/asm-x86/shadow.h      Thu Mar 01 13:18:51 2007 -0600
@@ -121,6 +121,8 @@ static inline void shadow_remove_all_sha
     sh_remove_shadows(v, gmfn, 0 /* Be thorough */, 1 /* Must succeed */);
 }
 
+#define guest_physmap_max_mem_pages(d, n) (0)
+
 #endif /* _XEN_SHADOW_H */
 
 /*

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>