WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxl: add a vkbd device to HVM guests by default

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxl: add a vkbd device to HVM guests by default
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 24 Jun 2011 17:29:50 +0100
Delivery-date: Fri, 24 Jun 2011 09:26:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
PV on HVM drivers can connect to the vkbd device to receive mouse and
keyboard events from Qemu. The advantage over USB is that vkbd doesn't
require frequent wakeups in Qemu.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r f17956fd6976 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Fri Jun 17 16:10:48 2011 +0000
+++ b/tools/libxl/libxl_create.c        Fri Jun 24 16:19:29 2011 +0000
@@ -469,6 +469,7 @@ static int do_domain_create(libxl__gc *g
     }
     if (d_config->c_info.hvm) {
         libxl_device_console console;
+        libxl_device_vkb vkb;
 
         ret = init_console_info(&console, 0);
         if ( ret )
@@ -476,6 +477,11 @@ static int do_domain_create(libxl__gc *g
         libxl__device_console_add(gc, domid, &console, &state);
         libxl_device_console_destroy(&console);
 
+
+        memset(&vkb, 0x00, sizeof(vkb));
+        libxl_device_vkb_add(ctx, domid, &vkb);
+        libxl_device_vkb_destroy(&vkb);
+
         dm_info->domid = domid;
         ret = libxl__create_device_model(gc, dm_info,
                                         d_config->disks, d_config->num_disks,

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel