From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Akihiko Odaki" <akihiko.odaki@daynix.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Sriram Yagnaraman" <sriram.yagnaraman@est.tech>,
"Jason Wang" <jasowang@redhat.com>,
"Keith Busch" <kbusch@kernel.org>,
"Klaus Jensen" <its@irrelevant.dk>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH v2 2/6] vfio: Avoid inspecting option QDict for rombar
Date: Mon, 12 Feb 2024 09:04:23 +0100 [thread overview]
Message-ID: <318f6a01-a72e-417e-8017-80a758605e98@linaro.org> (raw)
In-Reply-To: <20240210-reuse-v2-2-24ba2a502692@daynix.com>
On 10/2/24 11:24, Akihiko Odaki wrote:
> Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly
> enabled.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> hw/vfio/pci.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index d7fe06715c4b..44178ac9355f 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -1010,7 +1010,6 @@ static void vfio_pci_size_rom(VFIOPCIDevice *vdev)
> {
> uint32_t orig, size = cpu_to_le32((uint32_t)PCI_ROM_ADDRESS_MASK);
> off_t offset = vdev->config_offset + PCI_ROM_ADDRESS;
> - DeviceState *dev = DEVICE(vdev);
> char *name;
> int fd = vdev->vbasedev.fd;
>
> @@ -1044,7 +1043,7 @@ static void vfio_pci_size_rom(VFIOPCIDevice *vdev)
> }
>
> if (vfio_opt_rom_in_denylist(vdev)) {
> - if (dev->opts && qdict_haskey(dev->opts, "rombar")) {
> + if (pci_rom_bar_explicitly_enabled(&vdev->pdev)) {
"pdev" is considered internal field, please use the DEVICE() macro
to access it. With that:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2024-02-12 8:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-10 10:24 [PATCH v2 0/6] hw/pci: SR-IOV related fixes and improvements Akihiko Odaki
2024-02-10 10:24 ` [PATCH v2 1/6] hw/pci: Determine if rombar is explicitly enabled Akihiko Odaki
2024-02-12 8:02 ` Philippe Mathieu-Daudé
2024-02-10 10:24 ` [PATCH v2 2/6] vfio: Avoid inspecting option QDict for rombar Akihiko Odaki
2024-02-12 8:04 ` Philippe Mathieu-Daudé [this message]
2024-02-12 8:25 ` Cédric Le Goater
2024-02-12 9:57 ` Akihiko Odaki
2024-02-10 10:24 ` [PATCH v2 3/6] hw/qdev: Remove opts member Akihiko Odaki
2024-02-12 8:04 ` Philippe Mathieu-Daudé
2024-02-10 10:24 ` [PATCH v2 4/6] pcie_sriov: Validate NumVFs Akihiko Odaki
2024-02-10 10:24 ` [PATCH v2 5/6] pcie_sriov: Reuse SR-IOV VF device instances Akihiko Odaki
2024-02-10 10:24 ` [PATCH v2 6/6] pcie_sriov: Release VFs failed to realize Akihiko Odaki
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=318f6a01-a72e-417e-8017-80a758605e98@linaro.org \
--to=philmd@linaro.org \
--cc=akihiko.odaki@daynix.com \
--cc=alex.williamson@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=eduardo@habkost.net \
--cc=its@irrelevant.dk \
--cc=jasowang@redhat.com \
--cc=kbusch@kernel.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sriram.yagnaraman@est.tech \
/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).