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] [PATCH 1 of 5] [PATCH] xen: add arch hook for max_mem hcall

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH 1 of 5] [PATCH] xen: add arch hook for max_mem hcall
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Thu, 01 Mar 2007 13:39:16 -0500
Delivery-date: Thu, 01 Mar 2007 11:38:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1172777955@xxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
4 files changed, 14 insertions(+), 1 deletion(-)
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 ++


# HG changeset patch
# User Ryan Harper <ryanh@xxxxxxxxxx>
# Date 1172776731 21600
# Node ID af8e290682dd2c045fa181d5837ae2d3c97e856c
# Parent  0902dfafca1c9b247556760e451fabd7eb464345
[PATCH] xen: add arch hook for max_mem hcall

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>

diff -r 0902dfafca1c -r af8e290682dd xen/common/domctl.c
--- a/xen/common/domctl.c       Mon Feb 26 15:29:42 2007 -0600
+++ b/xen/common/domctl.c       Thu Mar 01 13:18:51 2007 -0600
@@ -19,6 +19,7 @@
 #include <xen/iocap.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>
@@ -614,6 +615,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 0902dfafca1c -r af8e290682dd xen/include/asm-ia64/shadow.h
--- a/xen/include/asm-ia64/shadow.h     Mon Feb 26 15:29:42 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 0902dfafca1c -r af8e290682dd xen/include/asm-powerpc/shadow.h
--- a/xen/include/asm-powerpc/shadow.h  Mon Feb 26 15:29:42 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 0902dfafca1c -r af8e290682dd xen/include/asm-x86/shadow.h
--- a/xen/include/asm-x86/shadow.h      Mon Feb 26 15:29:42 2007 -0600
+++ b/xen/include/asm-x86/shadow.h      Thu Mar 01 13:18:51 2007 -0600
@@ -460,6 +460,8 @@ gl1e_to_ml1e(struct domain *d, l1_pgentr
     return l1e;
 }
 
+#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