|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [visorchipset] invalid opcode: 0000 [#1] PREEMPT SMP |
Date: | Wed, 30 Apr 2014 12:02:34 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |