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 EPT: Only flush EPT TLB if the pre

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86 EPT: Only flush EPT TLB if the previous entry was valid
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Jun 2010 02:45:19 -0700
Delivery-date: Wed, 02 Jun 2010 02:46:17 -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 1274858891 -3600
# Node ID 2758a8028721c84e5349405b4f0984b065738c22
# Parent  aa5ae409b1794108274e36c344f4e394e14184ee
x86 EPT: Only flush EPT TLB if the previous entry was valid

Original patch from George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
xen-unstable changeset:   21455:32cdd423d4eb
xen-unstable date:        Wed May 26 08:08:46 2010 +0100
---
 xen/arch/x86/mm/hap/p2m-ept.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)

diff -r aa5ae409b179 -r 2758a8028721 xen/arch/x86/mm/hap/p2m-ept.c
--- a/xen/arch/x86/mm/hap/p2m-ept.c     Wed May 26 08:26:38 2010 +0100
+++ b/xen/arch/x86/mm/hap/p2m-ept.c     Wed May 26 08:28:11 2010 +0100
@@ -187,6 +187,7 @@ ept_set_entry(struct domain *d, unsigned
     int direct_mmio = (p2mt == p2m_mmio_direct);
     uint8_t ipat = 0;
     int need_modify_vtd_table = 1;
+    int needs_sync = 1;
 
     /* We only support 4k and 2m pages now */
     BUG_ON(order && order != EPT_TABLE_ORDER);
@@ -223,6 +224,11 @@ ept_set_entry(struct domain *d, unsigned
     if ( i == walk_level )
     {
         /* We reached the level we're looking for */
+
+        /* No need to flush if the old entry wasn't valid */
+        if ( !(ept_entry->epte & 7) )
+            needs_sync = 0;
+
         if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
              (p2mt == p2m_ram_paging_in_start) )
         {
@@ -333,7 +339,8 @@ out:
 out:
     unmap_domain_page(table);
 
-    ept_sync_domain(d);
+    if ( needs_sync )
+        ept_sync_domain(d);
 
     /* Now the p2m table is not shared with vt-d page table */
     if ( iommu_enabled && need_iommu(d) && need_modify_vtd_table )

_______________________________________________
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 EPT: Only flush EPT TLB if the previous entry was valid, Xen patchbot-4.0-testing <=