On 13/05/2015 22:15, j...@joshtriplett.org wrote:
> On Wed, May 13, 2015 at 12:18:12PM +0200, Paolo Bonzini wrote:
>> On Mon, 11 May 2015 09:09:08 -0700 Josh Triplett <j...@joshtriplett.org>
>> wrote:
>>> Decoding that instruction stream (either from those bytes, or via the
>>> 'x' command in the qemu console) shows (starting with the failing
>>> instruction):
>>>
>>>    0:   9b db e3                finit
>>
>> finit indeed is not supported by KVM in emulation mode.  The question is
>> why KVM is in emulation mode.
> 
> Well, it's running ring 0 BIOS code, which may well be doing something
> to break the assumptions needed to avoid a VMEXIT.

No, this is not a VMEXIT.  This is about interpreting instructions one
by one instead of using the virtualization support in the processor.
You have to use it in pre-Westmere chips to run code in big real mode,
or in other "invalid" configurations such as real mode with segment
bases above 1 MB.  But starting with Westmere this shouldn't be needed,
and the register dump in your bug doesn't look like an invalid
configuration anyway.

> Leaving aside the "why KVM is in emulation mode", though, shouldn't
> emulation mode support finit?

Yes, it should strive to support all instructions.  But there are a lot,
and since it's only used for big real mode you pick your fights.  If
you're on a pre-Westmere chip and your program uses the FPU in big real
mode, it's probably not using any fancy KVM feature and then it's faster
to use QEMU's translator instead of KVM.

Thus, the emulator covers most non-FPU instructions, and all
instructions that access memory (because those are used for MMIO even if
not in big real mode).

Paolo

>> Can you please collect a KVM trace (trace-cmd record -e kvm -e kvmmmu
>> qemu-system-x86_64 --enable-kvm ...) and provide the full QEMU command line?
>>
>> Also please include the output of "grep -r . /sys/module/kvm*/parameters".
> 
> Will do when I get back to that machine this evening.
> 
> - Josh Triplett
> 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to