qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Cai Huoqing <cai.huoqing@linux.dev>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] vfio/pci: Don't setup VFIO MSI-X for Kunlun VF
Date: Tue, 21 Dec 2021 12:16:15 -0700	[thread overview]
Message-ID: <20211221121615.67166113.alex.williamson@redhat.com> (raw)
In-Reply-To: <20211214054534.6633-1-cai.huoqing@linux.dev>

On Tue, 14 Dec 2021 13:45:34 +0800
Cai Huoqing <cai.huoqing@linux.dev> wrote:

> No support MSI-X in BAIDU KUNLUN Virtual Function devices,
> so add a quirk to avoid setuping VFIO MSI-X
> 
> Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
> ---
>  hw/vfio/pci.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index 7b45353ce2..15f76bbe56 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -1994,6 +1994,13 @@ static int vfio_add_std_cap(VFIOPCIDevice *vdev, uint8_t pos, Error **errp)
>          ret = vfio_setup_pcie_cap(vdev, pos, size, errp);
>          break;
>      case PCI_CAP_ID_MSIX:
> +        /*
> +         * BAIDU KUNLUN Virtual Function devices for KUNLUN AI processor
> +         * don't support MSI-X, so don't setup VFIO MSI-X here.
> +         */
> +        if (vdev->vendor_id == PCI_VENDOR_ID_BAIDU &&
> +            vdev->device_id == PCI_DEVICE_ID_KUNLUN_VF)
> +            break;
>          ret = vfio_msix_setup(vdev, pos, errp);
>          break;
>      case PCI_CAP_ID_PM:


So the VF exposes an MSI-X capability but it's entirely unsupported
and/or bogus?  If it's not bogus, why can't we support it?  How does
the host kernel driver know to avoid MSI-X?  Should we use the same
mechanism used by the host driver to quirk whether vfio-pci exposes the
MSI-X capability to userspace at all?  Thanks,

Alex



      reply	other threads:[~2021-12-21 19:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14  5:45 [PATCH] vfio/pci: Don't setup VFIO MSI-X for Kunlun VF Cai Huoqing
2021-12-21 19:16 ` Alex Williamson [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=20211221121615.67166113.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=cai.huoqing@linux.dev \
    --cc=qemu-devel@nongnu.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).