linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] KVM: x86: Make the cause of instruction emulation available to user-space
@ 2021-04-12 13:09 David Edmondson
  2021-04-12 13:09 ` [PATCH 1/6] KVM: x86: add an emulation_reason to x86_emulate_instruction() David Edmondson
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: David Edmondson @ 2021-04-12 13:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: kvm, Paolo Bonzini, Vitaly Kuznetsov, H. Peter Anvin, x86,
	Sean Christopherson, Thomas Gleixner, Joerg Roedel, Wanpeng Li,
	Borislav Petkov, Jim Mattson, Ingo Molnar, David Edmondson

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/20201118121129.6276-1-david.edmondson@oracle.com.

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(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-04-14 12:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 13:09 [PATCH 0/6] KVM: x86: Make the cause of instruction emulation available to user-space David Edmondson
2021-04-12 13:09 ` [PATCH 1/6] KVM: x86: add an emulation_reason to x86_emulate_instruction() David Edmondson
2021-04-12 13:09 ` [PATCH 2/6] KVM: x86: pass emulation_reason to handle_emulation_failure() David Edmondson
2021-04-12 13:09 ` [PATCH 3/6] KVM: x86: add emulation_reason to kvm_emulate_instruction() David Edmondson
2021-04-12 13:09 ` [PATCH 4/6] KVM: x86: pass a proper reason " David Edmondson
2021-04-12 13:09 ` [PATCH 5/6] KVM: SVM: pass a proper reason in kvm_emulate_instruction() David Edmondson
2021-04-12 16:04   ` Sean Christopherson
2021-04-13 10:53     ` David Edmondson
2021-04-13 18:45       ` Aaron Lewis
2021-04-14 12:25         ` David Edmondson
2021-04-12 13:09 ` [PATCH 6/6] KVM: VMX: " David Edmondson
2021-04-12 18:34 ` [PATCH 0/6] KVM: x86: Make the cause of instruction emulation available to user-space Jim Mattson
2021-04-13 10:54   ` David Edmondson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).