Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-740

[RFE] Support to hotplug/hotunplug for usb controllers/hub/ccid/sata/virtio-serial controller

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • None
    • rhel-virt-core-libvirt-1
    • ssg_virtualization
    • None
    • QE ack
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      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

              virt-maint virt-maint
              rhn-support-hhan Han Han
              virt-maint virt-maint
              Han Han Han Han
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: