Message ID | 20190417041026.14274-1-nadav.amit@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [kvm-unit-tests] x86: Initialize vmcs_root | expand |
On 17/04/19 06:10, nadav.amit@gmail.com wrote: > From: Nadav Amit <nadav.amit@gmail.com> > > 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 <nadav.amit@gmail.com> > --- > x86/vmx.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/x86/vmx.c b/x86/vmx.c > index f713ada..c0f4749 100644 > --- a/x86/vmx.c > +++ b/x86/vmx.c > @@ -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
diff --git a/x86/vmx.c b/x86/vmx.c index f713ada..c0f4749 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -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);