KVM: VMX: WARN on invalid vmptrld or vmclear
diff mbox series

Message ID 1563554534-46556-2-git-send-email-pbonzini@redhat.com
State New
Headers show
Series
  • KVM: VMX: WARN on invalid vmptrld or vmclear
Related show

Commit Message

Paolo Bonzini July 19, 2019, 4:42 p.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/vmx/ops.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

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);
 }