lkml.org 
[lkml]   [2021]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 08/12] KVM: SVM: add warning for mistmatch between AVIC state and AVIC access page state
Date
It is never a good idea to enter a guest when AVIC state doesn't match
the state of the AVIC MMIO page state.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
---
arch/x86/kvm/svm/svm.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 4feff53dd1d3..3923d383face 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -3781,6 +3781,9 @@ static __no_kcsan fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)

pre_svm_run(vcpu);

+ WARN_ON_ONCE(vcpu->kvm->arch.apic_access_memslot_enabled !=
+ kvm_vcpu_apicv_active(vcpu));
+
sync_lapic_to_cr8(vcpu);

if (unlikely(svm->asid != svm->vmcb->control.asid)) {
--
2.26.3
\
 
 \ /
  Last update: 2021-08-02 20:34    [W:0.465 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site