From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwExq-0003LO-8y for qemu-devel@nongnu.org; Tue, 21 Apr 2009 08:20:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwExk-0003IV-HU for qemu-devel@nongnu.org; Tue, 21 Apr 2009 08:20:36 -0400 Received: from [199.232.76.173] (port=50857 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwExj-0003IM-Ti for qemu-devel@nongnu.org; Tue, 21 Apr 2009 08:20:31 -0400 Received: from mx2.redhat.com ([66.187.237.31]:47947) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LwExj-0003X5-E1 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 08:20:31 -0400 From: Gerd Hoffmann Date: Tue, 21 Apr 2009 14:20:08 +0200 Message-Id: <1240316408-15949-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1240316408-15949-1-git-send-email-kraxel@redhat.com> References: <1240316408-15949-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 10/10] xen: add -vga xenfb option, configure xenfb List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, xen-devel@lists.xensource.com Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/xen_machine_pv.c | 6 ++++++ qemu-options.hx | 2 +- sysemu.h | 1 + vl.c | 4 ++++ 4 files changed, 12 insertions(+), 1 deletions(-) diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c index 56b01aa..58209b8 100644 --- a/hw/xen_machine_pv.c +++ b/hw/xen_machine_pv.c @@ -82,6 +82,12 @@ static void xen_init_pv(ram_addr_t ram_size, int vga_ram_size, xen_be_register("qdisk", &xen_blkdev_ops); xen_be_register("qnic", &xen_netdev_ops); + /* configure framebuffer */ + if (xenfb_enabled) { + xen_config_dev_vfb(0, "vnc"); + xen_config_dev_vkbd(0); + } + /* configure disks */ for (i = 0; i < 16; i++) { index = drive_get_index(IF_XEN, 0, i); diff --git a/qemu-options.hx b/qemu-options.hx index 1f78021..7ae535a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -457,7 +457,7 @@ Rotate graphical output 90 deg left (only PXA LCD). ETEXI DEF("vga", HAS_ARG, QEMU_OPTION_vga, - "-vga [std|cirrus|vmware|none]\n" + "-vga [std|cirrus|vmware|xenfb|none]\n" " select video card type\n") STEXI @item -vga @var{type} diff --git a/sysemu.h b/sysemu.h index 1f1a280..d3f1cb6 100644 --- a/sysemu.h +++ b/sysemu.h @@ -88,6 +88,7 @@ extern int bios_size; extern int cirrus_vga_enabled; extern int std_vga_enabled; extern int vmsvga_enabled; +extern int xenfb_enabled; extern int graphic_width; extern int graphic_height; extern int graphic_depth; diff --git a/vl.c b/vl.c index 7d6dcb6..1b34662 100644 --- a/vl.c +++ b/vl.c @@ -216,6 +216,7 @@ static int rtc_date_offset = -1; /* -1 means no change */ int cirrus_vga_enabled = 1; int std_vga_enabled = 0; int vmsvga_enabled = 0; +int xenfb_enabled = 0; #ifdef TARGET_SPARC int graphic_width = 1024; int graphic_height = 768; @@ -4165,12 +4166,15 @@ static void select_vgahw (const char *p) cirrus_vga_enabled = 0; std_vga_enabled = 0; vmsvga_enabled = 0; + xenfb_enabled = 0; if (strstart(p, "std", &opts)) { std_vga_enabled = 1; } else if (strstart(p, "cirrus", &opts)) { cirrus_vga_enabled = 1; } else if (strstart(p, "vmware", &opts)) { vmsvga_enabled = 1; + } else if (strstart(p, "xenfb", &opts)) { + xenfb_enabled = 1; } else if (!strstart(p, "none", &opts)) { invalid_vga: fprintf(stderr, "Unknown vga type: %s\n", p); -- 1.6.2.2