* [Patch] Fix keymap support for PVFB.
@ 2007-07-02 10:51 Kasai Takanori
2007-07-02 12:09 ` Daniel P. Berrange
0 siblings, 1 reply; 5+ messages in thread
From: Kasai Takanori @ 2007-07-02 10:51 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]
Hi All,
We had added the patch to support the keymap with PVFB before.
When the keymap is specified with vncfb, it converts it as a keyboard of the
setting.
When the keymap is not specified, it is converted as en-us.
Configuration file :
keymap="ja"
It converts to keycode from keysym on the BackEnd side.
The converted keycode is transmitted to the FrontEnd side.
Next, the keycode is received on the FrontEnd side of PVFB, and it passes to
GuestOS.
It is not correctly converted because there is not the conversion processing of
keyboard
driver for the GuestOS.
Therefore, the conversion processing by the keyboard driver is done on the
BackEnd side now.
However, I think that it should do this with xenkbd who is originally the driver
on the FrontEnd side.
It will be problem if the HVM domain is working on PVFB in the future.
For HVM domain, The keycode that the keyboard driver on guest OS received from
qemu-dm is converted.
It will convert further in the HVM domain when converting it with PVFB
beforehand, and a correct key cannot be input.
This patch transplanted the conversion processing of the keyboard driver on the
GuestOS side to xenkbd.
We are not supporting the keymap for sdl because we do not understand sdl in
detail.
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Junko Ichino <ichino.junko@jp.fujitsu.com>
Best Regards,
--
Takanori Kasai
[-- Attachment #2: fix-fbfront-xenkbd-driver.patch --]
[-- Type: application/octet-stream, Size: 3359 bytes --]
# HG changeset patch
# User kasai.takanori@jp.fujitsu.com
# Date 1183365791 -32400
# Node ID 287d57be6345ec0ed9dd8e110078d4870e8301bc
# Parent 0be610b725fae4cd6de8f0b111660a186f93b86d
Fix keymap support for PVFB.
- Keyboard driver's conversion processing is added. (atkbd.c)
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Junko Ichino <ichino.junko@jp.fujitsu.com>
diff -r 0be610b725fa -r 287d57be6345 drivers/xen/fbfront/xenkbd.c
--- a/drivers/xen/fbfront/xenkbd.c Wed Jun 27 16:31:36 2007 +0100
+++ b/drivers/xen/fbfront/xenkbd.c Mon Jul 02 17:43:11 2007 +0900
@@ -36,6 +36,43 @@ struct xenkbd_info
struct xenbus_device *xbdev;
char phys[32];
};
+
+static unsigned char atkbd_set2_keycode[512] = {
+
+ 0, 67, 65, 63, 61, 59, 60, 88, 0, 68, 66, 64, 62, 15, 41,117,
+ 0, 56, 42, 93, 29, 16, 2, 0, 0, 0, 44, 31, 30, 17, 3, 0,
+ 0, 46, 45, 32, 18, 5, 4, 95, 0, 57, 47, 33, 20, 19, 6,183,
+ 0, 49, 48, 35, 34, 21, 7,184, 0, 0, 50, 36, 22, 8, 9,185,
+ 0, 51, 37, 23, 24, 11, 10, 0, 0, 52, 53, 38, 39, 25, 12, 0,
+ 0, 89, 40, 0, 26, 13, 0, 0, 58, 54, 28, 27, 0, 43, 0, 85,
+ 0, 86, 91, 90, 92, 0, 14, 94, 0, 79,124, 75, 71,121, 0, 0,
+ 82, 83, 80, 76, 77, 72, 1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 217,100,255, 0, 97,165, 0, 0,156, 0, 0, 0, 0, 0, 0,125,
+ 173,114, 0,113, 0, 0, 0,126,128, 0, 0,140, 0, 0, 0,127,
+ 159, 0,115, 0,164, 0, 0,116,158, 0,150,166, 0, 0, 0,142,
+ 157, 0, 0, 0, 0, 0, 0, 0,155, 0, 98, 0, 0,163, 0, 0,
+ 226, 0, 0, 0, 0, 0, 0, 0, 0,255, 96, 0, 0, 0,143, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,107, 0,105,102, 0, 0,112,
+ 110,111,108,112,106,103, 0,119, 0,118,109, 0, 99,104,119, 0,
+
+};
+
+static unsigned char atkbd_unxlate_table[128] = {
+
+ 0,118, 22, 30, 38, 37, 46, 54, 61, 62, 70, 69, 78, 85,102, 13,
+ 21, 29, 36, 45, 44, 53, 60, 67, 68, 77, 84, 91, 90, 20, 28, 27,
+ 35, 43, 52, 51, 59, 66, 75, 76, 82, 14, 18, 93, 26, 34, 33, 42,
+ 50, 49, 58, 65, 73, 74, 89,124, 17, 41, 88, 5, 6, 4, 12, 3,
+ 11, 2, 10, 1, 9,119,126,108,117,125,123,107,115,116,121,105,
+ 114,122,112,113,127, 96, 97,120, 7, 15, 23, 31, 39, 47, 55, 63,
+ 71, 79, 86, 94, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 87,111,
+ 19, 25, 57, 81, 83, 92, 95, 98, 99,100,101,103,104,106,109,110
+
+};
+
+unsigned char keycode_table[512];
static int xenkbd_remove(struct xenbus_device *);
static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
@@ -74,7 +111,7 @@ static irqreturn_t input_handler(int rq,
if (test_bit(event->key.keycode, info->ptr->keybit))
dev = info->ptr;
if (dev)
- input_report_key(dev, event->key.keycode,
+ input_report_key(dev, keycode_table[event->key.keycode],
event->key.pressed);
else
printk("xenkbd: unhandled keycode 0x%x\n",
@@ -139,6 +176,12 @@ int __devinit xenkbd_probe(struct xenbus
goto error;
}
info->kbd = kbd;
+
+ for (i = 0; i < 128; i++) {
+ keycode_table[i] = atkbd_set2_keycode[atkbd_unxlate_table[i]];
+ keycode_table[i | 0x80] =
+ atkbd_set2_keycode[atkbd_unxlate_table[i] | 0x80];
+ }
/* pointing device */
ptr = input_allocate_device();
[-- Attachment #3: fix-tools-vncfb-keymap.patch --]
[-- Type: application/octet-stream, Size: 3261 bytes --]
# HG changeset patch
# User kasai.takanori@jp.fujitsu.com
# Date 1183365586 -32400
# Node ID f58b42f513ff9665bba107dfff9ae4000342befd
# Parent ba0c7d3800ead37bd06171421e0254078de3cb53
Fix keymap support for PVFB.
- Keyboard driver's conversion processing is deleted.
It is added to xenkbd driver on FrontEnd.
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Junko Ichino <ichino.junko@jp.fujitsu.com>
diff -r ba0c7d3800ea -r f58b42f513ff tools/xenfb/vncfb.c
--- a/tools/xenfb/vncfb.c Mon Jul 02 14:20:54 2007 +0900
+++ b/tools/xenfb/vncfb.c Mon Jul 02 17:39:46 2007 +0900
@@ -17,43 +17,6 @@ static const char *bios_dir = "/usr/shar
#include "vnc_keysym.h"
#include "keymaps.c"
-static unsigned char atkbd_set2_keycode[512] = {
-
- 0, 67, 65, 63, 61, 59, 60, 88, 0, 68, 66, 64, 62, 15, 41,117,
- 0, 56, 42, 93, 29, 16, 2, 0, 0, 0, 44, 31, 30, 17, 3, 0,
- 0, 46, 45, 32, 18, 5, 4, 95, 0, 57, 47, 33, 20, 19, 6,183,
- 0, 49, 48, 35, 34, 21, 7,184, 0, 0, 50, 36, 22, 8, 9,185,
- 0, 51, 37, 23, 24, 11, 10, 0, 0, 52, 53, 38, 39, 25, 12, 0,
- 0, 89, 40, 0, 26, 13, 0, 0, 58, 54, 28, 27, 0, 43, 0, 85,
- 0, 86, 91, 90, 92, 0, 14, 94, 0, 79,124, 75, 71,121, 0, 0,
- 82, 83, 80, 76, 77, 72, 1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 217,100,255, 0, 97,165, 0, 0,156, 0, 0, 0, 0, 0, 0,125,
- 173,114, 0,113, 0, 0, 0,126,128, 0, 0,140, 0, 0, 0,127,
- 159, 0,115, 0,164, 0, 0,116,158, 0,150,166, 0, 0, 0,142,
- 157, 0, 0, 0, 0, 0, 0, 0,155, 0, 98, 0, 0,163, 0, 0,
- 226, 0, 0, 0, 0, 0, 0, 0, 0,255, 96, 0, 0, 0,143, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,107, 0,105,102, 0, 0,112,
- 110,111,108,112,106,103, 0,119, 0,118,109, 0, 99,104,119, 0,
-
-};
-
-static unsigned char atkbd_unxlate_table[128] = {
-
- 0,118, 22, 30, 38, 37, 46, 54, 61, 62, 70, 69, 78, 85,102, 13,
- 21, 29, 36, 45, 44, 53, 60, 67, 68, 77, 84, 91, 90, 20, 28, 27,
- 35, 43, 52, 51, 59, 66, 75, 76, 82, 14, 18, 93, 26, 34, 33, 42,
- 50, 49, 58, 65, 73, 74, 89,124, 17, 41, 88, 5, 6, 4, 12, 3,
- 11, 2, 10, 1, 9,119,126,108,117,125,123,107,115,116,121,105,
- 114,122,112,113,127, 96, 97,120, 7, 15, 23, 31, 39, 47, 55, 63,
- 71, 79, 86, 94, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 87,111,
- 19, 25, 57, 81, 83, 92, 95, 98, 99,100,101,103,104,106,109,110
-
-};
-
-unsigned char keycode_table[512];
-
static void *kbd_layout;
static int btnmap[] = {
@@ -79,7 +42,7 @@ static void on_kbd_event(rfbBool down, r
if (keycode >= 'A' && keycode <= 'Z')
keycode += 'a' - 'A';
- scancode = keycode_table[keysym2scancode(kbd_layout, keycode)];
+ scancode = keysym2scancode(kbd_layout, keycode);
if (scancode == 0)
return;
if (xenfb_send_key(xenfb, down, scancode) < 0)
@@ -308,12 +271,6 @@ int main(int argc, char **argv)
exit(1);
}
- for (i = 0; i < 128; i++) {
- keycode_table[i] = atkbd_set2_keycode[atkbd_unxlate_table[i]];
- keycode_table[i | 0x80] =
- atkbd_set2_keycode[atkbd_unxlate_table[i] | 0x80];
- }
-
fake_argv[2] = portstr;
if (title != NULL)
[-- Attachment #4: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] Fix keymap support for PVFB.
2007-07-02 10:51 [Patch] Fix keymap support for PVFB Kasai Takanori
@ 2007-07-02 12:09 ` Daniel P. Berrange
2007-07-03 8:32 ` Kasai Takanori
0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrange @ 2007-07-02 12:09 UTC (permalink / raw)
To: Kasai Takanori; +Cc: xen-devel
On Mon, Jul 02, 2007 at 07:51:36PM +0900, Kasai Takanori wrote:
> However, I think that it should do this with xenkbd who is originally the
> driver on the FrontEnd side.
> It will be problem if the HVM domain is working on PVFB in the future.
I honestly can't see HVM using the PVFB at any time in the forseeable future
unless PVFB is further developed to not suck. ie being able to change the
resolution / bpp would be a start for PVFB - something HVM can already do
trivially.
> For HVM domain, The keycode that the keyboard driver on guest OS received
> from
> qemu-dm is converted.
> It will convert further in the HVM domain when converting it with PVFB
> beforehand, and a correct key cannot be input.
>
> This patch transplanted the conversion processing of the keyboard driver on
> the GuestOS side to xenkbd.
This change looks very much like it breaks backwards compatability, doesn't
it ?
eg If you use an old Dom0 daemon with new kernel you'll not get any keymap
conversion done. If you use a new Dom0 daemon with old kernel, you'll get
keymap conversion done twice.
I don't see any point in doing this change since it makes no difference to
the functionality of paravirt guests & there's no compelling need for PVFB
in the HVM guests.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] Fix keymap support for PVFB.
2007-07-02 12:09 ` Daniel P. Berrange
@ 2007-07-03 8:32 ` Kasai Takanori
2007-07-03 14:10 ` Daniel P. Berrange
0 siblings, 1 reply; 5+ messages in thread
From: Kasai Takanori @ 2007-07-03 8:32 UTC (permalink / raw)
To: Daniel P. Berrange, Markus Armbruster; +Cc: xen-devel
Hi Daniel & Markus,
> On Mon, Jul 02, 2007 at 07:51:36PM +0900, Kasai Takanori wrote:
>> However, I think that it should do this with xenkbd who is originally the
>> driver on the FrontEnd side.
>> It will be problem if the HVM domain is working on PVFB in the future.
>
> I honestly can't see HVM using the PVFB at any time in the forseeable future
> unless PVFB is further developed to not suck. ie being able to change the
> resolution / bpp would be a start for PVFB - something HVM can already do
> trivially.
Does it mean not to support making the HVM domain work on PVFB?
I thought that it was going to work the HVM domain on PVFB before.
Is my recognition wrong?
> I don't see any point in doing this change since it makes no difference to
> the functionality of paravirt guests & there's no compelling need for PVFB
> in the HVM guests.
If you do not work the HVM domain on PVFB, this change is not significant at
all.
Thanks,
--
Takanori Kasai
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] Fix keymap support for PVFB.
2007-07-03 8:32 ` Kasai Takanori
@ 2007-07-03 14:10 ` Daniel P. Berrange
2007-07-04 0:11 ` Kasai Takanori
0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrange @ 2007-07-03 14:10 UTC (permalink / raw)
To: Kasai Takanori; +Cc: xen-devel, Markus Armbruster
On Tue, Jul 03, 2007 at 05:32:34PM +0900, Kasai Takanori wrote:
> Hi Daniel & Markus,
>
> >On Mon, Jul 02, 2007 at 07:51:36PM +0900, Kasai Takanori wrote:
> >>However, I think that it should do this with xenkbd who is originally the
> >>driver on the FrontEnd side.
> >>It will be problem if the HVM domain is working on PVFB in the future.
> >
> >I honestly can't see HVM using the PVFB at any time in the forseeable
> >future
> >unless PVFB is further developed to not suck. ie being able to change the
> >resolution / bpp would be a start for PVFB - something HVM can already do
> >trivially.
>
> Does it mean not to support making the HVM domain work on PVFB?
Sure you /could/ do it. I'm just saying there's no real point in trying
to though, since the HVM framebuffer has much more functionality than
the paravirt framebuffer. ie why would you want make HVM use a worse
framebuffer ?
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] Fix keymap support for PVFB.
2007-07-03 14:10 ` Daniel P. Berrange
@ 2007-07-04 0:11 ` Kasai Takanori
0 siblings, 0 replies; 5+ messages in thread
From: Kasai Takanori @ 2007-07-04 0:11 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: xen-devel, Markus Armbruster
Hi Dan,
> Sure you /could/ do it. I'm just saying there's no real point in trying
> to though, since the HVM framebuffer has much more functionality than
> the paravirt framebuffer. ie why would you want make HVM use a worse
> framebuffer ?
Thank you for the reply.
I guessed to work the HVM domain in the same platform,
the function of PVFB is enhanced.
Because my recognition was wrong, this patch is unnecessary.
Thanks,
--
Takanori Kasai
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-04 0:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-02 10:51 [Patch] Fix keymap support for PVFB Kasai Takanori
2007-07-02 12:09 ` Daniel P. Berrange
2007-07-03 8:32 ` Kasai Takanori
2007-07-03 14:10 ` Daniel P. Berrange
2007-07-04 0:11 ` Kasai Takanori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.