linux_dsm_epyc7002/arch/x86/kvm/vmx
Jim Mattson b119019847 kvm: nVMX: Remove unnecessary sync_roots from handle_invept
When L0 is executing handle_invept(), the TDP MMU is active. Emulating
an L1 INVEPT does require synchronizing the appropriate shadow EPT
root(s), but a call to kvm_mmu_sync_roots in this context won't do
that. Similarly, the hardware TLB and paging-structure-cache entries
associated with the appropriate shadow EPT root(s) must be flushed,
but requesting a TLB_FLUSH from this context won't do that either.

How did this ever work? KVM always does a sync_roots and TLB flush (in
the correct context) when transitioning from L1 to L2. That isn't the
best choice for nested VM performance, but it effectively papers over
the mistakes here.

Remove the unnecessary operations and leave a comment to try to do
better in the future.

Reported-by: Junaid Shahid <junaids@google.com>
Fixes: bfd0a56b90 ("nEPT: Nested INVEPT")
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Nadav Har'El <nyh@il.ibm.com>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: Xinhao Xu <xinhao.xu@intel.com>
Cc: Yang Zhang <yang.z.zhang@Intel.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by Peter Shier <pshier@google.com>
Reviewed-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-07-02 19:01:56 +02:00
..
capabilities.h KVM: VMX: Include architectural defs header in capabilities.h 2019-04-30 21:32:21 +02:00
evmcs.c x86/kvm/nVMX: fix VMCLEAR when Enlightened VMCS is in use 2019-07-02 18:56:00 +02:00
evmcs.h x86/kvm/nVMX: fix VMCLEAR when Enlightened VMCS is in use 2019-07-02 18:56:00 +02:00
nested.c kvm: nVMX: Remove unnecessary sync_roots from handle_invept 2019-07-02 19:01:56 +02:00
nested.h KVM: nVMX: Use descriptive names for VMCS sync functions and flags 2019-06-18 11:46:06 +02:00
ops.h KVM: VMX: remove unneeded 'asm volatile ("")' from vmcs_write64 2019-06-05 14:14:49 +02:00
pmu_intel.c KVM: x86/pmu: do not mask the value that is written to fixed PMUs 2019-05-24 21:27:14 +02:00
vmcs12.c KVM: nVMX: Move vmcs12 code to dedicated files 2018-12-14 12:34:30 +01:00
vmcs12.h KVM: nVMX: Track vmcs12 offsets for shadowed VMCS fields 2019-06-18 11:46:05 +02:00
vmcs_shadow_fields.h KVM: nVMX: shadow pin based execution controls 2019-06-18 17:10:50 +02:00
vmcs.h KVM: VMX: Leave preemption timer running when it's disabled 2019-06-18 17:10:46 +02:00
vmenter.S KVM: VMX: Move RSB stuffing to before the first RET after VM-Exit 2019-04-27 09:48:52 +02:00
vmx.c KVM: nVMX: list VMX MSRs in KVM_GET_MSR_INDEX_LIST 2019-07-02 17:36:18 +02:00
vmx.h KVM: VMX: Explicitly initialize controls shadow at VMCS allocation 2019-06-18 11:47:44 +02:00