We report no VMX capabilities to the VM guest we're running as we don't currently support nested VMs.
Signed-off-by: Gan Shun <[email protected]> Change-Id: Ie90bea3c255a95df0dad6c9f5b58055431029b02 --- kern/arch/x86/trap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kern/arch/x86/trap.c b/kern/arch/x86/trap.c index 94fe699..949d3a1 100644 --- a/kern/arch/x86/trap.c +++ b/kern/arch/x86/trap.c @@ -896,6 +896,9 @@ static bool handle_vmexit_cpuid(struct vm_trapframe *tf) if (tf->tf_rax == 1) { /* Set the hypervisor bit to let the guest know it is virtualized */ ecx |= 1 << 31; + /* Unset the vmx capability bit so that the guest does not try + * to turn it on. */ + ecx &= ~(1 << 5); } } tf->tf_rax = eax; -- 2.8.0.rc3.226.g39d4020 -- You received this message because you are subscribed to the Google Groups "Akaros" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
