On Sun, Jul 02, 2023 at 06:49:50PM +0900, Akihiko Odaki wrote:
> On 2023/07/02 18:00, Michael S. Tsirkin wrote:
> > On Sun, Jul 02, 2023 at 05:33:56PM +0900, Akihiko Odaki wrote:
> > > The ARI next function number field is undefined for VF so the PF should
> > > end the linked list formed with the field by specifying 0.
> > > 
> > > Fixes: 3a977deebe ("Intrdocue igb device emulation")
> > > Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com>
> > 
> > 
> > I would also change it for the VF just so people don't wonder
> > what's the magic value. Do document in commit log though.
> > 
> > Maybe just drop this parameter from pcie_ari_init completely
> > for now?
> 
> I sent v2, but it doesn't change the field for VFs either to save code for
> migration. The parameter for pcie_ari_init() also remains to migrate from
> older versions.

For migration, stick the boolean in PCIDevice::cap_present. Use 
QEMU_PCIE_ERR_UNC_MASK_BITNR as
a template.


> > 
> > 
> > > ---
> > >   hw/net/igb.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/hw/net/igb.c b/hw/net/igb.c
> > > index 1c989d7677..897386fc09 100644
> > > --- a/hw/net/igb.c
> > > +++ b/hw/net/igb.c
> > > @@ -431,7 +431,7 @@ static void igb_pci_realize(PCIDevice *pci_dev, Error 
> > > **errp)
> > >           hw_error("Failed to initialize AER capability");
> > >       }
> > > -    pcie_ari_init(pci_dev, 0x150, 1);
> > > +    pcie_ari_init(pci_dev, 0x150, 0);
> > >       pcie_sriov_pf_init(pci_dev, IGB_CAP_SRIOV_OFFSET, TYPE_IGBVF,
> > >           IGB_82576_VF_DEV_ID, IGB_MAX_VF_FUNCTIONS, IGB_MAX_VF_FUNCTIONS,
> > > -- 
> > > 2.41.0
> > 


Reply via email to