|
@@ -231,6 +231,7 @@ static struct {
|
|
{ .driver = "isa-cirrus-vga", .flag = &default_vga },
|
|
{ .driver = "isa-cirrus-vga", .flag = &default_vga },
|
|
{ .driver = "vmware-svga", .flag = &default_vga },
|
|
{ .driver = "vmware-svga", .flag = &default_vga },
|
|
{ .driver = "qxl-vga", .flag = &default_vga },
|
|
{ .driver = "qxl-vga", .flag = &default_vga },
|
|
|
|
+ { .driver = "virtio-vga", .flag = &default_vga },
|
|
};
|
|
};
|
|
|
|
|
|
static QemuOptsList qemu_rtc_opts = {
|
|
static QemuOptsList qemu_rtc_opts = {
|
|
@@ -1884,6 +1885,11 @@ static bool cg3_vga_available(void)
|
|
return object_class_by_name("cgthree");
|
|
return object_class_by_name("cgthree");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static bool virtio_vga_available(void)
|
|
|
|
+{
|
|
|
|
+ return object_class_by_name("virtio-vga");
|
|
|
|
+}
|
|
|
|
+
|
|
static void select_vgahw (const char *p)
|
|
static void select_vgahw (const char *p)
|
|
{
|
|
{
|
|
const char *opts;
|
|
const char *opts;
|
|
@@ -1910,6 +1916,13 @@ static void select_vgahw (const char *p)
|
|
fprintf(stderr, "Error: VMWare SVGA not available\n");
|
|
fprintf(stderr, "Error: VMWare SVGA not available\n");
|
|
exit(0);
|
|
exit(0);
|
|
}
|
|
}
|
|
|
|
+ } else if (strstart(p, "virtio", &opts)) {
|
|
|
|
+ if (virtio_vga_available()) {
|
|
|
|
+ vga_interface_type = VGA_VIRTIO;
|
|
|
|
+ } else {
|
|
|
|
+ fprintf(stderr, "Error: Virtio VGA not available\n");
|
|
|
|
+ exit(0);
|
|
|
|
+ }
|
|
} else if (strstart(p, "xenfb", &opts)) {
|
|
} else if (strstart(p, "xenfb", &opts)) {
|
|
vga_interface_type = VGA_XENFB;
|
|
vga_interface_type = VGA_XENFB;
|
|
} else if (strstart(p, "qxl", &opts)) {
|
|
} else if (strstart(p, "qxl", &opts)) {
|