[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.1-testing] [XEN] replace shadow_* with paging_* in common code



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1191418658 -3600
# Node ID 74b05c391535124065ac99b4d09065f2afa7c7d4
# Parent  7c6a474317e833a885e1c1b8dfb4d894104c8b85
[XEN] replace shadow_* with paging_* in common code
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
xen-unstable changeset:   15628:3c28bc13a3f82032c6171825629d9be754075da5
xen-unstable date:        Fri Jul 20 11:36:36 2007 +0100
---
 xen/include/xen/shadow.h     |   23 -----------------------
 xen/common/compat/kernel.c   |    1 -
 xen/common/domctl.c          |    1 -
 xen/common/grant_table.c     |    1 -
 xen/common/kernel.c          |    4 ++--
 xen/common/keyhandler.c      |    1 -
 xen/common/memory.c          |    8 ++++----
 xen/common/page_alloc.c      |    2 +-
 xen/common/xenoprof.c        |    6 +++---
 xen/include/asm-x86/config.h |    2 +-
 xen/include/xen/paging.h     |   26 ++++++++++++++++++++++++++
 11 files changed, 37 insertions(+), 38 deletions(-)

diff -r 7c6a474317e8 -r 74b05c391535 xen/common/compat/kernel.c
--- a/xen/common/compat/kernel.c        Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/compat/kernel.c        Wed Oct 03 14:37:38 2007 +0100
@@ -8,7 +8,6 @@
 #include <xen/errno.h>
 #include <xen/version.h>
 #include <xen/sched.h>
-#include <xen/shadow.h>
 #include <xen/nmi.h>
 #include <xen/guest_access.h>
 #include <asm/current.h>
diff -r 7c6a474317e8 -r 74b05c391535 xen/common/domctl.c
--- a/xen/common/domctl.c       Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/domctl.c       Wed Oct 03 14:37:38 2007 +0100
@@ -20,7 +20,6 @@
 #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>
diff -r 7c6a474317e8 -r 74b05c391535 xen/common/grant_table.c
--- a/xen/common/grant_table.c  Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/grant_table.c  Wed Oct 03 14:37:38 2007 +0100
@@ -28,7 +28,6 @@
 #include <xen/iocap.h>
 #include <xen/lib.h>
 #include <xen/sched.h>
-#include <xen/shadow.h>
 #include <xen/mm.h>
 #include <xen/trace.h>
 #include <xen/guest_access.h>
diff -r 7c6a474317e8 -r 74b05c391535 xen/common/kernel.c
--- a/xen/common/kernel.c       Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/kernel.c       Wed Oct 03 14:37:38 2007 +0100
@@ -10,7 +10,7 @@
 #include <xen/errno.h>
 #include <xen/version.h>
 #include <xen/sched.h>
-#include <xen/shadow.h>
+#include <xen/paging.h>
 #include <xen/nmi.h>
 #include <xen/guest_access.h>
 #include <asm/current.h>
@@ -211,7 +211,7 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
             fi.submap = 0;
             if ( VM_ASSIST(d, VMASST_TYPE_pae_extended_cr3) )
                 fi.submap |= (1U << XENFEAT_pae_pgdir_above_4gb);
-            if ( shadow_mode_translate(current->domain) )
+            if ( paging_mode_translate(current->domain) )
                 fi.submap |= 
                     (1U << XENFEAT_writable_page_tables) |
                     (1U << XENFEAT_auto_translated_physmap);
diff -r 7c6a474317e8 -r 74b05c391535 xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/keyhandler.c   Wed Oct 03 14:37:38 2007 +0100
@@ -14,7 +14,6 @@
 #include <xen/rangeset.h>
 #include <xen/compat.h>
 #include <asm/debugger.h>
-#include <asm/shadow.h>
 #include <asm/div64.h>
 
 #define KEY_MAX 256
diff -r 7c6a474317e8 -r 74b05c391535 xen/common/memory.c
--- a/xen/common/memory.c       Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/memory.c       Wed Oct 03 14:37:38 2007 +0100
@@ -14,7 +14,7 @@
 #include <xen/perfc.h>
 #include <xen/sched.h>
 #include <xen/event.h>
-#include <xen/shadow.h>
+#include <xen/paging.h>
 #include <xen/iocap.h>
 #include <xen/guest_access.h>
 #include <xen/hypercall.h>
