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] [RFC][PATCH] 2/5] [POWERPC] Use the PFN decoration for the xent

To: XenPPC-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [XenPPC] [RFC][PATCH] 2/5] [POWERPC] Use the PFN decoration for the xentrace page(s).
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Nov 2006 13:36:01 +1100
Delivery-date: Thu, 23 Nov 2006 18:41:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1164335761.320976.914870705193.qpush@thor>
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
Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
---

 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel