[kvm-unit-tests PATCH 1/5] x86: nVMX: Check the return value of setup_eptp() in setup_ept()

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

 



A recent patch neglected to check the return value of the helper
function it factored out of setup_ept().

Fixes: d065566f60288 ("KVM: nVMX: Add enable_ept() helper to configure legal EPTP")
Reported-by: Marc Orr <marcorr@xxxxxxxxxx>
Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
---
 x86/vmx_tests.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 26edbbb..66fde33 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -1046,7 +1046,8 @@ static int setup_ept(bool enable_ad)
 
 	pml4 = alloc_page();
 
-	setup_eptp(virt_to_phys(pml4), enable_ad);
+	if (setup_eptp(virt_to_phys(pml4), enable_ad))
+		return 1;
 
 	memset(pml4, 0, PAGE_SIZE);
 
-- 
2.20.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