Bug 1524837
Summary: | virtio input device still in the live xml after hotunplug from the guest with q35 machine type | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yafu <yafu> |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED ERRATA | QA Contact: | Meina Li <meili> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.5 | CC: | dyuan, fjin, jdenemar, lmen, lmiksik, rbalakri, salmy, xuzhang, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.9.0-7.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 11:02:08 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
yafu
2017-12-12 08:45:03 UTC
The part removing the device if the DEVICE_DELETED event is received after the API ends was not implemented: https://www.redhat.com/archives/libvir-list/2017-December/msg00505.html I have no idea why it takes longer on a q35 machine. Pushed upstream as: commit 8d51042ef873d2a868d505f0eff32346ba041a95 Author: Ján Tomko <jtomko> CommitDate: 2017-12-14 16:36:03 +0100 qemu: remove input device after receiving the event Also call qemuDomainRemoveInputDevice if we receive the event after the Detach API ends. Commit 67486bb failed to include this. https://bugzilla.redhat.com/show_bug.cgi?id=1524837 Signed-off-by: Ján Tomko <jtomko> Reviewed-by: Erik Skultety <eskultet> git describe: v3.10.0-71-g8d51042ef Verified on libvirt-3.9.0-7.el7.x86_64 and qemu-kvm-rhev-2.10.0-15.el7.x86_64. Scenario 1: hot-unplug after cold-plug 1.Start a guest with q35 machine type and passthrough input device: #virsh dumpxml ovmf <os> <type arch='x86_64' machine='pc-q35-rhel7.5.0'>hvm</type> <boot dev='hd'/> </os> ... <input type='passthrough' bus='virtio'> <source evdev='/dev/input/event4'/> <alias name='input3'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </input> 2.Prepare the input device xml: #cat input.xml <input type='passthrough' bus='virtio'> <source evdev='/dev/input/event4'/> <alias name='input3'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </input> 3.Hot-unplug the input device from guest: #virsh detach-device rhel7 input.xml Device detached successfully # virsh dumpxml lmn | grep input -a4 ... <input type='tablet' bus='usb'> <alias name='input0'/> <address type='usb' bus='0' port='1'/> </input> <input type='mouse' bus='ps2'> <alias name='input1'/> </input> <input type='keyboard' bus='ps2'> <alias name='input2'/> </input> <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'> ... 4.Do mangedsave and restore: #virsh managedsave rhel7 Domain rhel7 state saved by libvirt #virsh start rhel7 Domain rhel7 started # virsh dumpxml lmn | grep input -a4 ... <input type='tablet' bus='usb'> <alias name='input0'/> <address type='usb' bus='0' port='1'/> </input> <input type='mouse' bus='ps2'> <alias name='input1'/> </input> <input type='keyboard' bus='ps2'> <alias name='input2'/> </input> <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'> ... Scenario 2: hot-unplug after hotplug 1.Start a guest with q35 machine type. 2. Prepare the input device xml: #cat input.xml <input type='passthrough' bus='virtio'> <source evdev='/dev/input/event4'/> <alias name='input3'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </input> 3. Hotplug the input device. # virsh attach-device lmn input.xml Device attached successfully # virsh dumpxml rhel7 | grep passthrough -a4 </input> <input type='keyboard' bus='ps2'> <alias name='input2'/> </input> <input type='passthrough' bus='virtio'> <source evdev='/dev/input/event4'/> <alias name='input3'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </input> 4. Hot-unplug the input device from guest: #virsh detach-device rhel7 input.xml Device detached successfully # virsh dumpxml lmn | grep input -a4 ... <input type='tablet' bus='usb'> <alias name='input0'/> <address type='usb' bus='0' port='1'/> </input> <input type='mouse' bus='ps2'> <alias name='input1'/> </input> <input type='keyboard' bus='ps2'> <alias name='input2'/> </input> <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'> ... 5. Do mangedsave and restore: #virsh managedsave rhel7 Domain rhel7 state saved by libvirt #virsh start rhel7 Domain rhel7 started # virsh dumpxml lmn | grep input -a4 ... <input type='tablet' bus='usb'> <alias name='input0'/> <address type='usb' bus='0' port='1'/> </input> <input type='mouse' bus='ps2'> <alias name='input1'/> </input> <input type='keyboard' bus='ps2'> <alias name='input2'/> </input> <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'> ... Both test on seabios and ovmf, and the result is expected, move it to be verified. 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-2018:0704 |