[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1563554534-46556-2-git-send-email-pbonzini@redhat.com>
Date: Fri, 19 Jul 2019 18:42:13 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: [PATCH] KVM: VMX: WARN on invalid vmptrld or vmclear
Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
---
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
Powered by blists - more mailing lists