On 6/10/25 18:31, Michael S. Tsirkin wrote:
On Wed, Jun 04, 2025 at 03:48:40PM +0200, Cédric Le Goater wrote:
I don't see any advantage to making this a class attribute.  I looked for 
examples
of using such attributes for vfio to configure pci, and found very little.  It
sounds like overkill since vfio already sets and gets PCIDevice members directly
in many places.

I defined skip_reset_on_cpr based on this existing example:

vfio_instance_init()
      pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS

pci_dev->cap_present can be modified at realize time. skip_reset_on_cpr
is a constant, for which a class attribute are more appropriate.
This is minor.

Michael,

   Are you ok with the 'skip_reset_on_cpr' bool ?

Generally yes, but maybe cap_present bit is even cleaner?
vfio already pokes at it, and we have history of encoding
quirks there, see QEMU_PCIE_LNKSTA_DLLLA_BITNR for example.

I agree. An extra bit in the cap_present field would be cleaner.

Thanks,

C.


Reply via email to