mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
PowerPC queue for 2.0
* Fixes for -device VGA -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTIg2YAAoJEPou0S0+fgE/3ckP/0ZS6CIpOnQp83t8jPnXjhGJ ztS2J7yxxCzcCqw97IjyHO/tOJXL5Bw1XUt1G9dDgAIr/4ZRqL2iI3ltH4MyX/lQ Zvdfua9VSACQrbH0S29sh5tJFt0jZ3zbLN9V/SUZ56r+04WaSy3ij8zEvEirebi1 CdQu3vT6pymgvnRkGaXel9RqCjMj4MpZcu54uRKC+YmF5HcfHobj5tUi36iB3KJV YYVAUwmTAEsS46msSWSX0O9SilJTyNPI343K58BDb5oOeiJBr9cXKqRG78sVawzW zkDYsuU61ZIMJvGcFA2IgJaFO8T3if7isVgmoAPD3VWz0VJFN0KEa1UGA04tLdr7 3FsRHjU6mJeGJnQMQ29g2U4/jxbpC5djFQzCStM9vJ8klJhxy8uT+9hqf+gNUB1N a8Whng+wnJz5AgkQ9tLK2XbWHTUKnOgbU+8Nxg30qA0MNHEGLA2mbViVnQf7R1+v qQu8HjFnHhe5fH9P8RYkOTctkNKOjkr4zN9xaPEkq8vfENMmveIQKGdIGzcSOFC8 tMMAsHLqzKsvNm6IKhjgbclk/z+MjJXy3sirWtOw1qEVuzbGbjmkdVBPfLKLxLPQ ihnQReNxX86vrbWkQZNahLmql1NqYJN9bP/J1DRLmhNeWqsZdW+aG08vyHfysJFy j8o0/JYAq0Ljh4lClt/a =f+Kw -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0' into staging PowerPC queue for 2.0 * Fixes for -device VGA # gpg: Signature made Thu 13 Mar 2014 19:57:12 GMT using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/ppc-for-2.0: spapr: Fix return value of vga initialization Fix vga_interface_type for command line argument '-device VGA' Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
90c5d39cb8
@ -781,13 +781,15 @@ static int spapr_vga_init(PCIBus *pci_bus)
|
||||
{
|
||||
switch (vga_interface_type) {
|
||||
case VGA_NONE:
|
||||
return false;
|
||||
case VGA_DEVICE:
|
||||
return true;
|
||||
case VGA_STD:
|
||||
return pci_vga_init(pci_bus) != NULL;
|
||||
default:
|
||||
fprintf(stderr, "This vga model is not supported,"
|
||||
"currently it only supports -vga std\n");
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ extern int autostart;
|
||||
|
||||
typedef enum {
|
||||
VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
|
||||
VGA_TCX, VGA_CG3,
|
||||
VGA_TCX, VGA_CG3, VGA_DEVICE
|
||||
} VGAInterfaceType;
|
||||
|
||||
extern int vga_interface_type;
|
||||
|
45
vl.c
45
vl.c
@ -213,6 +213,7 @@ uint32_t xen_domid;
|
||||
enum xen_mode xen_mode = XEN_EMULATE;
|
||||
static int tcg_tb_size;
|
||||
|
||||
static int has_defaults = 1;
|
||||
static int default_serial = 1;
|
||||
static int default_parallel = 1;
|
||||
static int default_virtcon = 1;
|
||||
@ -973,7 +974,8 @@ static void parse_name(QemuOpts *opts)
|
||||
|
||||
bool usb_enabled(bool default_usb)
|
||||
{
|
||||
return qemu_opt_get_bool(qemu_get_machine_opts(), "usb", default_usb);
|
||||
return qemu_opt_get_bool(qemu_get_machine_opts(), "usb",
|
||||
has_defaults && default_usb);
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
@ -2122,7 +2124,7 @@ static void select_vgahw (const char *p)
|
||||
{
|
||||
const char *opts;
|
||||
|
||||
vga_interface_type = VGA_NONE;
|
||||
assert(vga_interface_type == VGA_NONE);
|
||||
if (strstart(p, "std", &opts)) {
|
||||
if (vga_available()) {
|
||||
vga_interface_type = VGA_STD;
|
||||
@ -2912,7 +2914,7 @@ int main(int argc, char **argv, char **envp)
|
||||
MachineClass *machine_class;
|
||||
QEMUMachine *machine;
|
||||
const char *cpu_model;
|
||||
const char *vga_model = "none";
|
||||
const char *vga_model = NULL;
|
||||
const char *qtest_chrdev = NULL;
|
||||
const char *qtest_log = NULL;
|
||||
const char *pid_file = NULL;
|
||||
@ -3762,16 +3764,7 @@ int main(int argc, char **argv, char **envp)
|
||||
runstate_set(RUN_STATE_INMIGRATE);
|
||||
break;
|
||||
case QEMU_OPTION_nodefaults:
|
||||
default_serial = 0;
|
||||
default_parallel = 0;
|
||||
default_virtcon = 0;
|
||||
default_sclp = 0;
|
||||
default_monitor = 0;
|
||||
default_net = 0;
|
||||
default_floppy = 0;
|
||||
default_cdrom = 0;
|
||||
default_sdcard = 0;
|
||||
default_vga = 0;
|
||||
has_defaults = 0;
|
||||
break;
|
||||
case QEMU_OPTION_xen_domid:
|
||||
if (!(xen_available())) {
|
||||
@ -4004,27 +3997,35 @@ int main(int argc, char **argv, char **envp)
|
||||
qemu_opts_foreach(qemu_find_opts("device"), default_driver_check, NULL, 0);
|
||||
qemu_opts_foreach(qemu_find_opts("global"), default_driver_check, NULL, 0);
|
||||
|
||||
if (machine->no_serial) {
|
||||
if (!vga_model && !default_vga) {
|
||||
vga_interface_type = VGA_DEVICE;
|
||||
}
|
||||
if (!has_defaults || machine->no_serial) {
|
||||
default_serial = 0;
|
||||
}
|
||||
if (machine->no_parallel) {
|
||||
if (!has_defaults || machine->no_parallel) {
|
||||
default_parallel = 0;
|
||||
}
|
||||
if (!machine->use_virtcon) {
|
||||
if (!has_defaults || !machine->use_virtcon) {
|
||||
default_virtcon = 0;
|
||||
}
|
||||
if (!machine->use_sclp) {
|
||||
if (!has_defaults || !machine->use_sclp) {
|
||||
default_sclp = 0;
|
||||
}
|
||||
if (machine->no_floppy) {
|
||||
if (!has_defaults || machine->no_floppy) {
|
||||
default_floppy = 0;
|
||||
}
|
||||
if (machine->no_cdrom) {
|
||||
if (!has_defaults || machine->no_cdrom) {
|
||||
default_cdrom = 0;
|
||||
}
|
||||
if (machine->no_sdcard) {
|
||||
if (!has_defaults || machine->no_sdcard) {
|
||||
default_sdcard = 0;
|
||||
}
|
||||
if (!has_defaults) {
|
||||
default_monitor = 0;
|
||||
default_net = 0;
|
||||
default_vga = 0;
|
||||
}
|
||||
|
||||
if (is_daemonized()) {
|
||||
/* According to documentation and historically, -nographic redirects
|
||||
@ -4329,7 +4330,9 @@ int main(int argc, char **argv, char **envp)
|
||||
vga_model = "std";
|
||||
}
|
||||
}
|
||||
select_vgahw(vga_model);
|
||||
if (vga_model) {
|
||||
select_vgahw(vga_model);
|
||||
}
|
||||
|
||||
if (watchdog) {
|
||||
i = select_watchdog(watchdog);
|
||||
|
Loading…
Reference in New Issue
Block a user