lkml.org 
[lkml]   [2019]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/3] fix emulation error on Windows bootup
From
Date
On 27/08/19 15:07, Jan Dakinevich wrote:
> 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(-)
>

Queued, thanks. I added the WARN_ON_ONCE that Sean suggested.

Paolo

\
 
 \ /
  Last update: 2019-09-11 17:51    [W:0.105 / U:1.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site