diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2022-11-01 15:54:01 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-11-18 12:59:14 -0500 |
commit | c58a318f6090efe06e6702b8882e2026f44f620e (patch) | |
tree | 07825f8b81d108efc9d411075c00c701b03e1ee8 /arch/x86/kvm/svm/nested.c | |
parent | 3c9eb0655fc03fb5e84f1db334ebc832d9c5ac31 (diff) |
KVM: x86: hyper-v: L2 TLB flush
Handle L2 TLB flush requests by going through all vCPUs and checking
whether there are vCPUs running the same VM_ID with a VP_ID specified
in the requests. Perform synthetic exit to L2 upon finish.
Note, while checking VM_ID/VP_ID of running vCPUs seem to be a bit
racy, we count on the fact that KVM flushes the whole L2 VPID upon
transition. Also, KVM_REQ_HV_TLB_FLUSH request needs to be done upon
transition between L1 and L2 to make sure all pending requests are
always processed.
For the reference, Hyper-V TLFS refers to the feature as "Direct
Virtual Flush".
Note, nVMX/nSVM code does not handle VMCALL/VMMCALL from L2 yet.
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221101145426.251680-24-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/nested.c')
0 files changed, 0 insertions, 0 deletions