Hello, I already posted a message about this problem on this mailing list but I went more deeply in the analysis of the problem and I''d like to have your opinion. The problem is: I have a processor (pentium D) that supports the VT technology but when I boot Xen I have the following message: (XEN) VMX disabled by Feature Control MSR. Here is how I understand that. Xen is using the CPUID instruction to identify the processor functionality. This is done in arch/x86/hvm/vmx/vmx.c:start_vmx(). As VMXON is controlled by the IA32_FEATURE_CONTROL we must test the lock bit (bit0) and the bit2. I found in the intel documentation that if the bit2 is clear, VMXON causes a general-protection exeption. In our case, we stop the start_vmx() function and display the message VMX disabled by feature control MSR. 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? Thanks for your help, Guillaume _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Guillaume Thouvenin
2006-Jun-14 12:35 UTC
Re: [Xen-devel] VMX disabled by Feature Control MSR
On Wed, 14 Jun 2006 13:45:49 +0200 Guillaume Thouvenin <guillaume.thouvenin@bull.net> 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@lists.xensource.com http://lists.xensource.com/xen-devel
On 14 Jun 2006, at 13:35, Guillaume Thouvenin wrote:> 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.SNo, it''s called a lock bit because it is sticky once set. The intention is presumably to allow OEMs an easy way (in their BIOS) to disable VMX on their systems if they don''t want to have to support it. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yes, Keir is correct. Once it is locked you can not unlock it by just clearing the bit. Probably what you need is, enabling of VMX feature in the BIOS, and then hard reset the system. Thanks & Regards, Nitin ------------------------------------------------------------------------ ----------- Open Source Technology Center, Intel Corp>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel- >bounces@lists.xensource.com] On Behalf Of Keir Fraser >Sent: Wednesday, June 14, 2006 5:47 AM >To: Guillaume Thouvenin >Cc: LAURENT VIVIER; xen-devel@lists.xensource.com; JEAN-PIERRE DION >Subject: Re: [Xen-devel] VMX disabled by Feature Control MSR > > >On 14 Jun 2006, at 13:35, Guillaume Thouvenin wrote: > >> 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 itwhile>> 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 > >No, it''s called a lock bit because it is sticky once set. The intention >is presumably to allow OEMs an easy way (in their BIOS) to disable VMX >on their systems if they don''t want to have to support it. > > -- Keir > > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jean-Pierre Dion
2006-Jun-15 09:11 UTC
Re: [Xen-devel] VMX disabled by Feature Control MSR
ok we will try get the right bios for our platform. thanks jean-pierre Kamble, Nitin A wrote:>Yes, Keir is correct. Once it is locked you can not unlock it by just >clearing the bit. Probably what you need is, enabling of VMX feature in >the BIOS, and then hard reset the system. > >Thanks & Regards, >Nitin >------------------------------------------------------------------------ >----------- >Open Source Technology Center, Intel Corp > > > >>-----Original Message----- >>From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel- >>bounces@lists.xensource.com] On Behalf Of Keir Fraser >>Sent: Wednesday, June 14, 2006 5:47 AM >>To: Guillaume Thouvenin >>Cc: LAURENT VIVIER; xen-devel@lists.xensource.com; JEAN-PIERRE DION >>Subject: Re: [Xen-devel] VMX disabled by Feature Control MSR >> >> >>On 14 Jun 2006, at 13:35, Guillaume Thouvenin wrote: >> >> >> >>>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 >>> >>> >>No, it''s called a lock bit because it is sticky once set. The intention >>is presumably to allow OEMs an easy way (in their BIOS) to disable VMX >>on their systems if they don''t want to have to support it. >> >> -- Keir >> >> >>_______________________________________________ >>Xen-devel mailing list >>Xen-devel@lists.xensource.com >>http://lists.xensource.com/xen-devel >> > > > >-- Jean-Pierre DION Linux and Gnome projects manager Bull, Architect of an Open World TM Tel : +33 (0)4 76 29 72 34 http://www.bull.com http://www.bullopensource.org http://gnome.bullfreeware.com/new_index.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel