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@ericsson.com>,
"Jason Wang" <jasowang@redhat.com>,
"Keith Busch" <kbusch@kernel.org>,
"Klaus Jensen" <its@irrelevant.dk>,
"Markus Armbruster" <armbru@redhat.com>,
"Matthew Rosato" <mjrosato@linux.ibm.com>,
"Eric Farman" <farman@linux.ibm.com>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Shivaprasad G Bhat" <sbhat@linux.ibm.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, devel@daynix.com
Subject: Re: [PATCH v18 13/14] hw/pci: Use -1 as the default value for rombar
Date: Mon, 6 Jan 2025 08:13:43 +0100 [thread overview]
Message-ID: <1ae23ba3-30d1-4ae4-b68a-784c56040f7d@linaro.org> (raw)
In-Reply-To: <20250104-reuse-v18-13-c349eafd8673@daynix.com>
On 4/1/25 08:52, Akihiko Odaki wrote:
> vfio_pci_size_rom() distinguishes whether rombar is explicitly set to 1
> by checking dev->opts, bypassing the QOM property infrastructure.
>
> Use -1 as the default value for rombar to tell if the user explicitly
> set it to 1. The property is also converted from unsigned to signed.
> -1 is signed so it is safe to give it a new meaning. The values in
> [2 ^ 31, 2 ^ 32) become invalid, but nobody should have typed these
> values by chance.
>
> Suggested-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> ---
> include/hw/pci/pci_device.h | 2 +-
> hw/pci/pci.c | 2 +-
> hw/vfio/pci.c | 5 ++---
> 3 files changed, 4 insertions(+), 5 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2025-01-06 7:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-04 7:52 [PATCH v18 00/14] hw/pci: SR-IOV related fixes and improvements Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 01/14] hw/pci: Rename has_power to enabled Akihiko Odaki
2025-01-06 7:11 ` Philippe Mathieu-Daudé
2025-01-08 16:16 ` Philippe Mathieu-Daudé
2025-01-04 7:52 ` [PATCH v18 02/14] hw/ppc/spapr_pci: Do not create DT for disabled PCI device Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 03/14] hw/ppc/spapr_pci: Do not reject VFs created after a PF Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 04/14] s390x/pci: Avoid creating zpci for VFs Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 05/14] s390x/pci: Allow plugging SR-IOV devices Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 06/14] s390x/pci: Check for multifunction after device realization Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 07/14] pcie_sriov: Do not manually unrealize Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 08/14] pcie_sriov: Ensure VF addr does not overflow Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 09/14] pcie_sriov: Reuse SR-IOV VF device instances Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 10/14] pcie_sriov: Release VFs failed to realize Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 11/14] pcie_sriov: Remove num_vfs from PCIESriovPF Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 12/14] pcie_sriov: Register VFs after migration Akihiko Odaki
2025-01-04 7:52 ` [PATCH v18 13/14] hw/pci: Use -1 as the default value for rombar Akihiko Odaki
2025-01-06 7:13 ` Philippe Mathieu-Daudé [this message]
2025-01-04 7:52 ` [PATCH v18 14/14] hw/qdev: Remove opts member 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=1ae23ba3-30d1-4ae4-b68a-784c56040f7d@linaro.org \
--to=philmd@linaro.org \
--cc=akihiko.odaki@daynix.com \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=devel@daynix.com \
--cc=eduardo@habkost.net \
--cc=farman@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=its@irrelevant.dk \
--cc=jasowang@redhat.com \
--cc=kbusch@kernel.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mjrosato@linux.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sbhat@linux.ibm.com \
--cc=sriram.yagnaraman@ericsson.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).