Bug 1591240
Summary: | coldplug allows source for all input devices | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | jiyan <jiyan> |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Lili Zhu <lizhu> |
Severity: | unspecified | Docs Contact: | |
Priority: | low | ||
Version: | 8.0 | CC: | dyuan, fjin, jiyan, jtomko, virt-bugs, xuzhang |
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-4.5.0-9.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1591151 | Environment: | |
Last Closed: | 2019-06-14 01:24:45 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: | |||
Bug Depends On: | 1591151 | ||
Bug Blocks: |
Description
jiyan
2018-06-14 11:18:39 UTC
Pushed upstream as: commit deb057fd364cb57614c6dea7b05c247231f9ae4f Author: Han Han <hhan> AuthorDate: 2018-07-26 15:27:33 +0800 Commit: John Ferlan <jferlan> CommitDate: 2018-07-26 17:16:01 -0400 conf: Add validation of input devices https://bugzilla.redhat.com/show_bug.cgi?id=1591151 Add function virDomainInputDefValidate to validate input devices. Make sure evdev attribute of source element is not used by mouse, keyboard, and tablet input device. Signed-off-by: Han Han <hhan> Reviewed-by: John Ferlan <jferlan> git describe: v4.5.0-308-gdeb057fd36 contains: v4.6.0-rc1~49 Verify this bug with: libvirt-daemon-4.5.0-12.el8.x86_64 qemu-kvm-2.12.0-41.el8.x86_64 steps: 1) Check the input devices on the server # ll /dev/input/by-path/ total 0 lrwxrwxrwx. 1 root root 9 Oct 30 10:55 pci-0000:00:14.0-usb-0:2:1.0-event-kbd -> ../event2 lrwxrwxrwx. 1 root root 9 Nov 26 12:59 pci-0000:00:14.0-usb-0:4:1.0-event-mouse -> ../event3 2) prepare a input xml snippet with type "mouse". # cat virtio.xml <input type='mouse' bus='virtio'> <source evdev='/dev/input/event3'/> </input> 3) coldplug virtio.xml to guest # virsh attach-device avocado-vt-vm1 virtio.xml --config error: Failed to attach device from virtio.xml error: XML error: setting source evdev path only supported for passthrough input device 4)hotplug virtio.xml to guest # virsh attach-device avocado-vt-vm1 virtio.xml --live error: Failed to attach device from virtio.xml error: XML error: setting source evdev path only supported for passthrough input devices 5) prepare a input xml snippet with type "keyboard". # cat virtio.xml <input type='keyboard' bus='virtio'> <source evdev='/dev/input/event2'/> </input> 3) coldplug virtio.xml to guest # virsh attach-device avocado-vt-vm1 virtio.xml --config error: Failed to attach device from virtio.xml error: XML error: setting source evdev path only supported for passthrough input device 4)hotplug virtio.xml to guest # virsh attach-device avocado-vt-vm1 virtio.xml --live error: Failed to attach device from virtio.xml error: XML error: setting source evdev path only supported for passthrough input devices I also tried other bus type, including "ps2" and "usb", when attach the xml to the guest, will return the same error message. As the results match with expected results, mark the bug as verified. |