From: Jan Beulich <jbeulich@suse.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
"moderated list:XEN HYPERVISOR INTERFACE"
<xen-devel@lists.xenproject.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen-pciback: Consider MSI-X enabled only when MASKALL bit is cleared
Date: Thu, 17 Nov 2022 14:50:55 +0100 [thread overview]
Message-ID: <7a2b77af-1348-bf2a-f50f-dbccd8e2e74d@suse.com> (raw)
In-Reply-To: <20221117114122.1588338-1-marmarek@invisiblethingslab.com>
On 17.11.2022 12:41, Marek Marczykowski-Górecki wrote:
> --- a/drivers/xen/xen-pciback/conf_space.c
> +++ b/drivers/xen/xen-pciback/conf_space.c
> @@ -313,7 +313,7 @@ int xen_pcibk_get_interrupt_type(struct pci_dev *dev)
> &val);
> if (err)
> return err;
> - if (val & PCI_MSIX_FLAGS_ENABLE)
> + if (val & PCI_MSIX_FLAGS_ENABLE && !(val & PCI_MSIX_FLAGS_MASKALL))
> ret |= INTERRUPT_TYPE_MSIX;
> }
> return ret ?: INTERRUPT_TYPE_NONE;
Considering Andrew's reply, maybe it wasn't a good suggestion to change
the code here. If, however, you/we decide to keep the change, then
please add another pair of parentheses around the operands of the left
hand &.
If the change was to be dropped again, I think ...
> --- a/drivers/xen/xen-pciback/conf_space_capability.c
> +++ b/drivers/xen/xen-pciback/conf_space_capability.c
> @@ -242,6 +242,10 @@ static int msi_msix_flags_write(struct pci_dev *dev, int offset, u16 new_value,
> if (int_type == INTERRUPT_TYPE_NONE ||
> int_type == field_config->int_type)
> goto write;
> + if (int_type == INTERRUPT_TYPE_INTX &&
... this would need extending to also cover the INTX|MSIX case (i.e.
if a second such write made it here when the enable+maskall bits are
already set).
Jan
> + field_config->int_type == INTERRUPT_TYPE_MSIX &&
> + (new_value & PCI_MSIX_FLAGS_MASKALL))
> + goto write;
> return PCIBIOS_SET_FAILED;
> }
>
prev parent reply other threads:[~2022-11-17 13:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 11:41 Marek Marczykowski-Górecki
2022-11-17 12:28 ` Andrew Cooper
2022-11-17 13:43 ` Jan Beulich
2022-11-17 12:54 ` David Vrabel
2022-11-17 13:13 ` Marek Marczykowski-Górecki
2022-11-17 13:33 ` Jan Beulich
2022-11-17 14:32 ` Marek Marczykowski-Górecki
2022-11-17 13:50 ` Jan Beulich [this message]
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=7a2b77af-1348-bf2a-f50f-dbccd8e2e74d@suse.com \
--to=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marmarek@invisiblethingslab.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=sstabellini@kernel.org \
--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
all inboxes | Powered by JetHome®