Bug 1375410
Summary: | Hot-plugged USB redirect device cannot generate address | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pzhang> |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED ERRATA | QA Contact: | yisun |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | dyuan, jtomko, rbalakri, xuzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.1.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 17:14:13 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: | |
Embargoed: |
Description
Pei Zhang
2016-09-13 03:31:16 UTC
Pushed upstream: commit de325472cc27f57c56d0a4049fc3c58f59e8c8b4 Author: Ján Tomko <jtomko> CommitDate: 2017-01-30 16:17:35 +0100 qemu: assign USB addresses on redirdev hotplug too https://bugzilla.redhat.com/show_bug.cgi?id=1375410 git describe: v3.0.0-83-gde32547 Verified on: libvirt-3.1.0-2.el7.x86_64 Scenario 1: attach hostdev and then redirdev 1. prepare a vm without usb devices ## virsh dumpxml vm | grep usb -2 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='usb' index='0' model='piix3-uhci'> <alias name='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> 2. prepare a usb device on host ## lsusb | grep SanDisk Bus 001 Device 005: ID 0781:5567 SanDisk Corp. Cruzer Blade 3. prepare one hostdev and one redir usb device xmls ## cat hostdev.usb <hostdev mode='subsystem' type='usb'> <source startupPolicy='optional'> <vendor id='0x0781'/> <product id='0x5567'/> </source> </hostdev> ## cat redir.usb <redirdev bus='usb' type='spicevmc'/> 4. attach the hostdev usb device and check the usb addr ## virsh attach-device vm hostdev.usb Device attached successfully ## virsh dumpxml vm | grep usb -A6 ... <hostdev mode='subsystem' type='usb' managed='no'> <source startupPolicy='optional'> <vendor id='0x0781'/> <product id='0x5567'/> <address bus='1' device='5'/> </source> <alias name='hostdev0'/> <address type='usb' bus='0' port='1'/> <==== usb addr assigned </hostdev> ... 5. attach the redir usb device and check the usb addr ## virsh attach-device vm redir.usb Device attached successfully ## virsh dumpxml vm | grep usb -A6 -- <hostdev mode='subsystem' type='usb' managed='no'> <source startupPolicy='optional'> <vendor id='0x0781'/> <product id='0x5567'/> <address bus='1' device='5'/> </source> <alias name='hostdev0'/> <address type='usb' bus='0' port='1'/> </hostdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir0'/> <address type='usb' bus='0' port='2'/> <===== redirdev also has usb addr assigned </redirdev> ## virsh save vm vm.save Domain vm saved to vm.save <=== no more error Scenario 2: attach redirdev and then hostdev ====================================== 1. clean the vm's hotplugged usb devices ## virsh destroy vm; virsh start vm Domain vm destroyed Domain vm started 2. attach the redirdev first and check the usb addr ## virsh attach-device vm redir.usb Device attached successfully ## virsh dumpxml vm | grep usb -A6 -- <redirdev bus='usb' type='spicevmc'> <alias name='redir0'/> <address type='usb' bus='0' port='1'/> <==== usb addr assigned </redirdev> 3. attach the hostdev and check the usb addr ## virsh attach-device vm hostdev.usb Device attached successfully ## virsh dumpxml vm | grep usb -A6 ... <hostdev mode='subsystem' type='usb' managed='no'> <source startupPolicy='optional'> <vendor id='0x0781'/> <product id='0x5567'/> <address bus='1' device='5'/> </source> <alias name='hostdev0'/> <address type='usb' bus='0' port='2'/> <===== usb addr assigned without conflicts </hostdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir0'/> <address type='usb' bus='0' port='1'/> </redirdev> 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, 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/RHEA-2017:1846 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, 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/RHEA-2017:1846 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, 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/RHEA-2017:1846 |