]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: remove WARN_ON_ONCE in kvm_vcpu_trigger_posted_interrupt
authorHaozhong Zhang <haozhong.zhang@intel.com>
Mon, 18 Sep 2017 01:56:50 +0000 (09:56 +0800)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 19 Sep 2017 13:09:16 +0000 (15:09 +0200)
commit906c6324c908b1df2ec63557ab57250115b2deb7
treef29f71704cc2c734714e244af36db1259b8de827
parent27d4c66787cf9f5d8b70769f07b58fe9a0fb1ef2
KVM: VMX: remove WARN_ON_ONCE in kvm_vcpu_trigger_posted_interrupt

WARN_ON_ONCE(pi_test_sn(&vmx->pi_desc)) in kvm_vcpu_trigger_posted_interrupt()
intends to detect the violation of invariant that VT-d PI notification
event is not suppressed when vcpu is in the guest mode. Because the
two checks for the target vcpu mode and the target suppress field
cannot be performed atomically, the target vcpu mode may change in
between. If that does happen, WARN_ON_ONCE() here may raise false
alarms.

As the previous patch fixed the real invariant breaker, remove this
WARN_ON_ONCE() to avoid false alarms, and document the allowed cases
instead.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reported-by: "Ramamurthy, Venkatesh" <venkatesh.ramamurthy@intel.com>
Reported-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: b5c9afac3864 ("KVM: Update Posted-Interrupts Descriptor when vCPU is preempted")
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c