|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
[XenPPC] [RFC][PATCH] 1/5] [POWERPC] Introduce a PFN decoration.
This bit can be OR'ed into a MFN, to allow dom0 to map it.
Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
---
xen/arch/powerpc/mm.c | 5 ++++-
xen/include/asm-powerpc/mm.h | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
Index: xenppc-unstable.hg.working/xen/arch/powerpc/mm.c
===================================================================
--- xenppc-unstable.hg.working.orig/xen/arch/powerpc/mm.c
+++ xenppc-unstable.hg.working/xen/arch/powerpc/mm.c
@@ -408,7 +408,10 @@ ulong pfn2mfn(struct domain *d, ulong pf
ulong foreign_map_pfn = 1UL << cpu_foreign_map_order();
/* quick tests first */
- if (pfn & foreign_map_pfn) {
+ if (pfn & PFN_DECOR) {
+ /* FIXME: Better PFN_TYPE: PFN_TYPE_XEN? */
+ mfn = pfn & ~(PFN_DECOR);
+ } else if (pfn & foreign_map_pfn) {
t = PFN_TYPE_FOREIGN;
mfn = foreign_to_mfn(d, pfn);
} else if (pfn >= max_page && pfn < (max_page + NR_GRANT_FRAMES)) {
Index: xenppc-unstable.hg.working/xen/include/asm-powerpc/mm.h
===================================================================
--- xenppc-unstable.hg.working.orig/xen/include/asm-powerpc/mm.h
+++ xenppc-unstable.hg.working/xen/include/asm-powerpc/mm.h
@@ -246,6 +246,9 @@ extern unsigned long paddr_to_maddr(unsi
#define PFN_TYPE_FOREIGN 4
#define PFN_TYPE_GNTTAB 5
+/* Or'd into xenheap MFNs to ensure dom0 can access these pages */
+#define PFN_DECOR (1<<31)
+
extern ulong pfn2mfn(struct domain *d, ulong pfn, int *type);
static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn)
{
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|
|
|
|
|