From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, Cai Huoqing <caihuoqing@baidu.com>
Subject: [PULL 2/3] vfio/pci: Change to use vfio_pci_is()
Date: Tue, 13 Jul 2021 15:29:59 -0600 [thread overview]
Message-ID: <162621179924.487037.662517961301702973.stgit@omen> (raw)
In-Reply-To: <162621155674.487037.8788212042441164398.stgit@omen>
From: Cai Huoqing <caihuoqing@baidu.com>
Make use of vfio_pci_is() helper function.
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20210713014831.742-1-caihuoqing@baidu.com
[aw: commit log wording]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/vfio/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index ab4077aad23e..971273fd458b 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3058,14 +3058,14 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
}
}
- if (vdev->vendor_id == PCI_VENDOR_ID_NVIDIA) {
+ if (vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID)) {
ret = vfio_pci_nvidia_v100_ram_init(vdev, errp);
if (ret && ret != -ENODEV) {
error_report("Failed to setup NVIDIA V100 GPU RAM");
}
}
- if (vdev->vendor_id == PCI_VENDOR_ID_IBM) {
+ if (vfio_pci_is(vdev, PCI_VENDOR_ID_IBM, PCI_ANY_ID)) {
ret = vfio_pci_nvlink2_init(vdev, errp);
if (ret && ret != -ENODEV) {
error_report("Failed to setup NVlink2 bridge");
next prev parent reply other threads:[~2021-07-13 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 21:29 [PULL 0/3] VFIO update 2021-07-13 (for v6.1) Alex Williamson
2021-07-13 21:29 ` [PULL 1/3] vfio: Fix CID 1458134 in vfio_register_ram_discard_listener() Alex Williamson
2021-07-13 21:29 ` Alex Williamson [this message]
2021-07-13 21:30 ` [PULL 3/3] vfio/pci: Add pba_offset PCI quirk for BAIDU KUNLUN AI processor Alex Williamson
2021-07-14 19:45 ` [PULL 0/3] VFIO update 2021-07-13 (for v6.1) Peter Maydell
2021-07-14 20:37 ` Alex Williamson
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=162621179924.487037.662517961301702973.stgit@omen \
--to=alex.williamson@redhat.com \
--cc=caihuoqing@baidu.com \
--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).