@@ -127,7 +127,7 @@ static void populate_physmap(struct memo
 
         mfn = page_to_mfn(page);
 
-        if ( unlikely(shadow_mode_translate(d)) )
+        if ( unlikely(paging_mode_translate(d)) )
         {
             for ( j = 0; j < (1 << a->extent_order); j++ )
                 guest_physmap_add_page(d, gpfn + j, mfn + j);
@@ -236,7 +236,7 @@ static long translate_gpfn_list(
     if ( (d = rcu_lock_domain_by_id(op.domid)) == NULL )
         return -ESRCH;
 
-    if ( !shadow_mode_translate(d) )
+    if ( !paging_mode_translate(d) )
     {
         rcu_unlock_domain(d);
         return -EINVAL;
@@ -434,7 +434,7 @@ static long memory_exchange(XEN_GUEST_HA
                 &gpfn, exch.out.extent_start, (i<<out_chunk_order)+j, 1);
 
             mfn = page_to_mfn(page);
-            if ( unlikely(shadow_mode_translate(d)) )
+            if ( unlikely(paging_mode_translate(d)) )
             {
                 for ( k = 0; k < (1UL << exch.out.extent_order); k++ )
                     guest_physmap_add_page(d, gpfn + k, mfn + k);
diff -r 7c6a474317e8 -r 74b05c391535 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/page_alloc.c   Wed Oct 03 14:37:38 2007 +0100
@@ -30,13 +30,13 @@
 #include <xen/mm.h>
 #include <xen/irq.h>
 #include <xen/softirq.h>
-#include <xen/shadow.h>
 #include <xen/domain_page.h>
 #include <xen/keyhandler.h>
 #include <xen/perfc.h>
 #include <xen/numa.h>
 #include <xen/nodemask.h>
 #include <asm/page.h>
+#include <asm/flushtlb.h>
 
 /*
  * Comma-separated list of hexadecimal page numbers containing bad bytes.
diff -r 7c6a474317e8 -r 74b05c391535 xen/common/xenoprof.c
--- a/xen/common/xenoprof.c     Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/common/xenoprof.c     Wed Oct 03 14:37:38 2007 +0100
@@ -13,7 +13,7 @@
 #include <xen/guest_access.h>
 #include <xen/sched.h>
 #include <public/xenoprof.h>
-#include <asm/shadow.h>
+#include <xen/paging.h>
 
 /* Limit amount of pages used for shared buffer (per domain) */
 #define MAX_OPROF_SHARED_PAGES 32
@@ -397,7 +397,7 @@ static int add_passive_list(XEN_GUEST_HA
     d->xenoprof->domain_type = XENOPROF_DOMAIN_PASSIVE;
     passive.nbuf = d->xenoprof->nbuf;
     passive.bufsize = d->xenoprof->bufsize;
-    if ( !shadow_mode_translate(current->domain) )
+    if ( !paging_mode_translate(current->domain) )
         passive.buf_gmaddr = __pa(d->xenoprof->rawbuf);
     else
         xenoprof_shared_gmfn_with_guest(
@@ -598,7 +598,7 @@ static int xenoprof_op_get_buffer(XEN_GU
         
     xenoprof_get_buffer.nbuf = d->xenoprof->nbuf;
     xenoprof_get_buffer.bufsize = d->xenoprof->bufsize;
-    if ( !shadow_mode_translate(d) )
+    if ( !paging_mode_translate(d) )
         xenoprof_get_buffer.buf_gmaddr = __pa(d->xenoprof->rawbuf);
     else
         xenoprof_shared_gmfn_with_guest(
diff -r 7c6a474317e8 -r 74b05c391535 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Wed Oct 03 14:36:48 2007 +0100
+++ b/xen/include/asm-x86/config.h      Wed Oct 03 14:37:38 2007 +0100
@@ -17,7 +17,7 @@
 
 #define CONFIG_X86 1
 #define CONFIG_X86_HT 1
-#define CONFIG_SHADOW 1
+#define CONFIG_PAGING_ASSISTANCE 1
 #define CONFIG_SMP 1
 #define CONFIG_X86_LOCAL_APIC 1
 #define CONFIG_X86_GOOD_APIC 1
diff -r 7c6a474317e8 -r 74b05c391535 xen/include/xen/paging.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/xen/paging.h  Wed Oct 03 14:37:38 2007 +0100
@@ -0,0 +1,26 @@
+
+#ifndef __XEN_PAGING_H__
+#define __XEN_PAGING_H__
+
+#include <xen/config.h>
+
+#if defined CONFIG_PAGING_ASSISTANCE
+
+#include <asm/paging.h>
+#include <asm/p2m.h>
+
+#elif defined CONFIG_SHADOW
+
+#include <asm/shadow.h>
+
+#define paging_mode_translate(d)  shadow_mode_translate(d)
+
+#else
+
+#define paging_mode_translate(d)              (0)
+#define guest_physmap_add_page(d, p, m)       ((void)0)
+#define guest_physmap_remove_page(d, p, m)    ((void)0)
+
+#endif
+
+#endif /* __XEN_PAGING_H__ */
diff -r 7c6a474317e8 -r 74b05c391535 xen/include/xen/shadow.h
--- a/xen/include/xen/shadow.h  Wed Oct 03 14:36:48 2007 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-
-#ifndef __XEN_SHADOW_H__
-#define __XEN_SHADOW_H__
-
-#include <xen/config.h>
-
-#ifdef CONFIG_SHADOW
-
-#include <asm/shadow.h>
-
-#else
-
-#define shadow_drop_references(d, p)          ((void)0)
-#define shadow_sync_and_drop_references(d, p) ((void)0)
-
-#define shadow_mode_translate(d)              (0)
-
-#define guest_physmap_add_page(d, p, m)       ((void)0)
-#define guest_physmap_remove_page(d, p, m)    ((void)0)
-
-#endif
-
-#endif /* __XEN_SHADOW_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.