[PATCH] KVM: VMX: WARN on invalid vmptrld or vmclear

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

 



Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 arch/x86/kvm/vmx/ops.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vmx/ops.h b/arch/x86/kvm/vmx/ops.h
index 2200fb698dd0..b143cee701c3 100644
--- a/arch/x86/kvm/vmx/ops.h
+++ b/arch/x86/kvm/vmx/ops.h
@@ -186,7 +186,7 @@ static inline void vmcs_clear(struct vmcs *vmcs)
 
 	asm volatile (__ex("vmclear %1") CC_SET(na)
 		      : CC_OUT(na) (error) : "m"(phys_addr));
-	if (unlikely(error))
+	if (WARN_ON_ONCE(error))
 		printk(KERN_ERR "kvm: vmclear fail: %p/%llx\n",
 		       vmcs, phys_addr);
 }
@@ -201,7 +201,7 @@ static inline void vmcs_load(struct vmcs *vmcs)
 
 	asm volatile (__ex("vmptrld %1") CC_SET(na)
 		      : CC_OUT(na) (error) : "m"(phys_addr));
-	if (unlikely(error))
+	if (WARN_ON_ONCE(error))
 		printk(KERN_ERR "kvm: vmptrld %p/%llx failed\n",
 		       vmcs, phys_addr);
 }
-- 
1.8.3.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