linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] fix emulation error on Windows bootup
@ 2019-08-27 13:07 Jan Dakinevich
  2019-08-27 13:07 ` [PATCH 1/3] KVM: x86: fix wrong return code Jan Dakinevich
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Jan Dakinevich @ 2019-08-27 13:07 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.

However, I have still deep doubts about 3rd commit in the series. Could
you please, make me an advise if it is the correct handling of guest page 
fault?

Jan Dakinevich (3):
  KVM: x86: fix wrong return code
  KVM: x86: set ctxt->have_exception in x86_decode_insn()
  KVM: x86: always stop emulation on page fault

 arch/x86/kvm/emulate.c | 4 +++-
 arch/x86/kvm/x86.c     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.1.4


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

end of thread, other threads:[~2019-09-13  9:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27 13:07 [PATCH 0/3] fix emulation error on Windows bootup Jan Dakinevich
2019-08-27 13:07 ` [PATCH 1/3] KVM: x86: fix wrong return code Jan Dakinevich
2019-08-27 13:42   ` Sean Christopherson
2019-08-27 13:07 ` [PATCH 2/3] KVM: x86: set ctxt->have_exception in x86_decode_insn() Jan Dakinevich
2019-08-27 14:53   ` Sean Christopherson
2019-08-28 10:19     ` Jan Dakinevich
2019-08-27 13:07 ` [PATCH 3/3] KVM: x86: always stop emulation on page fault Jan Dakinevich
2019-08-27 14:50   ` Sean Christopherson
2019-08-27 14:55     ` Sean Christopherson
2019-08-28 10:19     ` Jan Dakinevich
2019-08-28 14:23       ` Sean Christopherson
2019-09-11 15:51 ` [PATCH 0/3] fix emulation error on Windows bootup Paolo Bonzini
2019-09-11 19:53   ` Sean Christopherson
2019-09-13  9:51     ` Paolo Bonzini

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