Questions about vfio-pci
Quoted 12 lines
Hello Jinqian
Quoted 6 lines · yangjinqian via
Hi,
I'm observing intermittent failures when enabling the HNS3 network port in VM using
QEMU with the mainline kernel.
Quoted 10 lines
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
Quoted 56 lines
Quoted 37 lines
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_irqoperations (vector_num=2). Theenable_irqwill trap into KVM for interruptconfiguration and exit to QEMU for PCI device emulation. When emulating interrupt
Quoted 8 lines
enabling in QEMU, vfio_[intx/msi/msix]_enable calls
vfio_disable_interruptsto disableall interrupts on the vdev.
The questions are:
1.Why does the vfio-pci disable all interrupts of the device before enabling
irqs?
Quoted 7 lines
2.Is this a normal vfio-pci process or a problem?
Thanks
Jinqian
Would