diff options
author | Ladi Prosek <lprosek@redhat.com> | 2017-09-22 07:53:15 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-09-22 10:41:32 +0200 |
commit | 44889942b6eb356eab27ce25fe10701adfec7776 (patch) | |
tree | b2d5d75ddc6633a2f189da17b4b2da1de2ef4c01 /lib/dma-debug.c | |
parent | 5753743fa5108b8f98bd61e40dc63f641b26c768 (diff) |
KVM: nVMX: fix HOST_CR3/HOST_CR4 cache
For nested virt we maintain multiple VMCS that can run on a vCPU. So it is
incorrect to keep vmcs_host_cr3 and vmcs_host_cr4, whose purpose is caching
the value of the rarely changing HOST_CR3 and HOST_CR4 VMCS fields, in
vCPU-wide data structures.
Hyper-V nested on KVM runs into this consistently for me with PCID enabled.
CR3 is updated with a new value, unlikely(cr3 != vmx->host_state.vmcs_host_cr3)
fires, and the currently loaded VMCS is updated. Then we switch from L2 to
L1 and the next exit reverts CR3 to its old value.
Fixes: d6e41f1151fe ("x86/mm, KVM: Teach KVM's VMX code that CR3 isn't a constant")
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'lib/dma-debug.c')
0 files changed, 0 insertions, 0 deletions