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-4.0-testing] x86, shadow: propagate pat caching on

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86, shadow: propagate pat caching on the shadow l1
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2010 00:41:23 -0700
Delivery-date: Fri, 14 May 2010 00:45:53 -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 1273481047 -3600
# Node ID eb8c95e9b91af7f10be5a00e4c70e83c08ee9958
# Parent  454f610e94dd8fe5f37402e783206a54fbdb7243
x86, shadow: propagate pat caching on the shadow l1

PAT caching was only propagated if has_arch_pdevs(),
causing the hvm_get_mem_pinned_cacheattr() to be ignored
in the non passthrough case.
l1_disallow_mask() needs to be relaxed.

Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxx>
xen-unstable changeset:   21236:9a1d7caa2024
xen-unstable date:        Mon Apr 26 12:13:23 2010 +0100
---
 xen/arch/x86/mm.c              |    3 ++-
 xen/arch/x86/mm/shadow/multi.c |   31 +++++++++++++++++--------------
 2 files changed, 19 insertions(+), 15 deletions(-)

diff -r 454f610e94dd -r eb8c95e9b91a xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon May 10 09:43:41 2010 +0100
+++ b/xen/arch/x86/mm.c Mon May 10 09:44:07 2010 +0100
@@ -158,7 +158,8 @@ boolean_param("allowhugepage", opt_allow
     ((d != dom_io) &&                                           \
      (rangeset_is_empty((d)->iomem_caps) &&                     \
       rangeset_is_empty((d)->arch.ioport_caps) &&               \
-      !has_arch_pdevs(d)) ?                                     \
+      !has_arch_pdevs(d) &&                                     \
+      !is_hvm_domain(d)) ?                                      \
      L1_DISALLOW_MASK : (L1_DISALLOW_MASK & ~PAGE_CACHE_ATTRS))
 
 #ifdef __x86_64__
diff -r 454f610e94dd -r eb8c95e9b91a xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Mon May 10 09:43:41 2010 +0100
+++ b/xen/arch/x86/mm/shadow/multi.c    Mon May 10 09:44:07 2010 +0100
@@ -565,7 +565,6 @@ _sh_propagate(struct vcpu *v,
      * caching attributes in the shadows to match what was asked for.
      */
     if ( (level == 1) && is_hvm_domain(d) &&
-         iomem_access_permitted(d, mfn_x(target_mfn), mfn_x(target_mfn) + 1) &&
          !is_xen_heap_mfn(mfn_x(target_mfn)) )
     {
         unsigned int type;
@@ -581,20 +580,24 @@ _sh_propagate(struct vcpu *v,
             sflags |= pat_type_2_pte_flags(type);
         else if ( d->arch.hvm_domain.is_in_uc_mode )
             sflags |= pat_type_2_pte_flags(PAT_TYPE_UNCACHABLE);
-        else if ( p2mt == p2m_mmio_direct )
-            sflags |= get_pat_flags(v,
-                                    gflags,
-                                    gfn_to_paddr(target_gfn),
-                                    ((paddr_t)mfn_x(target_mfn)) << PAGE_SHIFT,
-                                    MTRR_TYPE_UNCACHABLE); 
-        else if ( iommu_snoop )
-            sflags |= pat_type_2_pte_flags(PAT_TYPE_WRBACK);
         else
-            sflags |= get_pat_flags(v,
-                                    gflags,
-                                    gfn_to_paddr(target_gfn),
-                                    ((paddr_t)mfn_x(target_mfn)) << PAGE_SHIFT,
-                                    NO_HARDCODE_MEM_TYPE);
+            if ( iomem_access_permitted(d, mfn_x(target_mfn), 
mfn_x(target_mfn) + 1) )
+            {
+                if ( p2mt == p2m_mmio_direct )
+                    sflags |= get_pat_flags(v,
+                            gflags,
+                            gfn_to_paddr(target_gfn),
+                            ((paddr_t)mfn_x(target_mfn)) << PAGE_SHIFT,
+                            MTRR_TYPE_UNCACHABLE); 
+                else if ( iommu_snoop )
+                    sflags |= pat_type_2_pte_flags(PAT_TYPE_WRBACK);
+                else
+                    sflags |= get_pat_flags(v,
+                            gflags,
+                            gfn_to_paddr(target_gfn),
+                            ((paddr_t)mfn_x(target_mfn)) << PAGE_SHIFT,
+                            NO_HARDCODE_MEM_TYPE);
+            }
     }
 
     // Set the A&D bits for higher level shadows.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] x86, shadow: propagate pat caching on the shadow l1, Xen patchbot-4.0-testing <=