Skip to content

KVM: x86: Make the cause of instruction emulation available to user-space

David Edmondson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6KVM: x86: add an emulation_reason to x86_emulate_instruction()arch/x86/kvm/mmu/mmu.c arch/x86/kvm/x86.c arch/x86/kvm/x86.h+8 -60 replies
2/6KVM: x86: pass emulation_reason to handle_emulation_failure()arch/x86/kvm/x86.c+10 -50 replies
3/6KVM: x86: add emulation_reason to kvm_emulate_instruction()arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/avic.c arch/x86/kvm/svm/svm.c +2 more+33 -230 replies
4/6KVM: x86: pass a proper reason to kvm_emulate_instruction()arch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/x86.c+11 -40 replies
5/6KVM: SVM: pass a proper reason in kvm_emulate_instruction()arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/avic.c arch/x86/kvm/svm/svm.c+23 -124 replies
6/6KVM: VMX: pass a proper reason in kvm_emulate_instruction()arch/x86/include/asm/kvm_host.h arch/x86/kvm/vmx/vmx.c+14 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] KVM: x86: Make the cause of instruction emulation available to user-space

Instruction emulation happens for a variety of reasons, yet on error we have no idea exactly what triggered it. Add a cause of emulation to the various originators and pass it upstream when emulation fails.

Joao originally produced the patches but is busy with other things and I wanted to use it, so picked it up.

Tested by reverting commit 51b958e5aeb1e18c00332e0b37c5d4e95a3eff84 ("KVM: x86: clflushopt should be treated as a no-op by emulation") then running the test included in
https://lore.kernel.org/r/[email protected].

Joao Martins (6):
KVM: x86: add an emulation_reason to x86_emulate_instruction()
KVM: x86: pass emulation_reason to handle_emulation_failure()
KVM: x86: add emulation_reason to kvm_emulate_instruction()
KVM: x86: pass a proper reason to kvm_emulate_instruction()
KVM: SVM: pass a proper reason in kvm_emulate_instruction()
KVM: VMX: pass a proper reason in kvm_emulate_instruction()

 arch/x86/include/asm/kvm_host.h | 27 +++++++++++++++++++++++--
 arch/x86/kvm/mmu/mmu.c          |  4 ++--
 arch/x86/kvm/svm/avic.c         |  3 ++-
 arch/x86/kvm/svm/svm.c          | 26 +++++++++++++-----------
 arch/x86/kvm/vmx/vmx.c          | 17 ++++++++--------
 arch/x86/kvm/x86.c              | 35 ++++++++++++++++++++++-----------
 arch/x86/kvm/x86.h              |  3 ++-
 7 files changed, 78 insertions(+), 37 deletions(-)
Signature · 1 line
2.30.2