Bug 2040548
Summary: | 'unassigned' address type changed after hotplug | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Yanqiu Zhang <yanqzhan> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
libvirt sub component: | Networking | QA Contact: | Yanqiu Zhang <yanqzhan> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | unspecified | ||
Priority: | unspecified | CC: | crobinso, jdenemar, jtomko, laine, lvivier, mprivozn, virt-maint, xuzhang, yafu, yalzhang, yanqzhan |
Version: | 9.0 | Keywords: | Triaged, Upstream |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-8.1.0-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-15 10:03:03 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | 8.1.0 |
Embargoed: |
Description
Yanqiu Zhang
2022-01-14 03:03:14 UTC
Yes this seems like a bug. type='unassigned' are treated like PCI devices for vfio purposes, but are not passed to the qemu command line. they shouldn't require a virtual PCI address to be allocated, and the address type shouldn't change on hotplug. FYI it's not just hotplug that suffers the same problem. A <hostdev/> with unassigned address can't be hotunpluged either. Patches posted on the list: https://listman.redhat.com/archives/libvir-list/2022-January/msg01111.html Merged upstream as: 7251307199 qemuDomainDetachDeviceLive: Handle hostevs with unassigned type of address f5de3af7f4 qemuDomainAttachHostPCIDevice: Handle hostevs with unassigned type of address 89f9346791 domain_validate: Refuse VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED v8.0.0-206-g7251307199 Tested with: libvirt-8.1.0-1.el9.x86_64 qemu-kvm-6.2.0-12.el9.x86_64 1. # cat hostdev-unassigned.xml <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x3b' slot='0x02' function='0x0'/> </source> <address type='unassigned'/> </hostdev> # virsh dumpxml r9|grep hostdev (nothing) # virsh attach-device r9 hostdev-unassigned.xml Device attached successfully # virsh dumpxml r9|grep /hostdev -B8 </video> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x3b' slot='0x02' function='0x0'/> </source> <alias name='hostdev0'/> <address type='unassigned'/> </hostdev> # virsh detach-device r9 hostdev-unassigned.xml Device detached successfully # virsh dumpxml r9|grep /hostdev -B8 (nothing) 2. # cat iface-hostdev.xml <interface type='hostdev' managed='yes'> <source> <address type='pci' domain='0x0000' bus='0x3b' slot='0x02' function='0x0'/> </source> <address type='unassigned'/> </interface> # virsh attach-device r9 iface-hostdev.xml error: Failed to attach device from iface-hostdev.xml error: unsupported configuration: address of type 'unassigned' is supported only for hostdevs # virsh edit r9 error: unsupported configuration: address of type 'unassigned' is supported only for hostdevs Failed. Try again? [y,n,i,f,?]: # virsh define r9.xml-hostdeviface error: Failed to define domain from r9.xml-hostdeviface error: unsupported configuration: address of type 'unassigned' is supported only for hostdevs Hi Michal, Could you help confirm whether result of step2 is expected please? The hostdev interface can not use 'unassigned' address type anymore. Thank you! Thanks Michal. Verified with: libvirt-8.2.0-1.el9.x86_64 qemu-kvm-6.2.0-12.el9.x86_64 Same steps and results as comment6. And same behaviors for coldplug/unplug. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: libvirt security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:8003 |