All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Keir Fraser <keir@xen.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] x86: don't change affinity with interrupt unmasked
Date: Tue, 24 Mar 2015 07:46:12 +0000	[thread overview]
Message-ID: <55112454020000780006CD3F@mail.emea.novell.com> (raw)
In-Reply-To: <20150323184649.GA19464@l.oracle.com>

>>> On 23.03.15 at 19:46, <konrad.wilk@oracle.com> 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

  reply	other threads:[~2015-03-24  7:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 15:40 [PATCH] x86: don't change affinity with interrupt unmasked Jan Beulich
2015-03-23 18:46 ` Konrad Rzeszutek Wilk
2015-03-24  7:46   ` Jan Beulich [this message]
2015-03-25 18:12 ` Andrew Cooper
2015-03-26  8:04   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55112454020000780006CD3F@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.