# 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|