Re: [PATCH] vfio/pci: Fix instance_size of VFIO_PCI_BASE

2025-06-11 Thread John Levon
On Wed, Jun 11, 2025 at 10:42:28AM +0800, Zhenzhong Duan wrote: > Currently the final instance_size of VFIO_PCI_BASE is sizeof(PCIDevice). > It should be sizeof(VFIOPCIDevice), VFIO_PCI uses same structure as > base class VFIO_PCI_BASE, so no need to set its instance_size explicitly. > > This isn

RE: [PATCH] vfio/pci: Fix instance_size of VFIO_PCI_BASE

2025-06-11 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH] vfio/pci: Fix instance_size of VFIO_PCI_BASE > >On 6/11/25 04:42, Zhenzhong Duan wrote: >> Currently the final instance_size of VFIO_PCI_BASE is sizeof(PCIDevice). >> It should be sizeof(VFIOPCI

Re: [PATCH] vfio/pci: Fix instance_size of VFIO_PCI_BASE

2025-06-11 Thread Cédric Le Goater
On 6/11/25 04:42, Zhenzhong Duan wrote: Currently the final instance_size of VFIO_PCI_BASE is sizeof(PCIDevice). It should be sizeof(VFIOPCIDevice), VFIO_PCI uses same structure as base class VFIO_PCI_BASE, so no need to set its instance_size explicitly. This isn't catastrophic only because VFIO

Re: [PATCH] vfio/pci: Fix instance_size of VFIO_PCI_BASE

2025-06-10 Thread Yi Liu
On 2025/6/11 10:42, Zhenzhong Duan wrote: Currently the final instance_size of VFIO_PCI_BASE is sizeof(PCIDevice). For the people who has a doubt how the size is sizeof(PCIDevice). :) * @instance_size: The size of the object (derivative of #Object). If * @instance_size is 0, then the si

[PATCH] vfio/pci: Fix instance_size of VFIO_PCI_BASE

2025-06-10 Thread Zhenzhong Duan
Currently the final instance_size of VFIO_PCI_BASE is sizeof(PCIDevice). It should be sizeof(VFIOPCIDevice), VFIO_PCI uses same structure as base class VFIO_PCI_BASE, so no need to set its instance_size explicitly. This isn't catastrophic only because VFIO_PCI_BASE is an abstract class. Fixes: d4