diff options
author | Sean Christopherson <seanjc@google.com> | 2022-08-31 02:16:04 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-09-26 19:03:09 +0300 |
commit | 6c593b5276e6ce411dcdf03e2f7d4b93c2e7138e (patch) | |
tree | 8d32af03f0cd92a228f73b6bc8b58453e6892bdd /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 81601495c5f9839b76eef4edb920b2f101f2fc77 (diff) | |
download | linux-6c593b5276e6ce411dcdf03e2f7d4b93c2e7138e.tar.xz |
KVM: x86: Hoist nested event checks above event injection logic
Perform nested event checks before re-injecting exceptions/events into
L2. If a pending exception causes VM-Exit to L1, re-injecting events
into vmcs02 is premature and wasted effort. Take care to ensure events
that need to be re-injected are still re-injected if checking for nested
events "fails", i.e. if KVM needs to force an immediate entry+exit to
complete the to-be-re-injecteed event.
Keep the "can_inject" logic the same for now; it too can be pushed below
the nested checks, but is a slightly riskier change (see past bugs about
events not being properly purged on nested VM-Exit).
Add and/or modify comments to better document the various interactions.
Of note is the comment regarding "blocking" previously injected NMIs and
IRQs if an exception is pending. The old comment isn't wrong strictly
speaking, but it failed to capture the reason why the logic even exists.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20220830231614.3580124-18-seanjc@google.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions