On Wed, Sep 27, 2017 at 11:22:39AM +0800, Haozhong Zhang wrote: > commit dc91f2eb1a4021eb6705c15e474942f84ab9b211 upstream. > > In kvm_vcpu_trigger_posted_interrupt() and pi_pre_block(), KVM > assumes that PI notification events should not be suppressed when the > target vCPU is not blocked. > > vmx_update_pi_irte() sets the SN field before changing an interrupt > from posting to remapping, but it does not check the vCPU mode. > Therefore, the change of SN field may break above the assumption. > Besides, I don't see reasons to suppress notification events here, so > remove the changes of SN field to avoid race condition. > > Signed-off-by: Haozhong Zhang <haozhong.zhang@xxxxxxxxx> > Reported-by: "Ramamurthy, Venkatesh" <venkatesh.ramamurthy@xxxxxxxxx> > Reported-by: Dan Williams <dan.j.williams@xxxxxxxxx> > Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> > Fixes: 28b835d60fcc ("KVM: Update Posted-Interrupts Descriptor when vCPU is preempted") Also applied to 4.9 and 4.4 stable trees, as that's what this patch fixes. thanks, greg k-h