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 keymap to vfb config for existing hvm guests

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Add keymap to vfb config for existing hvm guests
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Mon, 07 Dec 2009 17:01:29 -0700
Delivery-date: Mon, 07 Dec 2009 16:04:12 -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: Thunderbird 2.0.0.23 (X11/20090817)
I submitted a patch a while back [1] to add keymap to vfb config for hvm
guests.  This patch works fine for new config (xm create|new) but not
existing, managed guests.  To cover the latter case I introduced a
validator method in XendConfig - patch attached.

Regards,
Jim

[1] http://lists.xensource.com/archives/html/xen-devel/2009-10/msg01228.html

     Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>

diff -r 0fb962a5dad3 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Mon Dec 07 14:10:27 2009 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Mon Dec 07 16:49:54 2009 -0700
@@ -518,6 +518,14 @@
                self['platform'].get('enable_audio'):
                 self['platform']['soundhw'] = 'sb16'
 
+    def _vfb_sanity_check(self):
+        if 'keymap' in self['platform']:
+            for con in self['console_refs']:
+                if self['devices'][con][0] == 'vfb':
+                    if 'keymap' not in self['devices'][con][1]:
+                        self['devices'][con][1]['keymap'] = \
+                            self['platform']['keymap']
+
     def validate(self):
         self._uuid_sanity_check()
         self._name_sanity_check()
@@ -525,6 +533,7 @@
         self._actions_sanity_check()
         self._vcpus_sanity_check()
         self._platform_sanity_check()
+        self._vfb_sanity_check()
 
     def _dominfo_to_xapi(self, dominfo, update_mem = False):
         self['domid'] = dominfo['domid']
_______________________________________________
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 keymap to vfb config for existing hvm guests, Jim Fehlig <=