x86: Initialize vmcs_root
PATCH 1/1 x86: Initialize vmcs_root
From: Nadav Amit <[email protected]>
vmcs_root was not initialized, so vmclear was run on the memory in which the IDT resides. That is not good.
Signed-off-by Nadav Amit <[email protected]>
--- x86/vmx.c | 2 ++ 1 file changed, 2 insertions(+)
x86/vmx.c +2 -0
@@ -1244,6 +1244,8 @@ static void init_vmx(void) vmxon_region =alloc_page ();memset (vmxon_region,0 ,PAGE_SIZE ); + vmcs_root =alloc_page (); + fix_cr0_set =rdmsr (MSR_IA32_VMX_CR0_FIXED0 ); fix_cr0_clr =rdmsr (MSR_IA32_VMX_CR0_FIXED1 ); fix_cr4_set =rdmsr (MSR_IA32_VMX_CR4_FIXED0 );
Signature · 1 line
2.17.1
Quoted 16 lines · On 17/04/19 06:10, [email protected] wrote:
From: Nadav Amit <[email protected]>
vmcs_rootwas not initialized, so vmclear was run on the memory in which the IDT resides. That is not good.Signed-off-by Nadav Amit <[email protected]>--- x86/vmx.c | 2 ++ 1 file changed, 2 insertions(+)x86/vmx.c +0
-0
x86/vmx.c static void init_vmx(void) · line 1251
Quoted 8 lines
x86/vmx.c +2
-0@@ -1244,6 +1244,8 @@ static void init_vmx(void) vmxon_region =alloc_page ();memset (vmxon_region,0 ,PAGE_SIZE ); + vmcs_root =alloc_page (); + fix_cr0_set =rdmsr (MSR_IA32_VMX_CR0_FIXED0 ); fix_cr0_clr =rdmsr (MSR_IA32_VMX_CR0_FIXED1 ); fix_cr4_set =rdmsr (MSR_IA32_VMX_CR4_FIXED0 );
Queued, thanks.
Paolo