|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] nestedsvm: fix tlb_control
# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1306846550 -3600
# Node ID 01ba8829585cde752916a19bd7c5f677e0dcb921
# Parent 773a6ce557f70ac8505dad52f1fd9f45f37c267a
nestedsvm: fix tlb_control
On VMRUN emulation evaluate the virtual tlb_control only to match
hw behaviour. Deal with l1 guests which use flush-by-asid w/o
checking cpuid bits or fill tlb_control with random data.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
diff -r 773a6ce557f7 -r 01ba8829585c xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c Tue May 31 13:53:54 2011 +0100
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c Tue May 31 13:55:50 2011 +0100
@@ -460,7 +460,7 @@
/* ASID - Emulation handled in hvm_asid_handle_vmenter() */
/* TLB control */
- n2vmcb->tlb_control = n1vmcb->tlb_control | ns_vmcb->tlb_control;
+ n2vmcb->tlb_control = ns_vmcb->tlb_control;
/* Virtual Interrupts */
if (!vcleanbit_set(tpr)) {
@@ -655,7 +655,9 @@
svm->ns_vmcb_guestcr3 = ns_vmcb->_cr3;
svm->ns_vmcb_hostcr3 = ns_vmcb->_h_cr3;
- nv->nv_flushp2m = ns_vmcb->tlb_control;
+ /* Convert explicitely to boolean. Deals with l1 guests
+ * that use flush-by-asid w/o checking the cpuid bits */
+ nv->nv_flushp2m = !!ns_vmcb->tlb_control;
if ( svm->ns_guest_asid != ns_vmcb->_guest_asid )
{
nv->nv_flushp2m = 1;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] nestedsvm: fix tlb_control,
Xen patchbot-unstable <=
|
|
|
|
|