[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] VMX disabled by Feature Control MSR



On Wed, 14 Jun 2006 13:45:49 +0200
Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxx> wrote:

>   Thus my question is: What to do to set the bit 2 of the
> IA32_FEATURE_CONTROL to 1? Is it only possible by using the option in
> the BIOS menu (and it's not present in mine) or is it possible to set it
> to 1 before switching in protected mode when Xen is booting. For exemple
> somwhere in arch/x86/boot/x86_64.S?

In fact the problem is how to set the lock bit to 0. In the following
code found in arch/x86/hvm/vmx/vmx.c :

start_vmx() {
...
   if (eax & IA32_FEATURE_CONTROL_MSR_LOCK) {
        if ((eax & IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON) == 0x0) {
            printk("VMX disabled by Feature Control MSR.\n");
            return 0;
        }
    }
    else {
        wrmsr(IA32_FEATURE_CONTROL_MSR,
              IA32_FEATURE_CONTROL_MSR_LOCK |
              IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON, 0);
    }
...

If the "VMX disabled..." message is displayed, it means that the lock
bit is set to 1. Otherwise we set bit2 to 1. If I try to clear it while
it is set it causes a general-protection fault. Is it possible to modify
before Xen switches from real mode to protected mode? 

I will try to modify the arch/x86/boot/x86_64.S

Regards,
Guillaume

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.