Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
---

 xen/arch/powerpc/mm.c |   10 +++++++++-
 xen/common/trace.c    |   13 +++++++++----
 2 files changed, 18 insertions(+), 5 deletions(-)

Index: xenppc-unstable.hg.working/xen/common/trace.c
===================================================================
--- xenppc-unstable.hg.working.orig/xen/common/trace.c
+++ xenppc-unstable.hg.working/xen/common/trace.c
@@ -182,10 +182,15 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc
     switch ( tbc->cmd )
     {
     case XEN_SYSCTL_TBUFOP_get_info:
-        tbc->evt_mask   = tb_event_mask;
-        tbc->buffer_mfn = opt_tbuf_size ? virt_to_mfn(per_cpu(t_bufs, 0)) : 0;
-        tbc->size       = opt_tbuf_size * PAGE_SIZE;
-        break;
+        {
+             unsigned long mfn;
+             mfn = opt_tbuf_size ? PFN_DECOR | virt_to_mfn(per_cpu(t_bufs, 0))
+                                 : 0;
+             tbc->evt_mask   = tb_event_mask;
+             tbc->buffer_mfn = mfn;
+             tbc->size       = opt_tbuf_size * PAGE_SIZE;
+             break;
+        }
     case XEN_SYSCTL_TBUFOP_set_cpu_mask:
         xenctl_cpumap_to_cpumask(&tb_cpu_mask, &tbc->cpu_mask);
         break;
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
@@ -28,6 +28,7 @@
 #include <asm/init.h>
 #include <asm/page.h>
 #include <asm/string.h>
+#include <xen/domain.h>
 
 #ifdef VERBOSE
 #define MEM_LOG(_f, _a...)                                  \
@@ -91,7 +92,14 @@ void share_xen_page_with_guest(
 void share_xen_page_with_privileged_guests(
     struct page_info *page, int readonly)
 {
-        unimplemented();
+    struct domain *d;
+
+    /* FIXME: This shouldn't be allowed to fail */
+    d = find_domain_by_id((domid_t) 0);
+    if (!d)
+        return;
+
+    share_xen_page_with_guest(page, d, readonly);
 }
 
 static ulong foreign_to_mfn(struct domain *d, ulong pfn)


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

Reply via email to