> 
> Hello Jinqian
> 
> On 3/25/25 09:00, yangjinqian via wrote:
> > Hi,
> >
> > I'm observing intermittent failures when enabling the HNS3 network
> > port in VM using
> >
> > QEMU with the mainline kernel.
> 
> 
> Would you mind opening a gitlab issue with more details on the context, host,
> guest, HW ?
> 
>     https://gitlab.com/qemu-project/qemu/-/issues/
> 
> Thanks,
> 
> C.
> 
> 
Hi, Cédric

I've added the details to the gitlab issue.

https://gitlab.com/qemu-project/qemu/-/issues/2884

thanks,
Jinqian
> 
> 
> > HNS3 drive in kernel:
> >
> > static int hns3_nic_net_up(struct net_device *netdev)
> >
> > {
> >
> > ......
> >
> >         /* enable the vectors */
> >
> >         for (i = 0; i < vector_num; i++)
> >
> > {
> >
> > napi_enable(napi);
> >
> >               enable_irq(vector_irq);
> >
> >               hns3_mask_vector_irq(tqp_vector, 1);
> >
> >         }
> >
> > ......
> >
> > }
> >
> > When the VM has two vCPUs, the guest HNS3 driver performs two
> > sequential
> >
> > enable_irq operations (vector_num=2). The enable_irq will trap into
> > KVM for interrupt
> >
> > configuration and exit to QEMU for PCI device emulation. When
> > emulating interrupt
> >
> > enabling in QEMU, vfio_[intx/msi/msix]_enable calls
> > vfio_disable_interrupts to disable
> >
> > all interrupts on the vdev.
> >
> > The questions are:
> >
> > 1.Why does the vfio-pci disable all interrupts of the device before enabling
> irqs?
> >
> > 2.Is this a normal vfio-pci process or a problem?
> >
> > Thanks
> >
> > Jinqian
> >
> 
> Would
> 

Reply via email to