Skip to contentSkip to conversation

Nested VMX: Flush TLBs and Caches if paging mode changed

PATCH In review Yang Zhang 2 participants 2 messages Aug 6, 2013

lore
Share & tools
lore

Yang Zhang

author
#0 lore raw

PATCH 1/1 Nested VMX: Flush TLBs and Caches if paging mode changed

From: Yang Zhang <[email protected]>

According to SDM, if paging mode is changed, then whole TLBs and caches will be flushed. This is missed in nested handle logic. Also this fixed the issue that 64 bits windows cannot boot up on top of L1 kvm.

---
 xen/arch/x86/mm/paging.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
xen/arch/x86/mm/paging.c +1 -0
index cd08b2a..4ba7669 100644
@@ -709,6 +709,7 @@ void paging_update_nestedmode(struct vcpu *v)
     else
         /* TODO: shadow-on-shadow */
         v->arch.paging.nestedmode = NULL;
+    hvm_asid_flush_vcpu(v);
 }
 
 void paging_write_p2m_entry(struct p2m_domain *p2m, unsigned long gfn,
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Yang Zhang

From: Yang Zhang <[email protected]>

According to SDM, if paging mode is changed, then whole TLBs and caches will be flushed. This is missed in nested handle logic. Also this fixed the issue that 64 bits windows cannot boot up on top of L1 kvm.

Quoted 16 lines
---
 xen/arch/x86/mm/paging.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
xen/arch/x86/mm/paging.c +1 -0
index cd08b2a..4ba7669 100644
@@ -709,6 +709,7 @@ void paging_update_nestedmode(struct vcpu *v)
     else
         /* TODO: shadow-on-shadow */
         v->arch.paging.nestedmode = NULL;
+    hvm_asid_flush_vcpu(v);
 }
 
 void paging_write_p2m_entry(struct p2m_domain *p2m, unsigned long gfn,