diff options
| author | Yosry Ahmed <yosry@kernel.org> | 2026-02-27 01:13:06 +0000 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-03-02 15:27:27 -0800 |
| commit | e907b4e72488f1df878e7e8acf88d23e49cb3ca7 (patch) | |
| tree | 9309ab0b8e83f7811aacbe91b0f21a72f7372599 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 5a6b189317501169b0510f2f1256cfc0c6ca81c7 (diff) | |
KVM: x86: Check for injected exceptions before queuing a debug exception
On KVM_SET_GUEST_DEBUG, if a #DB or #BP is injected with
KVM_GUESTDBG_INJECT_DB or KVM_GUESTDBG_INJECT_BP, KVM fails with -EBUSY
if there is an existing pending exception. This was introduced in
commit 4f926bf29186 ("KVM: x86: Polish exception injection via
KVM_SET_GUEST_DEBUG") to avoid a warning in kvm_queue_exception(),
presumably to avoid overriding a pending exception.
This added another (arguably nice) property, if there's a pending
exception, KVM_SET_GUEST_DEBUG cannot cause a #DF or triple fault.
However, if an exception is injected, KVM_SET_GUEST_DEBUG will cause
a #DF or triple fault in the guest, as kvm_multiple_exception() combines
them.
Check for both pending and injected exceptions for
KVM_GUESTDBG_INJECT_DB and KVM_GUESTDBG_INJECT_BP, to avoid accidentally
injecting a #DB or triple fault.
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
base-commit: a68a4bbc5b9ce5b722473399f05cb05217abaee8
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
