Re: kvm: WARNING in em_jmp_far

From: Nadav Amit
Date: Tue Nov 15 2016 - 00:33:12 EST



> On Nov 14, 2016, at 9:06 PM, Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:
>
> Hello,
>
> The following program triggers WARNING in em_jmp_far:
> https://gist.githubusercontent.com/dvyukov/16bfd3d68fa7d5461101ef74e07796e4/raw/e6d663980681f2c5838ff6cd361cede7d3204838/gistfile1.txt
>
>
> WARNING: CPU: 1 PID: 15748 at arch/x86/kvm/emulate.c:2128 em_jmp_far+0x4a7/0x530

I donât know how to âreadâ the test, but it seems that this warning
can be triggered if CS base/limit cause a #GP exception when EIP
is loaded.

I think it safe to remove this warning (which I introduced) as well as
the redundant âreturn rcâ that follows it. The code should handle the
emulation correctly regardless of the warning.

Regards,
Nadav