mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
qemu: Add USB keyboard capability
Add USB keyboard capability probing and test cases. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b39275954b
commit
f5ffd45f4c
@ -249,6 +249,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
|
||||
"enable-fips",
|
||||
"spice-file-xfer-disable",
|
||||
"spiceport",
|
||||
|
||||
"usb-kbd", /* 165 */
|
||||
);
|
||||
|
||||
struct _virQEMUCaps {
|
||||
@ -1403,6 +1405,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
|
||||
{ "virtio-mmio", QEMU_CAPS_DEVICE_VIRTIO_MMIO },
|
||||
{ "ich9-intel-hda", QEMU_CAPS_DEVICE_ICH9_INTEL_HDA },
|
||||
{ "pvpanic", QEMU_CAPS_DEVICE_PANIC },
|
||||
{ "usb-kbd", QEMU_CAPS_DEVICE_USB_KBD },
|
||||
};
|
||||
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {
|
||||
|
@ -203,6 +203,7 @@ enum virQEMUCapsFlags {
|
||||
QEMU_CAPS_ENABLE_FIPS = 162, /* -enable-fips */
|
||||
QEMU_CAPS_SPICE_FILE_XFER_DISABLE = 163, /* -spice disable-agent-file-xfer */
|
||||
QEMU_CAPS_CHARDEV_SPICEPORT = 164, /* -chardev spiceport */
|
||||
QEMU_CAPS_DEVICE_USB_KBD = 165, /* -device usb-kbd */
|
||||
|
||||
QEMU_CAPS_LAST, /* this must always be the last item */
|
||||
};
|
||||
|
@ -113,4 +113,5 @@
|
||||
<flag name='usb-storage.removable'/>
|
||||
<flag name='kvm-pit-lost-tick-policy'/>
|
||||
<flag name='enable-fips'/>
|
||||
<flag name='usb-kbd'/>
|
||||
</qemuCaps>
|
||||
|
@ -126,4 +126,5 @@
|
||||
<flag name='usb-storage'/>
|
||||
<flag name='usb-storage.removable'/>
|
||||
<flag name='kvm-pit-lost-tick-policy'/>
|
||||
<flag name='usb-kbd'/>
|
||||
</qemuCaps>
|
||||
|
@ -127,4 +127,5 @@
|
||||
<flag name='usb-storage.removable'/>
|
||||
<flag name='ich9-intel-hda'/>
|
||||
<flag name='kvm-pit-lost-tick-policy'/>
|
||||
<flag name='usb-kbd'/>
|
||||
</qemuCaps>
|
||||
|
@ -135,4 +135,5 @@
|
||||
<flag name='pvpanic'/>
|
||||
<flag name='reboot-timeout'/>
|
||||
<flag name='spiceport'/>
|
||||
<flag name='usb-kbd'/>
|
||||
</qemuCaps>
|
||||
|
@ -141,4 +141,5 @@
|
||||
<flag name='enable-fips'/>
|
||||
<flag name='spice-file-xfer-disable'/>
|
||||
<flag name='spiceport'/>
|
||||
<flag name='usb-kbd'/>
|
||||
</qemuCaps>
|
||||
|
@ -139,4 +139,5 @@
|
||||
<flag name='reboot-timeout'/>
|
||||
<flag name='spice-file-xfer-disable'/>
|
||||
<flag name='spiceport'/>
|
||||
<flag name='usb-kbd'/>
|
||||
</qemuCaps>
|
||||
|
@ -403,6 +403,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
||||
QEMU_CAPS_DEVICE_USB_SERIAL,
|
||||
QEMU_CAPS_DEVICE_USB_NET,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
||||
DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
@ -515,6 +516,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_USB_NET,
|
||||
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_SCSI_GENERIC,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_DEVICE_USB_STORAGE);
|
||||
DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
@ -581,6 +583,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
||||
QEMU_CAPS_DEVICE_USB_SERIAL,
|
||||
QEMU_CAPS_DEVICE_USB_NET,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
||||
DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
@ -655,6 +658,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_VGA,
|
||||
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
||||
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_DEVICE_USB_STORAGE);
|
||||
DO_TEST("qemu-1.0", 1000000, 0, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
@ -739,6 +743,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_USB_NET,
|
||||
QEMU_CAPS_DEVICE_SCSI_GENERIC,
|
||||
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_DEVICE_USB_STORAGE);
|
||||
DO_TEST("qemu-1.1.0", 1001000, 0, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
@ -835,6 +840,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_SCSI_GENERIC,
|
||||
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
|
||||
QEMU_CAPS_VNC_SHARE_POLICY,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_DEVICE_USB_STORAGE);
|
||||
DO_TEST("qemu-1.2.0", 1002000, 0, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
@ -943,6 +949,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
|
||||
QEMU_CAPS_VNC_SHARE_POLICY,
|
||||
QEMU_CAPS_DEVICE_USB_STORAGE,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_USB_STORAGE_REMOVABLE);
|
||||
DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
@ -1056,6 +1063,7 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
|
||||
QEMU_CAPS_VNC_SHARE_POLICY,
|
||||
QEMU_CAPS_DEVICE_USB_STORAGE,
|
||||
QEMU_CAPS_DEVICE_USB_KBD,
|
||||
QEMU_CAPS_USB_STORAGE_REMOVABLE);
|
||||
|
||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user