On 3/19/24 22:51, Chanda Mendon (cmendon) via Users wrote:
Hi
We have a chassis with a peripheral PCI device installed. We have a
hypervisor running on the chassis where we have deployed a VM which can
use the PCI device once it is attached.
When the PCI device is powered on or off we need to do a hotplug in/out
using virsh commands. Even though the virsh commands for hotplug is
executed successfully, the VM sees the PCI inside the VM for one or 2
secs. What do you think is the issue?
[root ~]# uname -a
Linux 4.18.0-372.9.1.el8.x86_64 #1 SMP Fri Mar 15 05:32:38 UTC 2024
x86_64 x86_64 x86_64 GNU/Linux
[root ~]# virsh --version
8.0.0
[root ~]# rpm -qa | grep libvirt
libvirt-daemon-driver-nwfilter-8.0.0-5.el8.x86_64
python3-libvirt-7.8.0-1.el8.x86_64
libvirt-daemon-driver-storage-logical-8.0.0-5.el8.x86_64
libvirt-libs-8.0.0-5.el8.x86_64
libvirt-daemon-config-nwfilter-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-gluster-8.0.0-5.el8.x86_64
libvirt-8.0.0-5.el8.x86_64
libvirt-daemon-8.0.0-5.el8.x86_64
libvirt-daemon-driver-nodedev-8.0.0-5.el8.x86_64
libvirt-daemon-config-network-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-iscsi-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-rbd-8.0.0-5.el8.x86_64
libvirt-daemon-driver-network-8.0.0-5.el8.x86_64
libvirt-daemon-driver-secret-8.0.0-5.el8.x86_64
python2-libvirt-python-5.10.0-1.el8.x86_64
libvirt-daemon-driver-qemu-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-core-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-iscsi-direct-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-scsi-8.0.0-5.el8.x86_64
libvirt-client-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-disk-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-8.0.0-5.el8.x86_64
libvirt-daemon-driver-interface-8.0.0-5.el8.x86_64
libvirt-daemon-driver-storage-mpath-8.0.0-5.el8.x86_64
libvirt-daemon-kvm-8.0.0-5.el8.x86_64
[root ~]# rpm -qa | grep qemu
qemu-kvm-ui-opengl-6.2.0-11.el8.x86_64
qemu-kvm-6.2.0-11.el8.x86_64
qemu-img-6.2.0-11.el8.x86_64
qemu-kvm-block-iscsi-6.2.0-11.el8.x86_64
ipxe-roms-qemu-20200823-7.git4bd064de.el8.noarch
qemu-kvm-block-gluster-6.2.0-11.el8.x86_64
qemu-kvm-block-rbd-6.2.0-11.el8.x86_64
qemu-kvm-block-curl-6.2.0-11.el8.x86_64
qemu-kvm-core-6.2.0-11.el8.x86_64
qemu-kvm-hw-usbredir-6.2.0-11.el8.x86_64
libvirt-daemon-driver-qemu-8.0.0-5.el8.x86_64
qemu-kvm-ui-spice-6.2.0-11.el8.x86_64
qemu-kvm-docs-6.2.0-11.el8.x86_64
qemu-kvm-block-ssh-6.2.0-11.el8.x86_64
qemu-kvm-common-6.2.0-11.el8.x86_64
[root ~]# *virsh nodedev-dettach** **pci_0000_04_00_0*
[12013.987821] pci_probe_reset_slot: call pci_slot_reset with probe=1
[12014.063669] pci_slot_reset (printk info): reset hotplug slot.
[12014.134164] pci_reset_hotplug_slot(printk INFO): calling reset_slot
(probe = 1)
[Mar19 21:09] pci_probe_reset_slot: call pci_slot_reset with probe=1
[ +0.075848] pci_slot_reset (printk info): reset hotplug slot.
[ +0.070495] pci_reset_hotplug_slot(printk INFO): calling reset_slot
(probe = 1)
*Device pci_0000_04_00_0 detached***
[root ~]# *virsh attach-device ROUTER8 /opt/us/bin/mrvl.xml*
[12024.217540] pci_probe_reset_slot: call pci_slot_reset with probe=1
[ +10.083376] pci_probe_reset_slot: call pci_slot_reset with
probe=1[12024.293548] pci_slot_reset (printk info): reset hotplug slot.
The fact that the device resets so often might suggest a problem with
the device itself. But since QEMU is seeing the device (even if only for
a brief period), I think libvirt's out of the picture. Perhaps QEMU
folks might have a better answer.
Michal