From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] x86: don't change affinity with interrupt unmasked Date: Tue, 24 Mar 2015 07:46:12 +0000 Message-ID: <55112454020000780006CD3F@mail.emea.novell.com> References: <550C4D62020000780006C258@mail.emea.novell.com> <20150323184649.GA19464@l.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YaJXT-0007uv-LJ for xen-devel@lists.xenproject.org; Tue, 24 Mar 2015 07:46:15 +0000 In-Reply-To: <20150323184649.GA19464@l.oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Andrew Cooper , Keir Fraser , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 23.03.15 at 19:46, wrote: > On Fri, Mar 20, 2015 at 03:40:02PM +0000, Jan Beulich wrote: >> With ->startup unmasking the IRQ, setting the affinity afterwards >> without masking the IRQ again is invalid namely for MSI (which can't >> have their affinity updated atomically). > > That took a bit of verification :-) > > Could you include this in the commit please: > > Per 6.8.3.5. Per-vector Masking and Function Masking from > https://www.pcisig.com/specifications/conventional/msi-x_ecn.pdf > ".. anytime software unmasks a currently masked MSI-X > Table entry either by clearing its Mask bit or by clearing the Function Mask > bit, the > function must update any Address or Data values that it cached from that > entry. If > software changes the Address or Data value of an entry while the entry is > unmasked, the > result is undefined." I'd rather not, as that may result in the wrong impression that only MSI-X is affected, while MSI is as much. Apart from the potential caching is only one part of the problem, the other is (as said in the description) the non-atomic nature of the address/data updates for both variants of MSI. I guess I'll simply extend what is in parentheses at the end to include the caching issue. Jan