On 2013年12月05日 19:41, Daniel P. Berrange wrote:
On Mon, Dec 02, 2013 at 03:27:09PM +0800, Li Zhang wrote:
From: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>
PS2 devices are not supported for non-x86 platforms. So it needs one USB
keyboard when graphic is enabled.
This patch is to add one kbd input device type for users to add one
USB keyboard in XML file as the following:
<input type='kbd' bus='usb'/>
Signed-off-by: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>
---
src/conf/domain_conf.c | 3 ++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 3 +++
src/qemu/qemu_capabilities.h | 2 ++
src/qemu/qemu_command.c | 12 +++++++++---
5 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7b0e3ea..d90f05c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -504,7 +504,8 @@ VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
VIR_ENUM_IMPL(virDomainInput, VIR_DOMAIN_INPUT_TYPE_LAST,
"mouse",
- "tablet")
+ "tablet",
+ "kbd")
VIR_ENUM_IMPL(virDomainInputBus, VIR_DOMAIN_INPUT_BUS_LAST,
"ps2",
This is insufficient. If you look through domain_conf.c you'll find
lots of places referencing VIR_DOMAIN_INPUT_TYPE_{MOUSE,TABLET} which
do special handling. We're going to need much the same for the new
KEYBOARD device too.
And both the Xen driver and QEMU driver will need updating to take
into account the new device type.
OK, I will look through these places to do some changes.
Daniel
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list