WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] VMX disabled by Feature Control MSR
From: Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxx>
Date: Wed, 14 Jun 2006 14:35:02 +0200
Cc: LAURENT VIVIER <Laurent.Vivier@xxxxxxxx>, JEAN-PIERRE DION <Jean-Pierre.Dion@xxxxxxxx>
Delivery-date: Wed, 14 Jun 2006 05:35:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060614134549.2b6e965d@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Bull S.A.
References: <20060614134549.2b6e965d@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>