From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:46256 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbdJCIxZ (ORCPT ); Tue, 3 Oct 2017 04:53:25 -0400 Date: Tue, 3 Oct 2017 10:53:33 +0200 From: Greg KH To: Haozhong Zhang Cc: stable@vger.kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , "Ramamurthy, Venkatesh" , Dan Williams Subject: Re: [PATCH-for-4.13 1/2] KVM: VMX: do not change SN bit in vmx_update_pi_irte() Message-ID: <20171003085333.GD15659@kroah.com> References: <20170927032240.21406-1-haozhong.zhang@intel.com> <20170927032240.21406-2-haozhong.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170927032240.21406-2-haozhong.zhang@intel.com> Sender: stable-owner@vger.kernel.org List-ID: 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 > Reported-by: "Ramamurthy, Venkatesh" > Reported-by: Dan Williams > Reviewed-by: Paolo Bonzini > 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