OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:12 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: VMX lock flag in ThinkPad
PostPosted: Sat Aug 10, 2019 6:36 am 
Offline

Joined: Thu Aug 01, 2019 1:50 am
Posts: 5
Hi,
I was trying boot my kernel to bare metal machine over PXE, But I got issue about lock bit in MSR. According to the Intel there is IA32_FEATURE_CONTROL MSR to control VMXON instruction and Bit 0 is the lock bit that uses by OEM for disabling/enabling Virtualization in BIOS. After protected mode initialization I've checked IA32_FEATURE_CONTROL (0x3a) and that got 0x5 (the lock bit set) but It should be 0x0. Is that bios depended issue? I have checked this in few machine (Lenovo Thinkpad, Acer)

Result:
Code:
read_msr(0x3a); ==> 0x5


Top
 Profile  
 
 Post subject: Re: VMX lock flag in ThinkPad
PostPosted: Sat Aug 10, 2019 7:21 am 
Online
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
It's locked by the BIOS. You'll need to change the BIOS settings to enable it.


Top
 Profile  
 
 Post subject: Re: VMX lock flag in ThinkPad
PostPosted: Sat Aug 10, 2019 7:50 am 
Offline

Joined: Thu Aug 01, 2019 1:50 am
Posts: 5
Octocontrabass wrote:
It's locked by the BIOS. You'll need to change the BIOS settings to enable it.


I changed Virtualization feature as enabled.


Attachments:
photo_2019-08-10_13-24-56.jpg
photo_2019-08-10_13-24-56.jpg [ 55.61 KiB | Viewed 2551 times ]
Top
 Profile  
 
 Post subject: Re: VMX lock flag in ThinkPad
PostPosted: Sat Aug 10, 2019 2:37 pm 
Offline
Member
Member

Joined: Thu Feb 09, 2012 6:53 am
Posts: 67
Location: Czechoslovakia
Value 5 in the MSR is OK. Bit 2. enabled (VMX), bit 0. enabled (lock). So you can use VMX but you can't disable VMX.
If bit 0. disabled and bit 2. enabled (value 4), execution of VMXON would cause #GP. Some old firmwares forgot to set bit 0 and let only bit 2 enabled, in that case it was easy to fix it by enabling also bit 0 prior execution of VMXON.
Value 1 would mean you can't use VMX because bit 2. disabled (VMX) and bit 0. enabled (lock) so you can't change the value of MSR to the desired value 5
Value 0 would mean firmware didn't touch the MSR and let it in the state after poweron/reset

_________________
hypervisor-based solutions developer (Intel, AMD)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group