From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Bin Meng <bmeng.cn@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>,
qemu-devel@nongnu.org
Cc: Bin Meng <bin.meng@windriver.com>, Ruimei Yan <ruimei.yan@windriver.com>
Subject: Re: [PATCH 1/2] hw/usb: hcd-xhci-pci: Raise MSI/MSI-X interrupts only when told to
Date: Fri, 21 May 2021 14:48:30 +0200 [thread overview]
Message-ID: <295bd1ad-3177-8bd9-37db-7cde60dac3e2@redhat.com> (raw)
In-Reply-To: <20210521024224.2277634-1-bmeng.cn@gmail.com>
On 5/21/21 4:42 AM, Bin Meng wrote:
> From: Ruimei Yan <ruimei.yan@windriver.com>
>
> At present MSI / MSI-X interrupts are triggered regardless of the
> irq level. We should have checked the level to determine whether
> the interrupt needs to be delivered.
>
> The level check logic was present in early versions of the xhci
> model, but got dropped later by a rework of interrupt handling
> under commit 4c4abe7cc903 ("xhci: rework interrupt handling").
>
> Fixes: 4c4abe7cc903 ("xhci: rework interrupt handling")
> Signed-off-by: Ruimei Yan <ruimei.yan@windriver.com>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
> hw/usb/hcd-xhci-pci.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
> index 9421734d0f..b6acd1790c 100644
> --- a/hw/usb/hcd-xhci-pci.c
> +++ b/hw/usb/hcd-xhci-pci.c
> @@ -67,12 +67,13 @@ static void xhci_pci_intr_raise(XHCIState *xhci, int n, bool level)
> msi_enabled(pci_dev))) {
> pci_set_irq(pci_dev, level);
> }
I read the next patch before this one :)
So please consider:
if (!level) {
return;
}
Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> - if (msix_enabled(pci_dev)) {
> +
> + if (msix_enabled(pci_dev) && level) {
> msix_notify(pci_dev, n);
> return;
> }
>
> - if (msi_enabled(pci_dev)) {
> + if (msi_enabled(pci_dev) && level) {
> msi_notify(pci_dev, n);
> return;
> }
>
next prev parent reply other threads:[~2021-05-21 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 2:42 [PATCH 1/2] hw/usb: hcd-xhci-pci: Raise MSI/MSI-X interrupts only when told to Bin Meng
2021-05-21 2:42 ` [PATCH 2/2] hw/usb: hcd-xhci-pci: Fix spec violation of IP flag for MSI/MSI-X Bin Meng
2021-05-21 12:46 ` Philippe Mathieu-Daudé
2021-05-21 13:25 ` Bin Meng
2021-05-21 15:44 ` Philippe Mathieu-Daudé
2021-05-21 12:48 ` Philippe Mathieu-Daudé [this message]
2021-05-27 6:06 ` [PATCH 1/2] hw/usb: hcd-xhci-pci: Raise MSI/MSI-X interrupts only when told to Bin Meng
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=295bd1ad-3177-8bd9-37db-7cde60dac3e2@redhat.com \
--to=philmd@redhat.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ruimei.yan@windriver.com \
/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).