Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1913243[details]
the VM XML and hcis.sh
Description of problem:
Support hotplug/hotunplug to these USB controller/devices:
- nec-usb-xhci
- piix3-usb-uhci
- piix4-usb-uhci
- qemu-xhci
- usb-ehci
- usb-hub
- usb-ccid
Version-Release number of selected component (if applicable):
libvirt-8.7.0-1.el9.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Start an VM
2. Try to attach USB nec-xhci controller/ccid controller/hub:
➜ ~ cat hub.xml
<hub type='usb'/>
➜ ~ virsh attach-device rhel-9.2 hub.xml
error: Failed to attach device from hub.xml
error: Operation not supported: live attach of device 'hub' is not supported
➜ ~ cat nec-xhci.xml
<controller type='usb' index='1' model='nec-xhci'/>
➜ ~ virsh attach-device rhel-9.2 nec-xhci.xml
error: Failed to attach device from nec-xhci.xml
error: Operation not supported: 'usb' controller cannot be hot plugged.
➜ ~ cat ccid.xml
<controller type='ccid' index='0'/>
➜ ~ virsh attach-device rhel-9.2 ccid.xml
error: Failed to attach device from ccid.xml
error: Operation not supported: 'ccid' controller cannot be hot plugged.
In fact, hot-plug for these devices is supported in qemu:
➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_add","arguments":{"driver":"usb-hub","bus":"usb.0","port":5,"id":"usb-hub"}}'
{"return":{},"id":"libvirt-574"}
➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_del","arguments":{"id":"usb-hub"}}'
{"return":{},"id":"libvirt-575"}
➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_add","arguments":{"driver":"usb-ccid","bus":"usb.0","port":5,"id":"usb-ccid"}}'
{"return":{},"id":"libvirt-576"}
➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_del","arguments":{"id":"usb-ccid"}}'
{"return":{},"id":"libvirt-577"}
Run hcis.sh to get all the USB controllers with hot-plug/hot-unplug support:
➜ ~ bash /tmp/hcis.sh
...
Hotplug/Hotunplug nec-usb-xhci
{"return":{},"id":"libvirt-594"}
{"return":{},"id":"libvirt-595"}
Hotplug/Hotunplug piix3-usb-uhci
{"return":{},"id":"libvirt-596"}
{"return":{},"id":"libvirt-597"}
Hotplug/Hotunplug piix4-usb-uhci
{"return":{},"id":"libvirt-598"}
{"return":{},"id":"libvirt-599"}
Hotplug/Hotunplug qemu-xhci
{"return":{},"id":"libvirt-600"}
{"return":{},"id":"libvirt-601"}
Hotplug/Hotunplug usb-ehci
{"return":{},"id":"libvirt-602"}
{"return":{},"id":"libvirt-603"}
Actual results:
As above
Expected results:
Support hotplug/hotunplug for the devices mentioned in the subject
Additional info:
See the VM XML and hcis.sh in the attachment
Created attachment 1913243 [details] the VM XML and hcis.sh Description of problem: Support hotplug/hotunplug to these USB controller/devices: - nec-usb-xhci - piix3-usb-uhci - piix4-usb-uhci - qemu-xhci - usb-ehci - usb-hub - usb-ccid Version-Release number of selected component (if applicable): libvirt-8.7.0-1.el9.x86_64 How reproducible: 100% Steps to Reproduce: 1. Start an VM 2. Try to attach USB nec-xhci controller/ccid controller/hub: ➜ ~ cat hub.xml <hub type='usb'/> ➜ ~ virsh attach-device rhel-9.2 hub.xml error: Failed to attach device from hub.xml error: Operation not supported: live attach of device 'hub' is not supported ➜ ~ cat nec-xhci.xml <controller type='usb' index='1' model='nec-xhci'/> ➜ ~ virsh attach-device rhel-9.2 nec-xhci.xml error: Failed to attach device from nec-xhci.xml error: Operation not supported: 'usb' controller cannot be hot plugged. ➜ ~ cat ccid.xml <controller type='ccid' index='0'/> ➜ ~ virsh attach-device rhel-9.2 ccid.xml error: Failed to attach device from ccid.xml error: Operation not supported: 'ccid' controller cannot be hot plugged. In fact, hot-plug for these devices is supported in qemu: ➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_add","arguments":{"driver":"usb-hub","bus":"usb.0","port":5,"id":"usb-hub"}}' {"return":{},"id":"libvirt-574"} ➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_del","arguments":{"id":"usb-hub"}}' {"return":{},"id":"libvirt-575"} ➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_add","arguments":{"driver":"usb-ccid","bus":"usb.0","port":5,"id":"usb-ccid"}}' {"return":{},"id":"libvirt-576"} ➜ ~ virsh qemu-monitor-command rhel-9.2 '{"execute":"device_del","arguments":{"id":"usb-ccid"}}' {"return":{},"id":"libvirt-577"} Run hcis.sh to get all the USB controllers with hot-plug/hot-unplug support: ➜ ~ bash /tmp/hcis.sh ... Hotplug/Hotunplug nec-usb-xhci {"return":{},"id":"libvirt-594"} {"return":{},"id":"libvirt-595"} Hotplug/Hotunplug piix3-usb-uhci {"return":{},"id":"libvirt-596"} {"return":{},"id":"libvirt-597"} Hotplug/Hotunplug piix4-usb-uhci {"return":{},"id":"libvirt-598"} {"return":{},"id":"libvirt-599"} Hotplug/Hotunplug qemu-xhci {"return":{},"id":"libvirt-600"} {"return":{},"id":"libvirt-601"} Hotplug/Hotunplug usb-ehci {"return":{},"id":"libvirt-602"} {"return":{},"id":"libvirt-603"} Actual results: As above Expected results: Support hotplug/hotunplug for the devices mentioned in the subject Additional info: See the VM XML and hcis.sh in the attachment