On 08/09/2025 13:41, Cédric Le Goater wrote:

On 7/15/25 11:25, Mark Cave-Ayland wrote:
Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of
accessing pdev directly.

Signed-off-by: Mark Cave-Ayland <[email protected]>
---
  hw/vfio/pci.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 16f092a0c6..c0c3d68742 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -206,7 +206,7 @@ static inline bool vfio_pci_is(VFIOPCIDevice *vdev, uint32_t vendor, uint32_t de
  static inline bool vfio_is_vga(VFIOPCIDevice *vdev)
  {
-    PCIDevice *pdev = &vdev->pdev;
+    PCIDevice *pdev = PCI_DEVICE(vdev);
      uint16_t class = pci_get_word(pdev->config + PCI_CLASS_DEVICE);
      return class == PCI_CLASS_DISPLAY_VGA;


This patch does not apply anymore. I will drop it.
Thanks,

C.

Thanks for the heads-up - I'll take a look and come up with an updated version.


ATB,

Mark.


Reply via email to