lkml.org 
[lkml]   [2014]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [visorchipset] invalid opcode: 0000 [#1] PREEMPT SMP
Il 11/04/2014 19:40, H. Peter Anvin ha scritto:
> On 04/11/2014 10:35 AM, Jet Chen wrote:
>>
>> As Peter said, QEMU probably should *not* set the hypervisor bit. But based on my testing, I think KVM works properly in this case.
>>
>
> Either way, unless there is a CPUID interface exposed in CPUID levels
> 0x40000000+, then relying on the hypervisor bit to do VMCALL is wrong in
> the extreme.

Sorry for the delay guys, I was on vacation.

Lack of a CPUID interface at 0x40000000 is indeed *the* good reason why
QEMU should not set the hypervisor bit. Of course that there is no
guarantee that QEMU will never expose a 0x40000000 interface, and at
that point the hypervisor bit may reappear in QEMU's JIT mode.

As to sending #UD to the guest at CPL>0, that is a choice of the
hypervisor. Hyper-V (and KVM in Hyper-V emulation mode) does that, and
does the same in real mode too. KVM instead sets EAX to -KVM_EPERM, and
accepts hypercalls in real mode (where CPL=0). Terminating the guest is
surely the wrong thing to do at CPL>0.

Thanks,

Paolo


\
 
 \ /
  Last update: 2014-04-30 15:21    [W:0.063 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site