linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Josef Johansson <josef@oderland.se>,
	Jason Andryuk <jandryuk@gmail.com>, Marc Zyngier <maz@kernel.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	linux-pci@vger.kernel.org,
	xen-devel <xen-devel@lists.xenproject.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Juergen Gross <jgross@suse.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v2] PCI/MSI: Re-add checks for skip masking MSI-X on Xen PV
Date: Wed, 27 Oct 2021 07:24:49 +0100	[thread overview]
Message-ID: <ee23eafce1993ba7da8fdf4c03cedbcb3362ef1d.camel@infradead.org> (raw)
In-Reply-To: <c4d27d67-1027-e72b-c5bf-5546c5b0e2e9@oderland.se>

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

On Mon, 2021-10-25 at 21:21 +0200, Josef Johansson wrote:
> +       if (!(pci_msi_ignore_mask || entry->msi_attrib.is_virtual))

Is it just me, or is that a lot easier to read if you write it as the
tautologically-identical (!pci_msi_ignore_mask && !entry->…is_virtual)?


> @@ -546,7 +548,8 @@ static int msi_capability_init(struct pci_dev *dev, int nvec,
>                 return -ENOMEM;

>         /* All MSIs are unmasked by default; mask them all *
> -       pci_msi_mask(entry, msi_multi_mask(entry))
> +       if (!pci_msi_ignore_mask)
> +               pci_msi_mask(entry, msi_multi_mask(entry));
>
>         list_add_tail(&entry->list, dev_to_msi_list(&dev->dev));


Hm, I thought that older kernels *did* do this part (or at least the
later ones in pci_msi*_hutdown). I was watching it when I did the Xen
hosting implementation I mentioned before; even a hack to unmask them
all when the VM was started, wasn't working because the guest would
*mask* all MSI-X, just never unmask them again.


I wonder if we should rename 'pci_msi_ignore_mask' to something with
Xen in its name because Xen is the only user of this abomination (which
fundamentally seems to require that the virtual hardware use MSI
entries even while they're masked, so hopefully nobody else would
*ever* do such a thing), and the required behaviour is very Xen-
specific.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

  reply	other threads:[~2021-10-27  6:25 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  6:22 [PATCH] PCI/MSI: Re-add checks for skip masking MSI-X on Xen PV Josef Johansson
2021-10-19 19:57 ` Bjorn Helgaas
2021-10-19 20:15   ` Josef Johansson
2021-10-19 20:29     ` Bjorn Helgaas
2021-10-19 21:48       ` [PATCH v2] " Josef Johansson
2021-10-20 12:51         ` Marc Zyngier
2021-10-20 14:03           ` Jason Andryuk
2021-10-21  8:25             ` Josef Johansson
2021-10-24 18:55               ` Josef Johansson
2021-10-25  1:25                 ` [PATCH] PCI/MSI: Fix masking MSI/MSI-X " Jason Andryuk
2021-10-25  7:44                   ` David Woodhouse
2021-10-25 11:43                     ` Roger Pau Monné
2021-10-25 11:53                       ` David Woodhouse
2021-10-25 12:58                         ` Roger Pau Monné
2021-10-25 13:02                           ` David Woodhouse
2021-10-25 14:12                             ` Roger Pau Monné
2021-10-25 12:31                     ` Jason Andryuk
2021-10-25 12:27                   ` Jason Andryuk
2021-10-25 16:46                     ` Josef Johansson
2021-10-26 21:17                       ` Josef Johansson
2021-10-27  8:45                   ` Thomas Gleixner
2021-10-27  9:50                     ` [PATCH] PCI/MSI: Move non-mask check back into low level accessors Thomas Gleixner
2021-10-27  9:54                       ` Josef Johansson
2021-10-27 12:01                         ` Josef Johansson
2021-10-27 15:29                           ` Josef Johansson
2021-11-03 23:26                             ` Thomas Gleixner
2021-11-03 23:27                               ` [PATCH v2] " Thomas Gleixner
2021-11-09 14:53                                 ` Thomas Gleixner
2021-11-10 13:31                                   ` Josef Johansson
2021-11-10 16:05                                     ` Josef Johansson
2021-11-03 23:45                             ` [PATCH] " Thomas Gleixner
2021-11-04  9:00                               ` Josef Johansson
2021-11-04 17:12                               ` Peter Zijlstra
2021-11-04 17:31                               ` Vincent Guittot
2021-11-10 20:30                               ` Josef Johansson
2021-11-10 23:13                                 ` Josef Johansson
2021-10-27  9:57                       ` David Woodhouse
2021-10-25  1:25                 ` [PATCH v2] PCI/MSI: Re-add checks for skip masking MSI-X on Xen PV Jason Andryuk
2021-10-25 19:21                   ` Josef Johansson
2021-10-27  6:24                     ` David Woodhouse [this message]
2021-10-27  8:13                       ` Josef Johansson
2021-10-27  8:26                         ` David Woodhouse

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=ee23eafce1993ba7da8fdf4c03cedbcb3362ef1d.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=helgaas@kernel.org \
    --cc=jandryuk@gmail.com \
    --cc=jgross@suse.com \
    --cc=josef@oderland.se \
    --cc=linux-pci@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).