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-changelog

[Xen-changelog] [xen-unstable] x86 hap: clean up the definition of hap_e

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hap: clean up the definition of hap_enabled().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Jun 2010 00:15:14 -0700
Delivery-date: Wed, 16 Jun 2010 00:15:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1276598146 -3600
# Node ID 17354054a6e3a65d5c3e7dc32c45f9b885bb0d11
# Parent  fec9666c216b04bcd3daaa9ed82eeb28270304d4
x86 hap: clean up the definition of hap_enabled().

Actually when hvm_domain.hap_enabled is true, it is already a hvm
domain.

Signed-off-by: Xin Li <xin.li@xxxxxxxxx>
---
 xen/arch/x86/mm/hap/p2m-ept.c    |    2 +-
 xen/arch/x86/mm/mem_sharing.c    |    7 ++-----
 xen/arch/x86/mm/p2m.c            |    3 +--
 xen/arch/x86/mm/paging.c         |    2 --
 xen/include/asm-x86/hvm/domain.h |    2 ++
 5 files changed, 6 insertions(+), 10 deletions(-)

diff -r fec9666c216b -r 17354054a6e3 xen/arch/x86/mm/hap/p2m-ept.c
--- a/xen/arch/x86/mm/hap/p2m-ept.c     Tue Jun 15 11:34:13 2010 +0100
+++ b/xen/arch/x86/mm/hap/p2m-ept.c     Tue Jun 15 11:35:46 2010 +0100
@@ -704,7 +704,7 @@ static void ept_dump_p2m_table(unsigned 
 
     for_each_domain(d)
     {
-        if ( !(is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled) )
+        if ( !hap_enabled(d) )
             continue;
 
         p2m = p2m_get_hostp2m(d);
diff -r fec9666c216b -r 17354054a6e3 xen/arch/x86/mm/mem_sharing.c
--- a/xen/arch/x86/mm/mem_sharing.c     Tue Jun 15 11:34:13 2010 +0100
+++ b/xen/arch/x86/mm/mem_sharing.c     Tue Jun 15 11:35:46 2010 +0100
@@ -32,7 +32,7 @@
 #include <xen/sched.h>
 
 /* Auditing of memory sharing code? */
-#define MEM_SHARING_AUDIT  0 
+#define MEM_SHARING_AUDIT  0
 
 #if MEM_SHARING_AUDIT
 static void mem_sharing_audit(void);
@@ -42,12 +42,9 @@ static void mem_sharing_audit(void);
 # define mem_sharing_audit() do {} while(0)
 #endif /* MEM_SHARING_AUDIT */
 
-
-#define hap_enabled(d) \
-    (is_hvm_domain(d) && paging_mode_hap(d))
 #define mem_sharing_enabled(d) \
     (is_hvm_domain(d) && (d)->arch.hvm_domain.mem_sharing_enabled)
- 
+
 #undef mfn_to_page
 #define mfn_to_page(_m) __mfn_to_page(mfn_x(_m))
 #undef mfn_valid
diff -r fec9666c216b -r 17354054a6e3 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Tue Jun 15 11:34:13 2010 +0100
+++ b/xen/arch/x86/mm/p2m.c     Tue Jun 15 11:35:46 2010 +0100
@@ -1729,8 +1729,7 @@ int p2m_init(struct domain *d)
     p2m->get_entry_current = p2m_gfn_to_mfn_current;
     p2m->change_entry_type_global = p2m_change_type_global;
 
-    if ( is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled &&
-         (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) )
+    if ( hap_enabled(d) && (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) )
         ept_p2m_init(d);
 
     return 0;
diff -r fec9666c216b -r 17354054a6e3 xen/arch/x86/mm/paging.c
--- a/xen/arch/x86/mm/paging.c  Tue Jun 15 11:34:13 2010 +0100
+++ b/xen/arch/x86/mm/paging.c  Tue Jun 15 11:35:46 2010 +0100
@@ -28,8 +28,6 @@
 #include <asm/guest_access.h>
 #include <xen/numa.h>
 #include <xsm/xsm.h>
-
-#define hap_enabled(d) (is_hvm_domain(d) && (d)->arch.hvm_domain.hap_enabled)
 
 /* Printouts */
 #define PAGING_PRINTK(_f, _a...)                                     \
diff -r fec9666c216b -r 17354054a6e3 xen/include/asm-x86/hvm/domain.h
--- a/xen/include/asm-x86/hvm/domain.h  Tue Jun 15 11:34:13 2010 +0100
+++ b/xen/include/asm-x86/hvm/domain.h  Tue Jun 15 11:35:46 2010 +0100
@@ -98,5 +98,7 @@ struct hvm_domain {
     };
 };
 
+#define hap_enabled(d)  ((d)->arch.hvm_domain.hap_enabled)
+
 #endif /* __ASM_X86_HVM_DOMAIN_H__ */
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 hap: clean up the definition of hap_enabled()., Xen patchbot-unstable <=