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-3.1-testing] x86, hvm: Flush local TLB after any ch

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] x86, hvm: Flush local TLB after any change to linear pagetable
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Oct 2007 16:00:20 -0700
Delivery-date: Tue, 30 Oct 2007 16:00:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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@xxxxxxxxxxxxx>
# Date 1193761220 0
# Node ID 3ce0fb37cf590c9fc185d701691203ebd4feb296
# Parent  f983730bfc809f768506fbbb27b0c5a5ec3ea626
x86, hvm: Flush local TLB after any change to linear pagetable
mapping.

This was not needed when vmenter/vmexit always had the side effect of
flushing host TLBs.

But, with SVM ASIDs, it is possible to:
 (1) Update CR3 update,
 (2) vmenter the guest, and
 (3) and vmexit due to a page fault
all without an intervening host TLB flush.

Then the page fault code could use the linear pagetable
to read a top-level shadow page table entry.

But, without this change, it would fetch the wrong value
due to a stale TLB.

Signed-off-by: Robert Phillips <rphillips@xxxxxxxxxxxxxxx>
Signed-off-by: Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
xen-unstable changeset:   16275:9379c83e14b5b0a9ab2fe627ed786a8abded0d38
xen-unstable date:        Tue Oct 30 16:15:17 2007 +0000
---
 xen/arch/x86/mm/shadow/multi.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

diff -r f983730bfc80 -r 3ce0fb37cf59 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Thu Oct 25 09:46:36 2007 +0100
+++ b/xen/arch/x86/mm/shadow/multi.c    Tue Oct 30 16:20:20 2007 +0000
@@ -3351,6 +3351,21 @@ sh_update_linear_entries(struct vcpu *v)
 #else
 #error this should not happen
 #endif
+
+    if ( shadow_mode_external(d) )
+    {
+        /*
+         * Having modified the linear pagetable mapping, flush local host TLBs.
+         * This was not needed when vmenter/vmexit always had the side effect
+         * of flushing host TLBs but, with ASIDs, it is possible to finish 
+         * this CR3 update, vmenter the guest, vmexit due to a page fault, 
+         * without an intervening host TLB flush. Then the page fault code 
+         * could use the linear pagetable to read a top-level shadow page 
+         * table entry. But, without this change, it would fetch the wrong 
+         * value due to a stale TLB.
+         */
+        local_flush_tlb();
+    }
 }
 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] x86, hvm: Flush local TLB after any change to linear pagetable, Xen patchbot-3.1-testing <=