Commit 94909d9fd931367a3d5fabfb7bf5439eb05568e9

Authored by aliguori
1 parent 28b85ed8

xen: add -vga xenfb option, configure xenfb (Gerd Hoffmann)


Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7228 c046a42c-6fe2-441c-8c8c-71466251a162
hw/xen_machine_pv.c
@@ -82,6 +82,12 @@ static void xen_init_pv(ram_addr_t ram_size, int vga_ram_size, @@ -82,6 +82,12 @@ static void xen_init_pv(ram_addr_t ram_size, int vga_ram_size,
82 xen_be_register("qdisk", &xen_blkdev_ops); 82 xen_be_register("qdisk", &xen_blkdev_ops);
83 xen_be_register("qnic", &xen_netdev_ops); 83 xen_be_register("qnic", &xen_netdev_ops);
84 84
  85 + /* configure framebuffer */
  86 + if (xenfb_enabled) {
  87 + xen_config_dev_vfb(0, "vnc");
  88 + xen_config_dev_vkbd(0);
  89 + }
  90 +
85 /* configure disks */ 91 /* configure disks */
86 for (i = 0; i < 16; i++) { 92 for (i = 0; i < 16; i++) {
87 index = drive_get_index(IF_XEN, 0, i); 93 index = drive_get_index(IF_XEN, 0, i);
qemu-options.hx
@@ -465,7 +465,7 @@ Rotate graphical output 90 deg left (only PXA LCD). @@ -465,7 +465,7 @@ Rotate graphical output 90 deg left (only PXA LCD).
465 ETEXI 465 ETEXI
466 466
467 DEF("vga", HAS_ARG, QEMU_OPTION_vga, 467 DEF("vga", HAS_ARG, QEMU_OPTION_vga,
468 - "-vga [std|cirrus|vmware|none]\n" 468 + "-vga [std|cirrus|vmware|xenfb|none]\n"
469 " select video card type\n") 469 " select video card type\n")
470 STEXI 470 STEXI
471 @item -vga @var{type} 471 @item -vga @var{type}
sysemu.h
@@ -88,6 +88,7 @@ extern int bios_size; @@ -88,6 +88,7 @@ extern int bios_size;
88 extern int cirrus_vga_enabled; 88 extern int cirrus_vga_enabled;
89 extern int std_vga_enabled; 89 extern int std_vga_enabled;
90 extern int vmsvga_enabled; 90 extern int vmsvga_enabled;
  91 +extern int xenfb_enabled;
91 extern int graphic_width; 92 extern int graphic_width;
92 extern int graphic_height; 93 extern int graphic_height;
93 extern int graphic_depth; 94 extern int graphic_depth;
@@ -216,6 +216,7 @@ static int rtc_date_offset = -1; /* -1 means no change */ @@ -216,6 +216,7 @@ static int rtc_date_offset = -1; /* -1 means no change */
216 int cirrus_vga_enabled = 1; 216 int cirrus_vga_enabled = 1;
217 int std_vga_enabled = 0; 217 int std_vga_enabled = 0;
218 int vmsvga_enabled = 0; 218 int vmsvga_enabled = 0;
  219 +int xenfb_enabled = 0;
219 #ifdef TARGET_SPARC 220 #ifdef TARGET_SPARC
220 int graphic_width = 1024; 221 int graphic_width = 1024;
221 int graphic_height = 768; 222 int graphic_height = 768;
@@ -4225,12 +4226,15 @@ static void select_vgahw (const char *p) @@ -4225,12 +4226,15 @@ static void select_vgahw (const char *p)
4225 cirrus_vga_enabled = 0; 4226 cirrus_vga_enabled = 0;
4226 std_vga_enabled = 0; 4227 std_vga_enabled = 0;
4227 vmsvga_enabled = 0; 4228 vmsvga_enabled = 0;
  4229 + xenfb_enabled = 0;
4228 if (strstart(p, "std", &opts)) { 4230 if (strstart(p, "std", &opts)) {
4229 std_vga_enabled = 1; 4231 std_vga_enabled = 1;
4230 } else if (strstart(p, "cirrus", &opts)) { 4232 } else if (strstart(p, "cirrus", &opts)) {
4231 cirrus_vga_enabled = 1; 4233 cirrus_vga_enabled = 1;
4232 } else if (strstart(p, "vmware", &opts)) { 4234 } else if (strstart(p, "vmware", &opts)) {
4233 vmsvga_enabled = 1; 4235 vmsvga_enabled = 1;
  4236 + } else if (strstart(p, "xenfb", &opts)) {
  4237 + xenfb_enabled = 1;
4234 } else if (!strstart(p, "none", &opts)) { 4238 } else if (!strstart(p, "none", &opts)) {
4235 invalid_vga: 4239 invalid_vga:
4236 fprintf(stderr, "Unknown vga type: %s\n", p); 4240 fprintf(stderr, "Unknown vga type: %s\n", p);