summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/sgx.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-08-30 23:15:58 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2022-09-26 12:03:07 -0400
commit593a5c2e3c12a2f65967739267093255c47e9fe0 (patch)
tree937451087e8d53f7f8544e4bd4bdbabf77db888b /arch/x86/kvm/vmx/sgx.c
parentc2086eca86585bfd8132dd91e802497a202185c8 (diff)
downloadlinux-593a5c2e3c12a2f65967739267093255c47e9fe0.tar.bz2
KVM: nVMX: Unconditionally clear mtf_pending on nested VM-Exit
Clear mtf_pending on nested VM-Exit instead of handling the clear on a case-by-case basis in vmx_check_nested_events(). The pending MTF should never survive nested VM-Exit, as it is a property of KVM's run of the current L2, i.e. should never affect the next L2 run by L1. In practice, this is likely a nop as getting to L1 with nested_run_pending is impossible, and KVM doesn't correctly handle morphing a pending exception that occurs on a prior injected exception (need for re-injected exception being the other case where MTF isn't cleared). However, KVM will hopefully soon correctly deal with a pending exception on top of an injected exception. Add a TODO to document that KVM has an inversion priority bug between SMIs and MTF (and trap-like #DBS), and that KVM also doesn't properly save/restore MTF across SMI/RSM. Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20220830231614.3580124-12-seanjc@google.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/sgx.c')
0 files changed, 0 insertions, 0 deletions