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: Fri, 02 Mar 2007 15:10:25 -0800
Delivery-date: Fri, 02 Mar 2007 15:53:12 -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 bd0b97a569fe9f5c99c2015380b6c0f0825f6ca3
# Parent  3629517371f005789b1b038efc93ea49b6d4fa78
[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 3629517371f0 -r bd0b97a569fe 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
@@ -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 3629517371f0 -r bd0b97a569fe 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 3629517371f0 -r bd0b97a569fe 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 3629517371f0 -r bd0b97a569fe 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
@@ -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

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