[kvm-unit-tests PATCH] x86: Initialize vmcs_root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nadav Amit <nadav.amit@xxxxxxxxx>

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@xxxxxxxxx>
---
 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);
-- 
2.17.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux