[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.1-testing] x86, hvm: Flush local TLB after any change to linear pagetable
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |