linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] fix emulation error on Windows bootup
@ 2019-08-28 17:02 Jan Dakinevich
  2019-08-28 17:02 ` [PATCH v2 1/3] KVM: x86: always stop emulation on page fault Jan Dakinevich
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jan Dakinevich @ 2019-08-28 17:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jan Dakinevich, Denis Lunev, Roman Kagan, Denis Plotnikov,
	Paolo Bonzini, Radim Krčmář,
	Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H. Peter Anvin, x86, kvm

This series intended to fix (again) a bug that was a subject of the 
following change:

  6ea6e84 ("KVM: x86: inject exceptions produced by x86_decode_insn")

Suddenly, that fix had a couple mistakes. First, ctxt->have_exception was 
not set if fault happened during instruction decoding. Second, returning 
value of inject_emulated_instruction was used to make the decision to 
reenter guest, but this could happen iff on nested page fault, that is not 
the scope where this bug could occur.

v1:
  https://lkml.org/lkml/2019/8/27/881

v2
  - reorder commits, rebase on top kvm/queue
  - add sanity check for exception value of exception vector

Jan Dakinevich (3):
  KVM: x86: always stop emulation on page fault
  KVM: x86: make exception_class() and exception_type() globally visible
  KVM: x86: set ctxt->have_exception in x86_decode_insn()

 arch/x86/kvm/emulate.c |  5 +++++
 arch/x86/kvm/x86.c     | 50 +++-----------------------------------------------
 arch/x86/kvm/x86.h     | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 47 deletions(-)

-- 
2.1.4


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

end of thread, other threads:[~2019-08-28 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 17:02 [PATCH v2 0/3] fix emulation error on Windows bootup Jan Dakinevich
2019-08-28 17:02 ` [PATCH v2 1/3] KVM: x86: always stop emulation on page fault Jan Dakinevich
2019-08-28 17:02 ` [PATCH v2 2/3] KVM: x86: make exception_class() and exception_type() globally visible Jan Dakinevich
2019-08-28 18:35   ` Sean Christopherson
2019-08-28 17:02 ` [PATCH v2 3/3] KVM: x86: set ctxt->have_exception in x86_decode_insn() Jan Dakinevich

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