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] Add a vkbd frontend/backend pair for HVM guests

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Add a vkbd frontend/backend pair for HVM guests
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Tue, 8 Nov 2011 12:18:17 +0000
Delivery-date: Tue, 08 Nov 2011 04:18:29 -0800
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)
Linux PV on HVM guests can use vkbd, so add a vkbd frontend/backend pair
for HVM guests by default.
It is useful because it doesn't require frequent qemu wakeups as the usb
keyboard/mouse does.

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

diff -r 54a5e994a241 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Wed Nov 02 17:09:09 2011 +0000
+++ b/tools/libxl/libxl_create.c        Tue Nov 08 11:30:16 2011 +0000
@@ -507,6 +507,7 @@ static int do_domain_create(libxl__gc *g
     case LIBXL_DOMAIN_TYPE_HVM:
     {
         libxl_device_console console;
+        libxl_device_vkb vkb;
 
         ret = init_console_info(&console, 0);
         if ( ret )
@@ -514,6 +515,12 @@ static int do_domain_create(libxl__gc *g
         libxl__device_console_add(gc, domid, &console, &state);
         libxl_device_console_dispose(&console);
 
+        ret = libxl_device_vkb_init(ctx, &vkb);
+        if ( ret )
+            goto error_out;
+        libxl_device_vkb_add(ctx, domid, &vkb);
+        libxl_device_vkb_dispose(&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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Add a vkbd frontend/backend pair for HVM guests, Stefano Stabellini <=