* [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration.
@ 2009-12-07 12:42 Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 01/21] Revert "monitor: Command-line flag to enable control mode" Gerd Hoffmann
` (20 more replies)
0 siblings, 21 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Hi,
Qemu creates a bunch of default devices (serial, parallel, vga, ...) if
the user didn't specify one on the command line. Unfortunaly this
doesn't work well with the qdev way of doing things because this logic
is tied to the -serial, -parallel, ... command line switches. Devices
created via -device are ignored. This patch set fixes this. It also
adds a command line switch to disable all default devices and does a few
cleanups in the code touched anyway.
New in v3: Rebased against latest master. Two patches (qmp monitor +
s390 console) came into the way. Because the way how serial lines and
the monitor are initialized changes quite heavily it looked alot cleaner
to me just revert those patches, apply the v2 patches, then reimplement
the two patches on top of that.
For the snake of simplifying testing of this series three patches where
added (patches 13,14,15) which are already in staging. They can just be
dropped when merging. When needed I can create a v4 without them (after
they got merged into master).
Luiz + Alex, please have a closer look at this.
http://repo.or.cz/w/qemu/kraxel.git/shortlog/refs/heads/default.v3
thanks,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 01/21] Revert "monitor: Command-line flag to enable control mode"
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 02/21] Revert "Set default console to virtio on S390x" Gerd Hoffmann
` (19 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
This reverts commit adcb181afe5a951c521411c7a8e9d9b791aa6742.
Conflicts:
monitor.h
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
monitor.c | 18 ------------------
monitor.h | 1 -
qemu-options.hx | 5 ++---
vl.c | 11 ++++-------
4 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/monitor.c b/monitor.c
index ba76f34..0ae05a0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4008,24 +4008,6 @@ static void monitor_event(void *opaque, int event)
* End:
*/
-const char *monitor_cmdline_parse(const char *cmdline, int *flags)
-{
- const char *dev;
-
- if (strstart(cmdline, "control,", &dev)) {
- if (strstart(dev, "vc", NULL)) {
- fprintf(stderr, "qemu: control mode is for low-level interaction ");
- fprintf(stderr, "cannot be used with device 'vc'\n");
- exit(1);
- }
- *flags &= ~MONITOR_USE_READLINE;
- *flags |= MONITOR_USE_CONTROL;
- return dev;
- }
-
- return cmdline;
-}
-
void monitor_init(CharDriverState *chr, int flags)
{
static int is_first_init = 1;
diff --git a/monitor.h b/monitor.h
index 38cc223..6ed117a 100644
--- a/monitor.h
+++ b/monitor.h
@@ -24,7 +24,6 @@ typedef enum MonitorEvent {
} MonitorEvent;
void monitor_protocol_event(MonitorEvent event, QObject *data);
-const char *monitor_cmdline_parse(const char *cmdline, int *flags);
void monitor_init(CharDriverState *chr, int flags);
int monitor_suspend(Monitor *mon);
diff --git a/qemu-options.hx b/qemu-options.hx
index 1b5781a..b65fd74 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1577,14 +1577,13 @@ Use @code{-parallel none} to disable all parallel ports.
ETEXI
DEF("monitor", HAS_ARG, QEMU_OPTION_monitor, \
- "-monitor [control,]dev redirect the monitor to char device 'dev'\n")
+ "-monitor dev redirect the monitor to char device 'dev'\n")
STEXI
-@item -monitor [@var{control},]@var{dev}
+@item -monitor @var{dev}
Redirect the monitor to host device @var{dev} (same devices as the
serial port).
The default device is @code{vc} in graphical mode and @code{stdio} in
non graphical mode.
-The option @var{control} enables the QEMU Monitor Protocol.
ETEXI
DEF("pidfile", HAS_ARG, QEMU_OPTION_pidfile, \
diff --git a/vl.c b/vl.c
index 09a0ec5..86171d0 100644
--- a/vl.c
+++ b/vl.c
@@ -4638,7 +4638,6 @@ int main(int argc, char **argv, char **envp)
const char *r, *optarg;
CharDriverState *monitor_hds[MAX_MONITOR_DEVICES];
const char *monitor_devices[MAX_MONITOR_DEVICES];
- int monitor_flags[MAX_MONITOR_DEVICES];
int monitor_device_index;
const char *serial_devices[MAX_SERIAL_PORTS];
int serial_device_index;
@@ -4741,10 +4740,8 @@ int main(int argc, char **argv, char **envp)
#endif
monitor_devices[0] = "vc:80Cx24C";
- monitor_flags[0] = MONITOR_IS_DEFAULT | MONITOR_USE_READLINE;
for (i = 1; i < MAX_MONITOR_DEVICES; i++) {
monitor_devices[i] = NULL;
- monitor_flags[i] = MONITOR_USE_READLINE;
}
monitor_device_index = 0;
@@ -5165,9 +5162,7 @@ int main(int argc, char **argv, char **envp)
fprintf(stderr, "qemu: too many monitor devices\n");
exit(1);
}
- monitor_devices[monitor_device_index] =
- monitor_cmdline_parse(optarg,
- &monitor_flags[monitor_device_index]);
+ monitor_devices[monitor_device_index] = optarg;
monitor_device_index++;
break;
case QEMU_OPTION_chardev:
@@ -5875,7 +5870,9 @@ int main(int argc, char **argv, char **envp)
for (i = 0; i < MAX_MONITOR_DEVICES; i++) {
if (monitor_devices[i] && monitor_hds[i]) {
- monitor_init(monitor_hds[i], monitor_flags[i]);
+ monitor_init(monitor_hds[i],
+ MONITOR_USE_READLINE |
+ ((i == 0) ? MONITOR_IS_DEFAULT : 0));
}
}
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 02/21] Revert "Set default console to virtio on S390x"
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 01/21] Revert "monitor: Command-line flag to enable control mode" Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 03/21] chardev: move greeting into vc backend Gerd Hoffmann
` (18 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
This reverts commit 93d434b4aec0702b87ebf52449a3cdf2c3596825.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 26 --------------------------
1 files changed, 0 insertions(+), 26 deletions(-)
diff --git a/vl.c b/vl.c
index 86171d0..74b608f 100644
--- a/vl.c
+++ b/vl.c
@@ -4710,20 +4710,6 @@ int main(int argc, char **argv, char **envp)
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
-#ifdef TARGET_S390X
- for(i = 0; i < MAX_SERIAL_PORTS; i++)
- serial_devices[i] = NULL;
- serial_device_index = 0;
-
- for(i = 0; i < MAX_PARALLEL_PORTS; i++)
- parallel_devices[i] = NULL;
- parallel_device_index = 0;
-
- virtio_consoles[0] = "mon:stdio";
- for(i = 1; i < MAX_VIRTIO_CONSOLES; i++)
- virtio_consoles[i] = NULL;
- virtio_console_index = 0;
-#else
serial_devices[0] = "vc:80Cx24C";
for(i = 1; i < MAX_SERIAL_PORTS; i++)
serial_devices[i] = NULL;
@@ -4737,7 +4723,6 @@ int main(int argc, char **argv, char **envp)
for(i = 0; i < MAX_VIRTIO_CONSOLES; i++)
virtio_consoles[i] = NULL;
virtio_console_index = 0;
-#endif
monitor_devices[0] = "vc:80Cx24C";
for (i = 1; i < MAX_MONITOR_DEVICES; i++) {
@@ -5650,17 +5635,6 @@ int main(int argc, char **argv, char **envp)
break;
}
}
- for (i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
- const char *devname = virtio_consoles[i];
- if (devname && !strcmp(devname,"mon:stdio")) {
- monitor_devices[0] = NULL;
- break;
- } else if (devname && !strcmp(devname,"stdio")) {
- monitor_devices[0] = NULL;
- virtio_consoles[i] = "mon:stdio";
- break;
- }
- }
}
if (nb_numa_nodes > 0) {
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 03/21] chardev: move greeting into vc backend.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 01/21] Revert "monitor: Command-line flag to enable control mode" Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 02/21] Revert "Set default console to virtio on S390x" Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 04/21] vc: colorize chardev title line with blue background Gerd Hoffmann
` (17 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Make the 'vc' chardev backend print a title line with the chardev name
after initialization, using CharDriverState->label.
This replaces the banner printing code in vl.c.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
console.c | 8 ++++++++
vl.c | 24 ------------------------
2 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/console.c b/console.c
index 82ddbe4..2aeb5b3 100644
--- a/console.c
+++ b/console.c
@@ -1384,6 +1384,14 @@ static void text_console_do_init(CharDriverState *chr, DisplayState *ds, QemuOpt
s->t_attrib = s->t_attrib_default;
text_console_resize(s);
+ if (chr->label) {
+ char msg[128];
+ int len;
+
+ len = snprintf(msg, sizeof(msg), "%s console\r\n", chr->label);
+ console_puts(chr, (uint8_t*)msg, len);
+ }
+
qemu_chr_generic_open(chr);
if (chr->init)
chr->init(chr);
diff --git a/vl.c b/vl.c
index 74b608f..24d5d92 100644
--- a/vl.c
+++ b/vl.c
@@ -5850,30 +5850,6 @@ int main(int argc, char **argv, char **envp)
}
}
- for(i = 0; i < MAX_SERIAL_PORTS; i++) {
- const char *devname = serial_devices[i];
- if (devname && strcmp(devname, "none")) {
- if (strstart(devname, "vc", 0))
- qemu_chr_printf(serial_hds[i], "serial%d console\r\n", i);
- }
- }
-
- for(i = 0; i < MAX_PARALLEL_PORTS; i++) {
- const char *devname = parallel_devices[i];
- if (devname && strcmp(devname, "none")) {
- if (strstart(devname, "vc", 0))
- qemu_chr_printf(parallel_hds[i], "parallel%d console\r\n", i);
- }
- }
-
- for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
- const char *devname = virtio_consoles[i];
- if (virtcon_hds[i] && devname) {
- if (strstart(devname, "vc", 0))
- qemu_chr_printf(virtcon_hds[i], "virtio console%d\r\n", i);
- }
- }
-
if (gdbstub_dev && gdbserver_start(gdbstub_dev) < 0) {
fprintf(stderr, "qemu: could not open gdbserver on device '%s'\n",
gdbstub_dev);
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 04/21] vc: colorize chardev title line with blue background.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (2 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 03/21] chardev: move greeting into vc backend Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines Gerd Hoffmann
` (16 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
console.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/console.c b/console.c
index 2aeb5b3..8086bd6 100644
--- a/console.c
+++ b/console.c
@@ -1388,8 +1388,10 @@ static void text_console_do_init(CharDriverState *chr, DisplayState *ds, QemuOpt
char msg[128];
int len;
+ s->t_attrib.bgcol = COLOR_BLUE;
len = snprintf(msg, sizeof(msg), "%s console\r\n", chr->label);
console_puts(chr, (uint8_t*)msg, len);
+ s->t_attrib = s->t_attrib_default;
}
qemu_chr_generic_open(chr);
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (3 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 04/21] vc: colorize chardev title line with blue background Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:52 ` [Qemu-devel] " Alexander Graf
2009-12-07 12:54 ` Alexander Graf
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 06/21] default devices: parallel port Gerd Hoffmann
` (15 subsequent siblings)
20 siblings, 2 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Qemu creates a default serial line for you in case you didn't specify
one on the command line. Right now this is tied to the '-serial
<chardev>' command line switch, which in turn causes trouble if you are
creating your serial line via '-device isa-serial,<props>'.
This patch adds a variable default_serial which says whenever a default
serial line should be added. It is enabled by default. It is cleared
when qemu finds '-serial' or '-device isa-serial' on the command line.
Part of the patch is some infrastructure for the '-device $driver'
checking (default_driver_check function) which will also be used by the
other patches of this series.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 122 +++++++++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 81 insertions(+), 41 deletions(-)
diff --git a/vl.c b/vl.c
index 24d5d92..eca4eee 100644
--- a/vl.c
+++ b/vl.c
@@ -271,6 +271,30 @@ uint8_t qemu_uuid[16];
static QEMUBootSetHandler *boot_set_handler;
static void *boot_set_opaque;
+static int default_serial = 1;
+
+static struct {
+ const char *driver;
+ int *flag;
+} default_list[] = {
+ { .driver = "isa-serial", .flag = &default_serial },
+};
+
+static int default_driver_check(QemuOpts *opts, void *opaque)
+{
+ const char *driver = qemu_opt_get(opts, "driver");
+ int i;
+
+ if (!driver)
+ return 0;
+ for (i = 0; i < ARRAY_SIZE(default_list); i++) {
+ if (strcmp(default_list[i].driver, driver) != 0)
+ continue;
+ *(default_list[i].flag) = 0;
+ }
+ return 0;
+}
+
/***********************************************************/
/* x86 ISA bus support */
@@ -4590,6 +4614,7 @@ struct device_config {
enum {
DEV_USB, /* -usbdevice */
DEV_BT, /* -bt */
+ DEV_SERIAL, /* -serial */
} type;
const char *cmdline;
QTAILQ_ENTRY(device_config) next;
@@ -4621,6 +4646,50 @@ static int foreach_device_config(int type, int (*func)(const char *cmdline))
return 0;
}
+static void serial_monitor_mux(const char *monitor_devices[])
+{
+ struct device_config *serial;
+ const char *devname;
+
+ if (strcmp(monitor_devices[0],"stdio") != 0)
+ return;
+ QTAILQ_FOREACH(serial, &device_configs, next) {
+ if (serial->type != DEV_SERIAL)
+ continue;
+ devname = serial->cmdline;
+ if (devname && !strcmp(devname,"mon:stdio")) {
+ monitor_devices[0] = NULL;
+ break;
+ } else if (devname && !strcmp(devname,"stdio")) {
+ monitor_devices[0] = NULL;
+ serial->cmdline = "mon:stdio";
+ break;
+ }
+ }
+}
+
+static int serial_parse(const char *devname)
+{
+ static int index = 0;
+ char label[32];
+
+ if (strcmp(devname, "none") == 0)
+ return 0;
+ if (index == MAX_SERIAL_PORTS) {
+ fprintf(stderr, "qemu: too many serial ports\n");
+ exit(1);
+ }
+ snprintf(label, sizeof(label), "serial%d", index);
+ serial_hds[index] = qemu_chr_open(label, devname, NULL);
+ if (!serial_hds[index]) {
+ fprintf(stderr, "qemu: could not open serial device '%s': %s\n",
+ devname, strerror(errno));
+ return -1;
+ }
+ index++;
+ return 0;
+}
+
int main(int argc, char **argv, char **envp)
{
const char *gdbstub_dev = NULL;
@@ -4639,8 +4708,6 @@ int main(int argc, char **argv, char **envp)
CharDriverState *monitor_hds[MAX_MONITOR_DEVICES];
const char *monitor_devices[MAX_MONITOR_DEVICES];
int monitor_device_index;
- const char *serial_devices[MAX_SERIAL_PORTS];
- int serial_device_index;
const char *parallel_devices[MAX_PARALLEL_PORTS];
int parallel_device_index;
const char *virtio_consoles[MAX_VIRTIO_CONSOLES];
@@ -4710,11 +4777,6 @@ int main(int argc, char **argv, char **envp)
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
- serial_devices[0] = "vc:80Cx24C";
- for(i = 1; i < MAX_SERIAL_PORTS; i++)
- serial_devices[i] = NULL;
- serial_device_index = 0;
-
parallel_devices[0] = "vc:80Cx24C";
for(i = 1; i < MAX_PARALLEL_PORTS; i++)
parallel_devices[i] = NULL;
@@ -5161,12 +5223,8 @@ int main(int argc, char **argv, char **envp)
}
break;
case QEMU_OPTION_serial:
- if (serial_device_index >= MAX_SERIAL_PORTS) {
- fprintf(stderr, "qemu: too many serial ports\n");
- exit(1);
- }
- serial_devices[serial_device_index] = optarg;
- serial_device_index++;
+ add_device_config(DEV_SERIAL, optarg);
+ default_serial = 0;
break;
case QEMU_OPTION_watchdog:
if (watchdog) {
@@ -5467,14 +5525,19 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
+ qemu_opts_foreach(&qemu_device_opts, default_driver_check, NULL, 0);
+
if (display_type == DT_NOGRAPHIC) {
- if (serial_device_index == 0)
- serial_devices[0] = "stdio";
+ if (default_serial)
+ add_device_config(DEV_SERIAL, "stdio");
if (parallel_device_index == 0)
parallel_devices[0] = "null";
if (strncmp(monitor_devices[0], "vc", 2) == 0) {
monitor_devices[0] = "stdio";
}
+ } else {
+ if (default_serial)
+ add_device_config(DEV_SERIAL, "vc:80Cx24C");
}
#ifndef _WIN32
@@ -5623,19 +5686,7 @@ int main(int argc, char **argv, char **envp)
ram_load, NULL);
/* Maintain compatibility with multiple stdio monitors */
- if (!strcmp(monitor_devices[0],"stdio")) {
- for (i = 0; i < MAX_SERIAL_PORTS; i++) {
- const char *devname = serial_devices[i];
- if (devname && !strcmp(devname,"mon:stdio")) {
- monitor_devices[0] = NULL;
- break;
- } else if (devname && !strcmp(devname,"stdio")) {
- monitor_devices[0] = NULL;
- serial_devices[i] = "mon:stdio";
- break;
- }
- }
- }
+ serial_monitor_mux(monitor_devices);
if (nb_numa_nodes > 0) {
int i;
@@ -5697,19 +5748,8 @@ int main(int argc, char **argv, char **envp)
}
}
- for(i = 0; i < MAX_SERIAL_PORTS; i++) {
- const char *devname = serial_devices[i];
- if (devname && strcmp(devname, "none")) {
- char label[32];
- snprintf(label, sizeof(label), "serial%d", i);
- serial_hds[i] = qemu_chr_open(label, devname, NULL);
- if (!serial_hds[i]) {
- fprintf(stderr, "qemu: could not open serial device '%s': %s\n",
- devname, strerror(errno));
- exit(1);
- }
- }
- }
+ if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
+ exit(1);
for(i = 0; i < MAX_PARALLEL_PORTS; i++) {
const char *devname = parallel_devices[i];
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 06/21] default devices: parallel port.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (4 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 07/21] default devices: qemu monitor Gerd Hoffmann
` (14 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Qemu creates a default parallel port for you in case you didn't specify
one on the command line. Right now this is tied to the '-parallel
<chardev>' command line switch, which in turn causes trouble if you are
creating your parallel port via '-device isa-parallel,<props>'.
This patch adds a variable default_parallel which says whenever a default
parallel port should be added. It is enabled by default. It is cleared
when qemu finds '-parallel' or '-device isa-parallel' on the command line.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 64 ++++++++++++++++++++++++++++++++++------------------------------
1 files changed, 34 insertions(+), 30 deletions(-)
diff --git a/vl.c b/vl.c
index eca4eee..50e4558 100644
--- a/vl.c
+++ b/vl.c
@@ -272,12 +272,14 @@ static QEMUBootSetHandler *boot_set_handler;
static void *boot_set_opaque;
static int default_serial = 1;
+static int default_parallel = 1;
static struct {
const char *driver;
int *flag;
} default_list[] = {
- { .driver = "isa-serial", .flag = &default_serial },
+ { .driver = "isa-serial", .flag = &default_serial },
+ { .driver = "isa-parallel", .flag = &default_parallel },
};
static int default_driver_check(QemuOpts *opts, void *opaque)
@@ -4615,6 +4617,7 @@ struct device_config {
DEV_USB, /* -usbdevice */
DEV_BT, /* -bt */
DEV_SERIAL, /* -serial */
+ DEV_PARALLEL, /* -parallel */
} type;
const char *cmdline;
QTAILQ_ENTRY(device_config) next;
@@ -4690,6 +4693,28 @@ static int serial_parse(const char *devname)
return 0;
}
+static int parallel_parse(const char *devname)
+{
+ static int index = 0;
+ char label[32];
+
+ if (strcmp(devname, "none") == 0)
+ return 0;
+ if (index == MAX_PARALLEL_PORTS) {
+ fprintf(stderr, "qemu: too many parallel ports\n");
+ exit(1);
+ }
+ snprintf(label, sizeof(label), "parallel%d", index);
+ parallel_hds[index] = qemu_chr_open(label, devname, NULL);
+ if (!parallel_hds[index]) {
+ fprintf(stderr, "qemu: could not open parallel device '%s': %s\n",
+ devname, strerror(errno));
+ return -1;
+ }
+ index++;
+ return 0;
+}
+
int main(int argc, char **argv, char **envp)
{
const char *gdbstub_dev = NULL;
@@ -4708,8 +4733,6 @@ int main(int argc, char **argv, char **envp)
CharDriverState *monitor_hds[MAX_MONITOR_DEVICES];
const char *monitor_devices[MAX_MONITOR_DEVICES];
int monitor_device_index;
- const char *parallel_devices[MAX_PARALLEL_PORTS];
- int parallel_device_index;
const char *virtio_consoles[MAX_VIRTIO_CONSOLES];
int virtio_console_index;
const char *loadvm = NULL;
@@ -4777,11 +4800,6 @@ int main(int argc, char **argv, char **envp)
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
- parallel_devices[0] = "vc:80Cx24C";
- for(i = 1; i < MAX_PARALLEL_PORTS; i++)
- parallel_devices[i] = NULL;
- parallel_device_index = 0;
-
for(i = 0; i < MAX_VIRTIO_CONSOLES; i++)
virtio_consoles[i] = NULL;
virtio_console_index = 0;
@@ -5249,12 +5267,8 @@ int main(int argc, char **argv, char **envp)
virtio_console_index++;
break;
case QEMU_OPTION_parallel:
- if (parallel_device_index >= MAX_PARALLEL_PORTS) {
- fprintf(stderr, "qemu: too many parallel ports\n");
- exit(1);
- }
- parallel_devices[parallel_device_index] = optarg;
- parallel_device_index++;
+ add_device_config(DEV_PARALLEL, optarg);
+ default_parallel = 0;
break;
case QEMU_OPTION_loadvm:
loadvm = optarg;
@@ -5530,14 +5544,16 @@ int main(int argc, char **argv, char **envp)
if (display_type == DT_NOGRAPHIC) {
if (default_serial)
add_device_config(DEV_SERIAL, "stdio");
- if (parallel_device_index == 0)
- parallel_devices[0] = "null";
+ if (default_parallel)
+ add_device_config(DEV_PARALLEL, "null");
if (strncmp(monitor_devices[0], "vc", 2) == 0) {
monitor_devices[0] = "stdio";
}
} else {
if (default_serial)
add_device_config(DEV_SERIAL, "vc:80Cx24C");
+ if (default_parallel)
+ add_device_config(DEV_PARALLEL, "vc:80Cx24C");
}
#ifndef _WIN32
@@ -5750,20 +5766,8 @@ int main(int argc, char **argv, char **envp)
if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
exit(1);
-
- for(i = 0; i < MAX_PARALLEL_PORTS; i++) {
- const char *devname = parallel_devices[i];
- if (devname && strcmp(devname, "none")) {
- char label[32];
- snprintf(label, sizeof(label), "parallel%d", i);
- parallel_hds[i] = qemu_chr_open(label, devname, NULL);
- if (!parallel_hds[i]) {
- fprintf(stderr, "qemu: could not open parallel device '%s': %s\n",
- devname, strerror(errno));
- exit(1);
- }
- }
- }
+ if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
+ exit(1);
for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
const char *devname = virtio_consoles[i];
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 07/21] default devices: qemu monitor.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (5 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 06/21] default devices: parallel port Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 08/21] zap serial_monitor_mux Gerd Hoffmann
` (13 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
This patch makes the monitor default device configuration work like the
default serial and parallel port devices. It adds a variable
default_monitor which says whenever a default monitor should be added.
It is enabled by default. It is cleared when qemu finds '-monitor' on
the command line.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 94 +++++++++++++++++++++++++++++++++++-------------------------------
1 files changed, 50 insertions(+), 44 deletions(-)
diff --git a/vl.c b/vl.c
index 50e4558..cb59c3c 100644
--- a/vl.c
+++ b/vl.c
@@ -211,6 +211,7 @@ int no_quit = 0;
CharDriverState *serial_hds[MAX_SERIAL_PORTS];
CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES];
+CharDriverState *monitor_hds[MAX_MONITOR_DEVICES];
#ifdef TARGET_I386
int win2k_install_hack = 0;
int rtc_td_hack = 0;
@@ -273,6 +274,7 @@ static void *boot_set_opaque;
static int default_serial = 1;
static int default_parallel = 1;
+static int default_monitor = 1;
static struct {
const char *driver;
@@ -4618,6 +4620,7 @@ struct device_config {
DEV_BT, /* -bt */
DEV_SERIAL, /* -serial */
DEV_PARALLEL, /* -parallel */
+ DEV_MONITOR, /* -monitor */
} type;
const char *cmdline;
QTAILQ_ENTRY(device_config) next;
@@ -4649,22 +4652,27 @@ static int foreach_device_config(int type, int (*func)(const char *cmdline))
return 0;
}
-static void serial_monitor_mux(const char *monitor_devices[])
+static void serial_monitor_mux(void)
{
- struct device_config *serial;
+ struct device_config *mon0, *serial;
const char *devname;
- if (strcmp(monitor_devices[0],"stdio") != 0)
- return;
+ QTAILQ_FOREACH(mon0, &device_configs, next) {
+ if (mon0->type != DEV_MONITOR)
+ continue;
+ if (strcmp(mon0->cmdline,"stdio") != 0)
+ return;
+ break;
+ }
QTAILQ_FOREACH(serial, &device_configs, next) {
if (serial->type != DEV_SERIAL)
continue;
devname = serial->cmdline;
if (devname && !strcmp(devname,"mon:stdio")) {
- monitor_devices[0] = NULL;
+ QTAILQ_REMOVE(&device_configs, mon0, next);
break;
} else if (devname && !strcmp(devname,"stdio")) {
- monitor_devices[0] = NULL;
+ QTAILQ_REMOVE(&device_configs, mon0, next);
serial->cmdline = "mon:stdio";
break;
}
@@ -4715,6 +4723,32 @@ static int parallel_parse(const char *devname)
return 0;
}
+static int monitor_parse(const char *devname)
+{
+ static int index = 0;
+ char label[32];
+
+ if (strcmp(devname, "none") == 0)
+ return 0;
+ if (index == MAX_MONITOR_DEVICES) {
+ fprintf(stderr, "qemu: too many monitor devices\n");
+ exit(1);
+ }
+ if (index == 0) {
+ snprintf(label, sizeof(label), "monitor");
+ } else {
+ snprintf(label, sizeof(label), "monitor%d", index);
+ }
+ monitor_hds[index] = qemu_chr_open(label, devname, NULL);
+ if (!monitor_hds[index]) {
+ fprintf(stderr, "qemu: could not open monitor device '%s'\n",
+ devname);
+ return -1;
+ }
+ index++;
+ return 0;
+}
+
int main(int argc, char **argv, char **envp)
{
const char *gdbstub_dev = NULL;
@@ -4730,9 +4764,6 @@ int main(int argc, char **argv, char **envp)
QemuOpts *hda_opts = NULL, *opts;
int optind;
const char *r, *optarg;
- CharDriverState *monitor_hds[MAX_MONITOR_DEVICES];
- const char *monitor_devices[MAX_MONITOR_DEVICES];
- int monitor_device_index;
const char *virtio_consoles[MAX_VIRTIO_CONSOLES];
int virtio_console_index;
const char *loadvm = NULL;
@@ -4804,12 +4835,6 @@ int main(int argc, char **argv, char **envp)
virtio_consoles[i] = NULL;
virtio_console_index = 0;
- monitor_devices[0] = "vc:80Cx24C";
- for (i = 1; i < MAX_MONITOR_DEVICES; i++) {
- monitor_devices[i] = NULL;
- }
- monitor_device_index = 0;
-
for (i = 0; i < MAX_NODES; i++) {
node_mem[i] = 0;
node_cpumask[i] = 0;
@@ -5223,12 +5248,8 @@ int main(int argc, char **argv, char **envp)
break;
}
case QEMU_OPTION_monitor:
- if (monitor_device_index >= MAX_MONITOR_DEVICES) {
- fprintf(stderr, "qemu: too many monitor devices\n");
- exit(1);
- }
- monitor_devices[monitor_device_index] = optarg;
- monitor_device_index++;
+ add_device_config(DEV_MONITOR, optarg);
+ default_monitor = 0;
break;
case QEMU_OPTION_chardev:
opts = qemu_opts_parse(&qemu_chardev_opts, optarg, "backend");
@@ -5546,14 +5567,15 @@ int main(int argc, char **argv, char **envp)
add_device_config(DEV_SERIAL, "stdio");
if (default_parallel)
add_device_config(DEV_PARALLEL, "null");
- if (strncmp(monitor_devices[0], "vc", 2) == 0) {
- monitor_devices[0] = "stdio";
- }
+ if (default_monitor)
+ add_device_config(DEV_MONITOR, "stdio");
} else {
if (default_serial)
add_device_config(DEV_SERIAL, "vc:80Cx24C");
if (default_parallel)
add_device_config(DEV_PARALLEL, "vc:80Cx24C");
+ if (default_monitor)
+ add_device_config(DEV_MONITOR, "vc:80Cx24C");
}
#ifndef _WIN32
@@ -5702,7 +5724,7 @@ int main(int argc, char **argv, char **envp)
ram_load, NULL);
/* Maintain compatibility with multiple stdio monitors */
- serial_monitor_mux(monitor_devices);
+ serial_monitor_mux();
if (nb_numa_nodes > 0) {
int i;
@@ -5746,24 +5768,8 @@ int main(int argc, char **argv, char **envp)
}
}
- for (i = 0; i < MAX_MONITOR_DEVICES; i++) {
- const char *devname = monitor_devices[i];
- if (devname && strcmp(devname, "none")) {
- char label[32];
- if (i == 0) {
- snprintf(label, sizeof(label), "monitor");
- } else {
- snprintf(label, sizeof(label), "monitor%d", i);
- }
- monitor_hds[i] = qemu_chr_open(label, devname, NULL);
- if (!monitor_hds[i]) {
- fprintf(stderr, "qemu: could not open monitor device '%s'\n",
- devname);
- exit(1);
- }
- }
- }
-
+ if (foreach_device_config(DEV_MONITOR, monitor_parse) < 0)
+ exit(1);
if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
exit(1);
if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
@@ -5887,7 +5893,7 @@ int main(int argc, char **argv, char **envp)
text_consoles_set_display(display_state);
for (i = 0; i < MAX_MONITOR_DEVICES; i++) {
- if (monitor_devices[i] && monitor_hds[i]) {
+ if (monitor_hds[i]) {
monitor_init(monitor_hds[i],
MONITOR_USE_READLINE |
((i == 0) ? MONITOR_IS_DEFAULT : 0));
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 08/21] zap serial_monitor_mux
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (6 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 07/21] default devices: qemu monitor Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 09/21] default devices: vga adapter Gerd Hoffmann
` (12 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
The logic in this code obviously predates the multiple monitor
capability of qemu and looks increasingly silly these days.
I think the intention of this piece of code is to get a reasonable
default for the -nographic case: have monitor and serial line muxed
on stdio.
With the new default_serial and default_monitor variables we have now
doing just that became much easier ;)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 42 ++++++++----------------------------------
1 files changed, 8 insertions(+), 34 deletions(-)
diff --git a/vl.c b/vl.c
index cb59c3c..d851f46 100644
--- a/vl.c
+++ b/vl.c
@@ -4652,33 +4652,6 @@ static int foreach_device_config(int type, int (*func)(const char *cmdline))
return 0;
}
-static void serial_monitor_mux(void)
-{
- struct device_config *mon0, *serial;
- const char *devname;
-
- QTAILQ_FOREACH(mon0, &device_configs, next) {
- if (mon0->type != DEV_MONITOR)
- continue;
- if (strcmp(mon0->cmdline,"stdio") != 0)
- return;
- break;
- }
- QTAILQ_FOREACH(serial, &device_configs, next) {
- if (serial->type != DEV_SERIAL)
- continue;
- devname = serial->cmdline;
- if (devname && !strcmp(devname,"mon:stdio")) {
- QTAILQ_REMOVE(&device_configs, mon0, next);
- break;
- } else if (devname && !strcmp(devname,"stdio")) {
- QTAILQ_REMOVE(&device_configs, mon0, next);
- serial->cmdline = "mon:stdio";
- break;
- }
- }
-}
-
static int serial_parse(const char *devname)
{
static int index = 0;
@@ -5563,12 +5536,16 @@ int main(int argc, char **argv, char **envp)
qemu_opts_foreach(&qemu_device_opts, default_driver_check, NULL, 0);
if (display_type == DT_NOGRAPHIC) {
- if (default_serial)
- add_device_config(DEV_SERIAL, "stdio");
if (default_parallel)
add_device_config(DEV_PARALLEL, "null");
- if (default_monitor)
- add_device_config(DEV_MONITOR, "stdio");
+ if (default_serial && default_monitor) {
+ add_device_config(DEV_SERIAL, "mon:stdio");
+ } else {
+ if (default_serial)
+ add_device_config(DEV_SERIAL, "stdio");
+ if (default_monitor)
+ add_device_config(DEV_MONITOR, "stdio");
+ }
} else {
if (default_serial)
add_device_config(DEV_SERIAL, "vc:80Cx24C");
@@ -5723,9 +5700,6 @@ int main(int argc, char **argv, char **envp)
register_savevm_live("ram", 0, 3, NULL, ram_save_live, NULL,
ram_load, NULL);
- /* Maintain compatibility with multiple stdio monitors */
- serial_monitor_mux();
-
if (nb_numa_nodes > 0) {
int i;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 09/21] default devices: vga adapter.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (7 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 08/21] zap serial_monitor_mux Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Gerd Hoffmann
` (11 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Qemu creates a vga display for you in case you didn't specify one on the
command line. Right now this is tied to the '-vga <type>' command line
switch, which in turn causes trouble if you are creating your gfx card
using '-device VGA,<props>'.
This patch adds a variable default_vga which says whenever a default
serial line should be added. It is enabled by default. It is cleared
when qemu finds '-vga' or '-device {VGA,Cirrus VGA,QEMUware SVGA}' on
the command line.
'-device VGA' still doesn't work though due to a initialization order
issue (vga must init before calling i440fx_init_memory_mappings).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/vl.c b/vl.c
index d851f46..a99e0fe 100644
--- a/vl.c
+++ b/vl.c
@@ -193,7 +193,7 @@ int autostart;
static int rtc_utc = 1;
static int rtc_date_offset = -1; /* -1 means no change */
QEMUClock *rtc_clock;
-int vga_interface_type = VGA_CIRRUS;
+int vga_interface_type = VGA_NONE;
#ifdef TARGET_SPARC
int graphic_width = 1024;
int graphic_height = 768;
@@ -275,6 +275,7 @@ static void *boot_set_opaque;
static int default_serial = 1;
static int default_parallel = 1;
static int default_monitor = 1;
+static int default_vga = 1;
static struct {
const char *driver;
@@ -282,6 +283,9 @@ static struct {
} default_list[] = {
{ .driver = "isa-serial", .flag = &default_serial },
{ .driver = "isa-parallel", .flag = &default_parallel },
+ { .driver = "VGA", .flag = &default_vga },
+ { .driver = "Cirrus VGA", .flag = &default_vga },
+ { .driver = "QEMUware SVGA", .flag = &default_vga },
};
static int default_driver_check(QemuOpts *opts, void *opaque)
@@ -4373,6 +4377,7 @@ static void select_vgahw (const char *p)
{
const char *opts;
+ default_vga = 0;
vga_interface_type = VGA_NONE;
if (strstart(p, "std", &opts)) {
vga_interface_type = VGA_STD;
@@ -5554,6 +5559,8 @@ int main(int argc, char **argv, char **envp)
if (default_monitor)
add_device_config(DEV_MONITOR, "vc:80Cx24C");
}
+ if (default_vga)
+ vga_interface_type = VGA_CIRRUS;
#ifndef _WIN32
if (daemonize) {
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (8 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 09/21] default devices: vga adapter Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-08 12:46 ` [Qemu-devel] " Paolo Bonzini
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 11/21] default devices: network Gerd Hoffmann
` (10 subsequent siblings)
20 siblings, 1 reply; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Add global command line option to disable default devices.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-options.hx | 5 +++++
vl.c | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index b65fd74..70929fa 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1878,6 +1878,11 @@ DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
STEXI
ETEXI
+DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
+ "-nodefaults don't create default devices.\n")
+STEXI
+ETEXI
+
#ifndef _WIN32
DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
"-chroot dir Chroot to dir just before starting the VM.\n")
diff --git a/vl.c b/vl.c
index a99e0fe..f02b333 100644
--- a/vl.c
+++ b/vl.c
@@ -5460,6 +5460,12 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_incoming:
incoming = optarg;
break;
+ case QEMU_OPTION_nodefaults:
+ default_serial = 0;
+ default_parallel = 0;
+ default_monitor = 0;
+ default_vga = 0;
+ break;
#ifndef _WIN32
case QEMU_OPTION_chroot:
chroot_dir = optarg;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 11/21] default devices: network
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (9 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 12/21] default devices: drives Gerd Hoffmann
` (9 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Add a default_net variable which specified whenever a default network
should be created. It is cleared in case any -net option is specified
and it is also added to the new -nodefaults switch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
net.c | 5 ++++-
net.h | 1 +
vl.c | 1 +
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/net.c b/net.c
index 13bdbb2..6ef93e6 100644
--- a/net.c
+++ b/net.c
@@ -39,6 +39,8 @@
static QTAILQ_HEAD(, VLANState) vlans;
static QTAILQ_HEAD(, VLANClientState) non_vlan_clients;
+int default_net = 1;
+
/***********************************************************/
/* network device redirectors */
@@ -1317,7 +1319,7 @@ static int net_init_netdev(QemuOpts *opts, void *dummy)
int net_init_clients(void)
{
- if (QTAILQ_EMPTY(&qemu_net_opts.head)) {
+ if (default_net) {
/* if no clients, we use a default config */
qemu_opts_set(&qemu_net_opts, NULL, "type", "nic");
#ifdef CONFIG_SLIRP
@@ -1353,5 +1355,6 @@ int net_client_parse(QemuOptsList *opts_list, const char *optarg)
return -1;
}
+ default_net = 0;
return 0;
}
diff --git a/net.h b/net.h
index d583d59..4971fcb 100644
--- a/net.h
+++ b/net.h
@@ -139,6 +139,7 @@ struct NICInfo {
extern int nb_nics;
extern NICInfo nd_table[MAX_NICS];
+extern int default_net;
/* BT HCI info */
diff --git a/vl.c b/vl.c
index f02b333..f30da12 100644
--- a/vl.c
+++ b/vl.c
@@ -5465,6 +5465,7 @@ int main(int argc, char **argv, char **envp)
default_parallel = 0;
default_monitor = 0;
default_vga = 0;
+ default_net = 0;
break;
#ifndef _WIN32
case QEMU_OPTION_chroot:
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 12/21] default devices: drives
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (10 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 11/21] default devices: network Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 13/21] qdev: make compat stuff more generic Gerd Hoffmann
` (8 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Add a default_drive variable which specified whenever the default drives
(cdrom, floppy, sd) should be created. It is cleared when the new
-nodefaults switch is specified on the command line.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/vl.c b/vl.c
index f30da12..8071868 100644
--- a/vl.c
+++ b/vl.c
@@ -276,6 +276,7 @@ static int default_serial = 1;
static int default_parallel = 1;
static int default_monitor = 1;
static int default_vga = 1;
+static int default_drive = 1;
static struct {
const char *driver;
@@ -5466,6 +5467,7 @@ int main(int argc, char **argv, char **envp)
default_monitor = 0;
default_vga = 0;
default_net = 0;
+ default_drive = 0;
break;
#ifndef _WIN32
case QEMU_OPTION_chroot:
@@ -5695,14 +5697,16 @@ int main(int argc, char **argv, char **envp)
blk_mig_init();
- /* we always create the cdrom drive, even if no disk is there */
- drive_add(NULL, CDROM_ALIAS);
+ if (default_drive) {
+ /* we always create the cdrom drive, even if no disk is there */
+ drive_add(NULL, CDROM_ALIAS);
- /* we always create at least one floppy */
- drive_add(NULL, FD_ALIAS, 0);
+ /* we always create at least one floppy */
+ drive_add(NULL, FD_ALIAS, 0);
- /* we always create one sd slot, even if no card is in it */
- drive_add(NULL, SD_ALIAS);
+ /* we always create one sd slot, even if no card is in it */
+ drive_add(NULL, SD_ALIAS);
+ }
/* open the virtual block devices */
if (snapshot)
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 13/21] qdev: make compat stuff more generic
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (11 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 12/21] default devices: drives Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 14/21] qdev: add command line option to set global defaults for properties Gerd Hoffmann
` (7 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
This patch renames the compat properties into global properties and
makes them more generic. The compatibility stuff is only one of
multiple possible users now.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/boards.h | 2 +-
hw/pc.c | 2 +-
hw/qdev-properties.c | 22 ++++++++++++++--------
hw/qdev.c | 2 +-
hw/qdev.h | 10 ++++++----
vl.c | 2 +-
6 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/hw/boards.h b/hw/boards.h
index d889341..7a0f20f 100644
--- a/hw/boards.h
+++ b/hw/boards.h
@@ -20,7 +20,7 @@ typedef struct QEMUMachine {
int use_scsi;
int max_cpus;
int is_default;
- CompatProperty *compat_props;
+ GlobalProperty *compat_props;
struct QEMUMachine *next;
} QEMUMachine;
diff --git a/hw/pc.c b/hw/pc.c
index 8c1b7ea..147a9a7 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1298,7 +1298,7 @@ static QEMUMachine pc_machine_v0_10 = {
.desc = "Standard PC, qemu 0.10",
.init = pc_init_pci,
.max_cpus = 255,
- .compat_props = (CompatProperty[]) {
+ .compat_props = (GlobalProperty[]) {
{
.driver = "virtio-blk-pci",
.property = "class",
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index bda6699..fe106bd 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -593,21 +593,27 @@ void qdev_prop_set_defaults(DeviceState *dev, Property *props)
}
}
-static CompatProperty *compat_props;
+static QTAILQ_HEAD(, GlobalProperty) global_props = QTAILQ_HEAD_INITIALIZER(global_props);
-void qdev_prop_register_compat(CompatProperty *props)
+void qdev_prop_register_global(GlobalProperty *prop)
{
- compat_props = props;
+ QTAILQ_INSERT_TAIL(&global_props, prop, next);
}
-void qdev_prop_set_compat(DeviceState *dev)
+void qdev_prop_register_global_list(GlobalProperty *props)
{
- CompatProperty *prop;
+ int i;
- if (!compat_props) {
- return;
+ for (i = 0; props[i].driver != NULL; i++) {
+ qdev_prop_register_global(props+i);
}
- for (prop = compat_props; prop->driver != NULL; prop++) {
+}
+
+void qdev_prop_set_globals(DeviceState *dev)
+{
+ GlobalProperty *prop;
+
+ QTAILQ_FOREACH(prop, &global_props, next) {
if (strcmp(dev->info->name, prop->driver) != 0) {
continue;
}
diff --git a/hw/qdev.c b/hw/qdev.c
index 13c9fe2..b6bd4ae 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -103,7 +103,7 @@ DeviceState *qdev_create(BusState *bus, const char *name)
dev->parent_bus = bus;
qdev_prop_set_defaults(dev, dev->info->props);
qdev_prop_set_defaults(dev, dev->parent_bus->info->props);
- qdev_prop_set_compat(dev);
+ qdev_prop_set_globals(dev);
QLIST_INSERT_HEAD(&bus->children, dev, sibling);
if (qdev_hotplug) {
assert(bus->allow_hotplug);
diff --git a/hw/qdev.h b/hw/qdev.h
index 8d53754..bbcdba1 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -92,11 +92,12 @@ struct PropertyInfo {
int (*print)(DeviceState *dev, Property *prop, char *dest, size_t len);
};
-struct CompatProperty {
+typedef struct GlobalProperty {
const char *driver;
const char *property;
const char *value;
-};
+ QTAILQ_ENTRY(GlobalProperty) next;
+} GlobalProperty;
/*** Board API. This should go away once we have a machine config file. ***/
@@ -256,8 +257,9 @@ void qdev_prop_set_macaddr(DeviceState *dev, const char *name, uint8_t *value);
void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value);
void qdev_prop_set_defaults(DeviceState *dev, Property *props);
-void qdev_prop_register_compat(CompatProperty *props);
-void qdev_prop_set_compat(DeviceState *dev);
+void qdev_prop_register_global(GlobalProperty *prop);
+void qdev_prop_register_global_list(GlobalProperty *props);
+void qdev_prop_set_globals(DeviceState *dev);
/* This is a nasty hack to allow passing a NULL bus to qdev_create. */
extern struct BusInfo system_bus_info;
diff --git a/vl.c b/vl.c
index 8071868..aba4f62 100644
--- a/vl.c
+++ b/vl.c
@@ -5790,7 +5790,7 @@ int main(int argc, char **argv, char **envp)
}
if (machine->compat_props) {
- qdev_prop_register_compat(machine->compat_props);
+ qdev_prop_register_global_list(machine->compat_props);
}
machine->init(ram_size, boot_devices,
kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 14/21] qdev: add command line option to set global defaults for properties.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (12 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 13/21] qdev: make compat stuff more generic Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 15/21] chardev: make chardevs specified in config file work Gerd Hoffmann
` (6 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
This patch adds infrastructure and command line option for setting
global defaults for device properties, i.e. you can for example use
-global virtio-blk-pci.vectors=0
to turn off msi by default for all virtio block devices. The config
file syntax is:
[global]
driver = "virtio-blk-pci"
property = "vectors"
value = "0"
This can also be used to set properties for devices which are not
created via -device but implicitly via machine init, i.e.
-global isa-fdc,driveA=<name>
This patch uses the mechanism which configures properties for the
compatibility machine types (pc-0.10 & friends). The command line
takes precedence over the machine type values.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-config.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
qemu-config.h | 2 +
qemu-options.hx | 3 ++
vl.c | 6 +++++
4 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/qemu-config.c b/qemu-config.c
index 92b5363..a23b125 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -2,6 +2,7 @@
#include "qemu-option.h"
#include "qemu-config.h"
#include "sysemu.h"
+#include "hw/qdev.h"
QemuOptsList qemu_drive_opts = {
.name = "drive",
@@ -205,6 +206,24 @@ QemuOptsList qemu_rtc_opts = {
},
};
+QemuOptsList qemu_global_opts = {
+ .name = "global",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_global_opts.head),
+ .desc = {
+ {
+ .name = "driver",
+ .type = QEMU_OPT_STRING,
+ },{
+ .name = "property",
+ .type = QEMU_OPT_STRING,
+ },{
+ .name = "value",
+ .type = QEMU_OPT_STRING,
+ },
+ { /* end if list */ }
+ },
+};
+
static QemuOptsList *lists[] = {
&qemu_drive_opts,
&qemu_chardev_opts,
@@ -212,6 +231,7 @@ static QemuOptsList *lists[] = {
&qemu_netdev_opts,
&qemu_net_opts,
&qemu_rtc_opts,
+ &qemu_global_opts,
NULL,
};
@@ -260,6 +280,42 @@ int qemu_set_option(const char *str)
return 0;
}
+int qemu_global_option(const char *str)
+{
+ char driver[64], property[64];
+ QemuOpts *opts;
+ int rc, offset;
+
+ rc = sscanf(str, "%63[^.].%63[^=]%n", driver, property, &offset);
+ if (rc < 2 || str[offset] != '=') {
+ qemu_error("can't parse: \"%s\"\n", str);
+ return -1;
+ }
+
+ opts = qemu_opts_create(&qemu_global_opts, NULL, 0);
+ qemu_opt_set(opts, "driver", driver);
+ qemu_opt_set(opts, "property", property);
+ qemu_opt_set(opts, "value", str+offset+1);
+ return 0;
+}
+
+static int qemu_add_one_global(QemuOpts *opts, void *opaque)
+{
+ GlobalProperty *g;
+
+ g = qemu_mallocz(sizeof(*g));
+ g->driver = qemu_opt_get(opts, "driver");
+ g->property = qemu_opt_get(opts, "property");
+ g->value = qemu_opt_get(opts, "value");
+ qdev_prop_register_global(g);
+ return 0;
+}
+
+void qemu_add_globals(void)
+{
+ qemu_opts_foreach(&qemu_global_opts, qemu_add_one_global, NULL, 0);
+}
+
struct ConfigWriteData {
QemuOptsList *list;
FILE *fp;
diff --git a/qemu-config.h b/qemu-config.h
index b564851..6246e76 100644
--- a/qemu-config.h
+++ b/qemu-config.h
@@ -9,6 +9,8 @@ extern QemuOptsList qemu_net_opts;
extern QemuOptsList qemu_rtc_opts;
int qemu_set_option(const char *str);
+int qemu_global_option(const char *str);
+void qemu_add_globals(void);
void qemu_config_write(FILE *fp);
int qemu_config_parse(FILE *fp);
diff --git a/qemu-options.hx b/qemu-options.hx
index 70929fa..e05b2a0 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -109,6 +109,9 @@ DEF("set", HAS_ARG, QEMU_OPTION_set,
"-set group.id.arg=value\n"
" set <arg> parameter for item <id> of type <group>\n"
" i.e. -set drive.$id.file=/path/to/image\n")
+DEF("global", HAS_ARG, QEMU_OPTION_global,
+ "-global driver.property=value\n"
+ " set a global default for a driver property\n")
STEXI
@item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
diff --git a/vl.c b/vl.c
index aba4f62..4551ee8 100644
--- a/vl.c
+++ b/vl.c
@@ -4917,6 +4917,10 @@ int main(int argc, char **argv, char **envp)
if (qemu_set_option(optarg) != 0)
exit(1);
break;
+ case QEMU_OPTION_global:
+ if (qemu_global_option(optarg) != 0)
+ exit(1);
+ break;
case QEMU_OPTION_mtdblock:
drive_add(optarg, MTD_ALIAS);
break;
@@ -5792,6 +5796,8 @@ int main(int argc, char **argv, char **envp)
if (machine->compat_props) {
qdev_prop_register_global_list(machine->compat_props);
}
+ qemu_add_globals();
+
machine->init(ram_size, boot_devices,
kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 15/21] chardev: make chardevs specified in config file work.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (13 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 14/21] qdev: add command line option to set global defaults for properties Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 16/21] un-static qemu_chr_parse_compat() Gerd Hoffmann
` (5 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
The patch decuples the -chardev switch and the actual chardev
initialization. Without this patch qemu ignores chardev entries
coming via -readconfig.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/vl.c b/vl.c
index 4551ee8..701b687 100644
--- a/vl.c
+++ b/vl.c
@@ -4620,6 +4620,16 @@ static int device_init_func(QemuOpts *opts, void *opaque)
return 0;
}
+static int chardev_init_func(QemuOpts *opts, void *opaque)
+{
+ CharDriverState *chr;
+
+ chr = qemu_chr_open_opts(opts, NULL);
+ if (!chr)
+ return -1;
+ return 0;
+}
+
struct device_config {
enum {
DEV_USB, /* -usbdevice */
@@ -5240,9 +5250,6 @@ int main(int argc, char **argv, char **envp)
fprintf(stderr, "parse error: %s\n", optarg);
exit(1);
}
- if (qemu_chr_open_opts(opts, NULL) == NULL) {
- exit(1);
- }
break;
case QEMU_OPTION_serial:
add_device_config(DEV_SERIAL, optarg);
@@ -5553,6 +5560,9 @@ int main(int argc, char **argv, char **envp)
qemu_opts_foreach(&qemu_device_opts, default_driver_check, NULL, 0);
+ if (qemu_opts_foreach(&qemu_chardev_opts, chardev_init_func, NULL, 1) != 0)
+ exit(1);
+
if (display_type == DT_NOGRAPHIC) {
if (default_parallel)
add_device_config(DEV_PARALLEL, "null");
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 16/21] un-static qemu_chr_parse_compat()
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (14 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 15/21] chardev: make chardevs specified in config file work Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts Gerd Hoffmann
` (4 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-char.c | 2 +-
qemu-char.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index da5c15c..c6008c3 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2231,7 +2231,7 @@ static CharDriverState *qemu_chr_open_socket(QemuOpts *opts)
return NULL;
}
-static QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
+QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
{
char host[65], port[33], width[8], height[8];
int pos;
diff --git a/qemu-char.h b/qemu-char.h
index 9957db1..7fa8e5c 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -69,6 +69,7 @@ struct CharDriverState {
QTAILQ_ENTRY(CharDriverState) next;
};
+QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
void (*init)(struct CharDriverState *s));
CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s));
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (15 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 16/21] un-static qemu_chr_parse_compat() Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 14:59 ` [Qemu-devel] " Luiz Capitulino
2009-12-07 19:11 ` [Qemu-devel] " Anthony Liguori
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 18/21] add new -mon switch Gerd Hoffmann
` (3 subsequent siblings)
20 siblings, 2 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
This patch reworks the -monitor handling:
- It adds a new "mon" QemuOpts list for the monitor(s).
- It adds a monitor_parse() function to parse the -monitor switch.
- It adds a mon_init function to initialize the monitor(s) from the
"mon" QemuOpts list.
- It winds up everything and removes the old bits.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-config.c | 19 +++++++++
qemu-config.h | 1 +
vl.c | 121 ++++++++++++++++++++++++++++++++++++--------------------
3 files changed, 98 insertions(+), 43 deletions(-)
diff --git a/qemu-config.c b/qemu-config.c
index a23b125..c3203c8 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -224,6 +224,24 @@ QemuOptsList qemu_global_opts = {
},
};
+QemuOptsList qemu_mon_opts = {
+ .name = "mon",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_mon_opts.head),
+ .desc = {
+ {
+ .name = "mode",
+ .type = QEMU_OPT_STRING,
+ },{
+ .name = "chardev",
+ .type = QEMU_OPT_STRING,
+ },{
+ .name = "default",
+ .type = QEMU_OPT_BOOL,
+ },
+ { /* end if list */ }
+ },
+};
+
static QemuOptsList *lists[] = {
&qemu_drive_opts,
&qemu_chardev_opts,
@@ -232,6 +250,7 @@ static QemuOptsList *lists[] = {
&qemu_net_opts,
&qemu_rtc_opts,
&qemu_global_opts,
+ &qemu_mon_opts,
NULL,
};
diff --git a/qemu-config.h b/qemu-config.h
index 6246e76..34dfadc 100644
--- a/qemu-config.h
+++ b/qemu-config.h
@@ -7,6 +7,7 @@ extern QemuOptsList qemu_device_opts;
extern QemuOptsList qemu_netdev_opts;
extern QemuOptsList qemu_net_opts;
extern QemuOptsList qemu_rtc_opts;
+extern QemuOptsList qemu_mon_opts;
int qemu_set_option(const char *str);
int qemu_global_option(const char *str);
diff --git a/vl.c b/vl.c
index 701b687..11910ac 100644
--- a/vl.c
+++ b/vl.c
@@ -172,9 +172,6 @@ int main(int argc, char **argv)
#define DEFAULT_RAM_SIZE 128
-/* Maximum number of monitor devices */
-#define MAX_MONITOR_DEVICES 10
-
static const char *data_dir;
const char *bios_name = NULL;
/* Note: drives_table[MAX_DRIVES] is a dummy block driver if none available
@@ -211,7 +208,6 @@ int no_quit = 0;
CharDriverState *serial_hds[MAX_SERIAL_PORTS];
CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES];
-CharDriverState *monitor_hds[MAX_MONITOR_DEVICES];
#ifdef TARGET_I386
int win2k_install_hack = 0;
int rtc_td_hack = 0;
@@ -4630,13 +4626,85 @@ static int chardev_init_func(QemuOpts *opts, void *opaque)
return 0;
}
+static int mon_init_func(QemuOpts *opts, void *opaque)
+{
+ CharDriverState *chr;
+ const char *chardev;
+ const char *mode;
+ int flags;
+
+ qemu_opts_print(opts, NULL);
+
+ mode = qemu_opt_get(opts, "mode");
+ if (mode == NULL) {
+ mode = "readline";
+ }
+ if (strcmp(mode, "readline") == 0) {
+ flags = MONITOR_USE_READLINE;
+ } else if (strcmp(mode, "control") == 0) {
+ flags = MONITOR_USE_CONTROL;
+ } else {
+ fprintf(stderr, "unknown monitor mode \"%s\"\n", mode);
+ exit(1);
+ }
+
+ if (qemu_opt_get_bool(opts, "default", 0))
+ flags |= MONITOR_IS_DEFAULT;
+
+ chardev = qemu_opt_get(opts, "chardev");
+ chr = qemu_chr_find(chardev);
+ if (chardev == NULL) {
+ fprintf(stderr, "chardev \"%s\" not found\n", chardev);
+ exit(1);
+ }
+
+ monitor_init(chr, flags);
+ return 0;
+}
+
+static void monitor_parse(const char *optarg)
+{
+ static int monitor_device_index = 0;
+ QemuOpts *opts;
+ const char *p;
+ char label[32];
+ int def = 0;
+
+ if (strstart(optarg, "chardev:", &p)) {
+ snprintf(label, sizeof(label), "%s", p);
+ } else {
+ if (monitor_device_index) {
+ snprintf(label, sizeof(label), "monitor%d",
+ monitor_device_index);
+ } else {
+ snprintf(label, sizeof(label), "monitor");
+ def = 1;
+ }
+ opts = qemu_chr_parse_compat(label, optarg);
+ if (!opts) {
+ fprintf(stderr, "fixme #1\n");
+ exit(1);
+ }
+ }
+
+ opts = qemu_opts_create(&qemu_mon_opts, label, 1);
+ if (!opts) {
+ fprintf(stderr, "fixme #2\n");
+ exit(1);
+ }
+ qemu_opt_set(opts, "mode", "readline");
+ qemu_opt_set(opts, "chardev", label);
+ if (def)
+ qemu_opt_set(opts, "default", "on");
+ monitor_device_index++;
+}
+
struct device_config {
enum {
DEV_USB, /* -usbdevice */
DEV_BT, /* -bt */
DEV_SERIAL, /* -serial */
DEV_PARALLEL, /* -parallel */
- DEV_MONITOR, /* -monitor */
} type;
const char *cmdline;
QTAILQ_ENTRY(device_config) next;
@@ -4712,32 +4780,6 @@ static int parallel_parse(const char *devname)
return 0;
}
-static int monitor_parse(const char *devname)
-{
- static int index = 0;
- char label[32];
-
- if (strcmp(devname, "none") == 0)
- return 0;
- if (index == MAX_MONITOR_DEVICES) {
- fprintf(stderr, "qemu: too many monitor devices\n");
- exit(1);
- }
- if (index == 0) {
- snprintf(label, sizeof(label), "monitor");
- } else {
- snprintf(label, sizeof(label), "monitor%d", index);
- }
- monitor_hds[index] = qemu_chr_open(label, devname, NULL);
- if (!monitor_hds[index]) {
- fprintf(stderr, "qemu: could not open monitor device '%s'\n",
- devname);
- return -1;
- }
- index++;
- return 0;
-}
-
int main(int argc, char **argv, char **envp)
{
const char *gdbstub_dev = NULL;
@@ -5241,7 +5283,7 @@ int main(int argc, char **argv, char **envp)
break;
}
case QEMU_OPTION_monitor:
- add_device_config(DEV_MONITOR, optarg);
+ monitor_parse(optarg);
default_monitor = 0;
break;
case QEMU_OPTION_chardev:
@@ -5572,7 +5614,7 @@ int main(int argc, char **argv, char **envp)
if (default_serial)
add_device_config(DEV_SERIAL, "stdio");
if (default_monitor)
- add_device_config(DEV_MONITOR, "stdio");
+ monitor_parse("stdio");
}
} else {
if (default_serial)
@@ -5580,7 +5622,7 @@ int main(int argc, char **argv, char **envp)
if (default_parallel)
add_device_config(DEV_PARALLEL, "vc:80Cx24C");
if (default_monitor)
- add_device_config(DEV_MONITOR, "vc:80Cx24C");
+ monitor_parse("vc:80Cx24C");
}
if (default_vga)
vga_interface_type = VGA_CIRRUS;
@@ -5774,8 +5816,6 @@ int main(int argc, char **argv, char **envp)
}
}
- if (foreach_device_config(DEV_MONITOR, monitor_parse) < 0)
- exit(1);
if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
exit(1);
if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
@@ -5900,13 +5940,8 @@ int main(int argc, char **argv, char **envp)
text_consoles_set_display(display_state);
- for (i = 0; i < MAX_MONITOR_DEVICES; i++) {
- if (monitor_hds[i]) {
- monitor_init(monitor_hds[i],
- MONITOR_USE_READLINE |
- ((i == 0) ? MONITOR_IS_DEFAULT : 0));
- }
- }
+ if (qemu_opts_foreach(&qemu_mon_opts, mon_init_func, NULL, 1) != 0)
+ exit(1);
if (gdbstub_dev && gdbserver_start(gdbstub_dev) < 0) {
fprintf(stderr, "qemu: could not open gdbserver on device '%s'\n",
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 18/21] add new -mon switch
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (16 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 19/21] add -qmp convinience switch Gerd Hoffmann
` (2 subsequent siblings)
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-options.hx | 7 +++++++
vl.c | 8 ++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index e05b2a0..7234447 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1589,6 +1589,13 @@ The default device is @code{vc} in graphical mode and @code{stdio} in
non graphical mode.
ETEXI
+DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
+ "-mon chardev=[name][,mode=readline|control][,default]\n")
+STEXI
+@item -mon chardev=[name][,mode=readline|control][,default]
+Setup monitor on chardev @var{name}.
+ETEXI
+
DEF("pidfile", HAS_ARG, QEMU_OPTION_pidfile, \
"-pidfile file write PID to 'file'\n")
STEXI
diff --git a/vl.c b/vl.c
index 11910ac..6411bd6 100644
--- a/vl.c
+++ b/vl.c
@@ -5286,6 +5286,14 @@ int main(int argc, char **argv, char **envp)
monitor_parse(optarg);
default_monitor = 0;
break;
+ case QEMU_OPTION_mon:
+ opts = qemu_opts_parse(&qemu_mon_opts, optarg, "chardev");
+ if (!opts) {
+ fprintf(stderr, "parse error: %s\n", optarg);
+ exit(1);
+ }
+ default_monitor = 0;
+ break;
case QEMU_OPTION_chardev:
opts = qemu_opts_parse(&qemu_chardev_opts, optarg, "backend");
if (!opts) {
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 19/21] add -qmp convinience switch
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (17 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 18/21] add new -mon switch Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 20/21] default devices: virtio consoles Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 21/21] Set default console to virtio on S390x Gerd Hoffmann
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-options.hx | 2 ++
vl.c | 14 +++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 7234447..b8cc375 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1588,6 +1588,8 @@ serial port).
The default device is @code{vc} in graphical mode and @code{stdio} in
non graphical mode.
ETEXI
+DEF("qmp", HAS_ARG, QEMU_OPTION_qmp, \
+ "-qmp dev like -monitor but opens in 'control' mode.\n")
DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
"-mon chardev=[name][,mode=readline|control][,default]\n")
diff --git a/vl.c b/vl.c
index 6411bd6..9949886 100644
--- a/vl.c
+++ b/vl.c
@@ -4662,7 +4662,7 @@ static int mon_init_func(QemuOpts *opts, void *opaque)
return 0;
}
-static void monitor_parse(const char *optarg)
+static void monitor_parse(const char *optarg, const char *mode)
{
static int monitor_device_index = 0;
QemuOpts *opts;
@@ -4692,7 +4692,7 @@ static void monitor_parse(const char *optarg)
fprintf(stderr, "fixme #2\n");
exit(1);
}
- qemu_opt_set(opts, "mode", "readline");
+ qemu_opt_set(opts, "mode", mode);
qemu_opt_set(opts, "chardev", label);
if (def)
qemu_opt_set(opts, "default", "on");
@@ -5283,7 +5283,11 @@ int main(int argc, char **argv, char **envp)
break;
}
case QEMU_OPTION_monitor:
- monitor_parse(optarg);
+ monitor_parse(optarg, "readline");
+ default_monitor = 0;
+ break;
+ case QEMU_OPTION_qmp:
+ monitor_parse(optarg, "control");
default_monitor = 0;
break;
case QEMU_OPTION_mon:
@@ -5622,7 +5626,7 @@ int main(int argc, char **argv, char **envp)
if (default_serial)
add_device_config(DEV_SERIAL, "stdio");
if (default_monitor)
- monitor_parse("stdio");
+ monitor_parse("stdio", "readline");
}
} else {
if (default_serial)
@@ -5630,7 +5634,7 @@ int main(int argc, char **argv, char **envp)
if (default_parallel)
add_device_config(DEV_PARALLEL, "vc:80Cx24C");
if (default_monitor)
- monitor_parse("vc:80Cx24C");
+ monitor_parse("vc:80Cx24C", "readline");
}
if (default_vga)
vga_interface_type = VGA_CIRRUS;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 20/21] default devices: virtio consoles.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (18 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 19/21] add -qmp convinience switch Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-07 13:07 ` [Qemu-devel] " Alexander Graf
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 21/21] Set default console to virtio on S390x Gerd Hoffmann
20 siblings, 1 reply; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
This patch adds a variable default_virtcon which says whenever a default
virtio console should be added. It is disabled by default, followup
patch will enable it for s390. It is cleared when qemu finds
'-virtiocon', '-device virtio-console-s390' or '-device
virtio-console-pci' on the command line.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 64 ++++++++++++++++++++++++++++++++++------------------------------
1 files changed, 34 insertions(+), 30 deletions(-)
diff --git a/vl.c b/vl.c
index 9949886..298ac73 100644
--- a/vl.c
+++ b/vl.c
@@ -270,6 +270,7 @@ static void *boot_set_opaque;
static int default_serial = 1;
static int default_parallel = 1;
+static int default_virtcon = 1;
static int default_monitor = 1;
static int default_vga = 1;
static int default_drive = 1;
@@ -280,6 +281,8 @@ static struct {
} default_list[] = {
{ .driver = "isa-serial", .flag = &default_serial },
{ .driver = "isa-parallel", .flag = &default_parallel },
+ { .driver = "virtio-console-pci", .flag = &default_virtcon },
+ { .driver = "virtio-console-s390", .flag = &default_virtcon },
{ .driver = "VGA", .flag = &default_vga },
{ .driver = "Cirrus VGA", .flag = &default_vga },
{ .driver = "QEMUware SVGA", .flag = &default_vga },
@@ -4701,10 +4704,11 @@ static void monitor_parse(const char *optarg, const char *mode)
struct device_config {
enum {
- DEV_USB, /* -usbdevice */
- DEV_BT, /* -bt */
- DEV_SERIAL, /* -serial */
- DEV_PARALLEL, /* -parallel */
+ DEV_USB, /* -usbdevice */
+ DEV_BT, /* -bt */
+ DEV_SERIAL, /* -serial */
+ DEV_PARALLEL, /* -parallel */
+ DEV_VIRTCON, /* -virtioconsole */
} type;
const char *cmdline;
QTAILQ_ENTRY(device_config) next;
@@ -4780,6 +4784,28 @@ static int parallel_parse(const char *devname)
return 0;
}
+static int virtcon_parse(const char *devname)
+{
+ static int index = 0;
+ char label[32];
+
+ if (strcmp(devname, "none") == 0)
+ return 0;
+ if (index == MAX_VIRTIO_CONSOLES) {
+ fprintf(stderr, "qemu: too many virtio consoles\n");
+ exit(1);
+ }
+ snprintf(label, sizeof(label), "virtcon%d", index);
+ virtcon_hds[index] = qemu_chr_open(label, devname, NULL);
+ if (!virtcon_hds[index]) {
+ fprintf(stderr, "qemu: could not open virtio console '%s': %s\n",
+ devname, strerror(errno));
+ return -1;
+ }
+ index++;
+ return 0;
+}
+
int main(int argc, char **argv, char **envp)
{
const char *gdbstub_dev = NULL;
@@ -4795,8 +4821,6 @@ int main(int argc, char **argv, char **envp)
QemuOpts *hda_opts = NULL, *opts;
int optind;
const char *r, *optarg;
- const char *virtio_consoles[MAX_VIRTIO_CONSOLES];
- int virtio_console_index;
const char *loadvm = NULL;
QEMUMachine *machine;
const char *cpu_model;
@@ -4862,10 +4886,6 @@ int main(int argc, char **argv, char **envp)
cyls = heads = secs = 0;
translation = BIOS_ATA_TRANSLATION_AUTO;
- for(i = 0; i < MAX_VIRTIO_CONSOLES; i++)
- virtio_consoles[i] = NULL;
- virtio_console_index = 0;
-
for (i = 0; i < MAX_NODES; i++) {
node_mem[i] = 0;
node_cpumask[i] = 0;
@@ -5324,12 +5344,8 @@ int main(int argc, char **argv, char **envp)
}
break;
case QEMU_OPTION_virtiocon:
- if (virtio_console_index >= MAX_VIRTIO_CONSOLES) {
- fprintf(stderr, "qemu: too many virtio consoles\n");
- exit(1);
- }
- virtio_consoles[virtio_console_index] = optarg;
- virtio_console_index++;
+ add_device_config(DEV_VIRTCON, optarg);
+ default_virtcon = 0;
break;
case QEMU_OPTION_parallel:
add_device_config(DEV_PARALLEL, optarg);
@@ -5832,20 +5848,8 @@ int main(int argc, char **argv, char **envp)
exit(1);
if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
exit(1);
-
- for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
- const char *devname = virtio_consoles[i];
- if (devname && strcmp(devname, "none")) {
- char label[32];
- snprintf(label, sizeof(label), "virtcon%d", i);
- virtcon_hds[i] = qemu_chr_open(label, devname, NULL);
- if (!virtcon_hds[i]) {
- fprintf(stderr, "qemu: could not open virtio console '%s': %s\n",
- devname, strerror(errno));
- exit(1);
- }
- }
- }
+ if (foreach_device_config(DEV_VIRTCON, virtcon_parse) < 0)
+ exit(1);
module_call_init(MODULE_INIT_DEVICE);
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 21/21] Set default console to virtio on S390x
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
` (19 preceding siblings ...)
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 20/21] default devices: virtio consoles Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
20 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
All "normal" system emulation targets in qemu I'm aware of display
output on either VGA or serial output.
Our S390x virtio machine doesn't have such kind of legacy hardware. So
instead we need to default to a virtio console.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/vl.c b/vl.c
index 298ac73..98374c8 100644
--- a/vl.c
+++ b/vl.c
@@ -268,9 +268,14 @@ uint8_t qemu_uuid[16];
static QEMUBootSetHandler *boot_set_handler;
static void *boot_set_opaque;
+#ifdef TARGET_S390X
+static int default_serial = 0;
+static int default_virtcon = 1;
+#else
static int default_serial = 1;
+static int default_virtcon = 0;
+#endif
static int default_parallel = 1;
-static int default_virtcon = 1;
static int default_monitor = 1;
static int default_vga = 1;
static int default_drive = 1;
@@ -5638,9 +5643,13 @@ int main(int argc, char **argv, char **envp)
add_device_config(DEV_PARALLEL, "null");
if (default_serial && default_monitor) {
add_device_config(DEV_SERIAL, "mon:stdio");
+ } else if (default_virtcon && default_monitor) {
+ add_device_config(DEV_VIRTCON, "mon:stdio");
} else {
if (default_serial)
add_device_config(DEV_SERIAL, "stdio");
+ if (default_virtcon)
+ add_device_config(DEV_VIRTCON, "stdio");
if (default_monitor)
monitor_parse("stdio", "readline");
}
--
1.6.5.2
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines Gerd Hoffmann
@ 2009-12-07 12:52 ` Alexander Graf
2009-12-07 13:27 ` Gerd Hoffmann
2009-12-07 12:54 ` Alexander Graf
1 sibling, 1 reply; 39+ messages in thread
From: Alexander Graf @ 2009-12-07 12:52 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, lcapitulino
On 07.12.2009, at 13:42, Gerd Hoffmann wrote:
> Qemu creates a default serial line for you in case you didn't specify
> one on the command line. Right now this is tied to the '-serial
> <chardev>' command line switch, which in turn causes trouble if you are
> creating your serial line via '-device isa-serial,<props>'.
>
> This patch adds a variable default_serial which says whenever a default
> serial line should be added. It is enabled by default. It is cleared
> when qemu finds '-serial' or '-device isa-serial' on the command line.
>
> Part of the patch is some infrastructure for the '-device $driver'
> checking (default_driver_check function) which will also be used by the
> other patches of this series.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> vl.c | 122 +++++++++++++++++++++++++++++++++++++++++++----------------------
> 1 files changed, 81 insertions(+), 41 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 24d5d92..eca4eee 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -271,6 +271,30 @@ uint8_t qemu_uuid[16];
> static QEMUBootSetHandler *boot_set_handler;
> static void *boot_set_opaque;
>
> +static int default_serial = 1;
Default variables belong in the machine description IMHO. On S390, we can't create serial, parallel or vga (or any MMIO/PIO requiring) devices.
Alex
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines Gerd Hoffmann
2009-12-07 12:52 ` [Qemu-devel] " Alexander Graf
@ 2009-12-07 12:54 ` Alexander Graf
2009-12-07 13:30 ` Gerd Hoffmann
1 sibling, 1 reply; 39+ messages in thread
From: Alexander Graf @ 2009-12-07 12:54 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, lcapitulino
On 07.12.2009, at 13:42, Gerd Hoffmann wrote:
> Qemu creates a default serial line for you in case you didn't specify
> one on the command line. Right now this is tied to the '-serial
> <chardev>' command line switch, which in turn causes trouble if you are
> creating your serial line via '-device isa-serial,<props>'.
>
> This patch adds a variable default_serial which says whenever a default
> serial line should be added. It is enabled by default. It is cleared
> when qemu finds '-serial' or '-device isa-serial' on the command line.
>
> Part of the patch is some infrastructure for the '-device $driver'
> checking (default_driver_check function) which will also be used by the
> other patches of this series.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> vl.c | 122 +++++++++++++++++++++++++++++++++++++++++++----------------------
> 1 files changed, 81 insertions(+), 41 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 24d5d92..eca4eee 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -271,6 +271,30 @@ uint8_t qemu_uuid[16];
> static QEMUBootSetHandler *boot_set_handler;
> static void *boot_set_opaque;
>
> +static int default_serial = 1;
> +
> +static struct {
> + const char *driver;
> + int *flag;
> +} default_list[] = {
> + { .driver = "isa-serial", .flag = &default_serial },
What is the "isa-serial" driver supposed to say here? Is that the qdev driver name? If so, that's just plain wrong. PPC for example uses the ESCC chip to export its serial port.
Alex
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 20/21] default devices: virtio consoles.
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 20/21] default devices: virtio consoles Gerd Hoffmann
@ 2009-12-07 13:07 ` Alexander Graf
2009-12-07 13:34 ` Gerd Hoffmann
0 siblings, 1 reply; 39+ messages in thread
From: Alexander Graf @ 2009-12-07 13:07 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, lcapitulino
On 07.12.2009, at 13:42, Gerd Hoffmann wrote:
> This patch adds a variable default_virtcon which says whenever a default
> virtio console should be added. It is disabled by default, followup
> patch will enable it for s390. It is cleared when qemu finds
> '-virtiocon', '-device virtio-console-s390' or '-device
> virtio-console-pci' on the command line.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> vl.c | 64 ++++++++++++++++++++++++++++++++++------------------------------
> 1 files changed, 34 insertions(+), 30 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 9949886..298ac73 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -270,6 +270,7 @@ static void *boot_set_opaque;
>
> static int default_serial = 1;
> static int default_parallel = 1;
> +static int default_virtcon = 1;
> static int default_monitor = 1;
> static int default_vga = 1;
> static int default_drive = 1;
> @@ -280,6 +281,8 @@ static struct {
> } default_list[] = {
> { .driver = "isa-serial", .flag = &default_serial },
> { .driver = "isa-parallel", .flag = &default_parallel },
> + { .driver = "virtio-console-pci", .flag = &default_virtcon },
> + { .driver = "virtio-console-s390", .flag = &default_virtcon },
Hm, what does this do? Create both virtio-console-pci and virtio-console-s390 when default_virtcon=1?
Then I'm pretty sure this will break when (if) we ever get PCI support on S390.
Defaults really belong in the machine definition.
Alex
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 12:52 ` [Qemu-devel] " Alexander Graf
@ 2009-12-07 13:27 ` Gerd Hoffmann
2009-12-07 14:07 ` Alexander Graf
0 siblings, 1 reply; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 13:27 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel, lcapitulino
On 12/07/09 13:52, Alexander Graf wrote:
>> diff --git a/vl.c b/vl.c index 24d5d92..eca4eee 100644 --- a/vl.c
>> +++ b/vl.c @@ -271,6 +271,30 @@ uint8_t qemu_uuid[16]; static
>> QEMUBootSetHandler *boot_set_handler; static void
>> *boot_set_opaque;
>>
>> +static int default_serial = 1;
>
> Default variables belong in the machine description IMHO. On S390, we
> can't create serial, parallel or vga (or any MMIO/PIO requiring)
> devices.
See last patch of this series. Moving that into the machine description
is certainly worth looking at. For now I'm happy that the #ifdef S390
code for the default virtio console is down to just two lines.
cheers
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 12:54 ` Alexander Graf
@ 2009-12-07 13:30 ` Gerd Hoffmann
0 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 13:30 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel, lcapitulino
On 12/07/09 13:54, Alexander Graf wrote:
>
> On 07.12.2009, at 13:42, Gerd Hoffmann wrote:
>
>> Qemu creates a default serial line for you in case you didn't specify
>> one on the command line. Right now this is tied to the '-serial
>> <chardev>' command line switch, which in turn causes trouble if you are
>> creating your serial line via '-device isa-serial,<props>'.
>> +static int default_serial = 1;
>> +
>> +static struct {
>> + const char *driver;
>> + int *flag;
>> +} default_list[] = {
>> + { .driver = "isa-serial", .flag =&default_serial },
>
> What is the "isa-serial" driver supposed to say here?
Yes.
> Is that the qdev driver name? If so, that's just plain wrong. PPC for example uses the ESCC chip to export its serial port.
Just add the driver name to the list then, so '-device ESCC,...' (or
however it is named in qdev) will stop conflicting with the
automagically created -serial port too.
cheers,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 20/21] default devices: virtio consoles.
2009-12-07 13:07 ` [Qemu-devel] " Alexander Graf
@ 2009-12-07 13:34 ` Gerd Hoffmann
0 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 13:34 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel, lcapitulino
On 12/07/09 14:07, Alexander Graf wrote:
>> +static int default_virtcon = 1;
> Hm, what does this do? Create both virtio-console-pci and virtio-console-s390 when default_virtcon=1?
No. Make qemu *not* create a default virtio console in case one was
added via '-device virtio-console-pci'.
cheers,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 13:27 ` Gerd Hoffmann
@ 2009-12-07 14:07 ` Alexander Graf
2009-12-07 14:39 ` Gerd Hoffmann
0 siblings, 1 reply; 39+ messages in thread
From: Alexander Graf @ 2009-12-07 14:07 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, lcapitulino
On 07.12.2009, at 14:27, Gerd Hoffmann wrote:
> On 12/07/09 13:52, Alexander Graf wrote:
>>> diff --git a/vl.c b/vl.c index 24d5d92..eca4eee 100644 --- a/vl.c
>>> +++ b/vl.c @@ -271,6 +271,30 @@ uint8_t qemu_uuid[16]; static
>>> QEMUBootSetHandler *boot_set_handler; static void
>>> *boot_set_opaque;
>>>
>>> +static int default_serial = 1;
>>
>> Default variables belong in the machine description IMHO. On S390, we
>> can't create serial, parallel or vga (or any MMIO/PIO requiring)
>> devices.
>
> See last patch of this series. Moving that into the machine description is certainly worth looking at. For now I'm happy that the #ifdef S390 code for the default virtio console is down to just two lines.
Would it be that hard to move the list of default devices to the machine description? You could probably still keep the default_xxx variables in vl.c, but access them from e.g. pc.c.
Alex
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 14:07 ` Alexander Graf
@ 2009-12-07 14:39 ` Gerd Hoffmann
2009-12-07 15:12 ` Alexander Graf
0 siblings, 1 reply; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 14:39 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel, lcapitulino
On 12/07/09 15:07, Alexander Graf wrote:
>
> On 07.12.2009, at 14:27, Gerd Hoffmann wrote:
>
>>> Default variables belong in the machine description IMHO. On
>>> S390, we can't create serial, parallel or vga (or any MMIO/PIO
>>> requiring) devices.
>>
>> See last patch of this series. Moving that into the machine
>> description is certainly worth looking at. For now I'm happy that
>> the #ifdef S390 code for the default virtio console is down to just
>> two lines.
>
> Would it be that hard to move the list of default devices to the
> machine description? You could probably still keep the default_xxx
> variables in vl.c, but access them from e.g. pc.c.
Hmm? access from pc.c? What exactly do you have in mind?
I think we could add flags to QEMUMachine to disable default devices not
supported anyway, i.e. add no_parallel variable, then in vl.c do
if (machine->no_parallel)
default_parallel = 0;
So qemu would stop creating a useless parallel0 chardev which isn't used
because the machine in question can't support parallel ports anyway.
cheers,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts Gerd Hoffmann
@ 2009-12-07 14:59 ` Luiz Capitulino
2009-12-07 15:18 ` Gerd Hoffmann
2009-12-07 19:11 ` [Qemu-devel] " Anthony Liguori
1 sibling, 1 reply; 39+ messages in thread
From: Luiz Capitulino @ 2009-12-07 14:59 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, agraf
On Mon, 7 Dec 2009 13:42:49 +0100
Gerd Hoffmann <kraxel@redhat.com> wrote:
> +static int mon_init_func(QemuOpts *opts, void *opaque)
> +{
> + CharDriverState *chr;
> + const char *chardev;
> + const char *mode;
> + int flags;
> +
> + qemu_opts_print(opts, NULL);
> +
> + mode = qemu_opt_get(opts, "mode");
> + if (mode == NULL) {
> + mode = "readline";
> + }
> + if (strcmp(mode, "readline") == 0) {
> + flags = MONITOR_USE_READLINE;
> + } else if (strcmp(mode, "control") == 0) {
> + flags = MONITOR_USE_CONTROL;
> + } else {
> + fprintf(stderr, "unknown monitor mode \"%s\"\n", mode);
> + exit(1);
> + }
> +
> + if (qemu_opt_get_bool(opts, "default", 0))
> + flags |= MONITOR_IS_DEFAULT;
> +
> + chardev = qemu_opt_get(opts, "chardev");
> + chr = qemu_chr_find(chardev);
> + if (chardev == NULL) {
> + fprintf(stderr, "chardev \"%s\" not found\n", chardev);
> + exit(1);
> + }
We should check for NULL before calling qemu_chr_find().
Also, I'm getting a segfault when running QEMU w/o any monitor cmd-line,
like:
$ qemu -hda disks/fedora-11-kratos-i386.img -m 1G
The reason for the segfault is that the chardev 'monitor' is not found,
so qemu_chr_find() returns NULL, passing it down to:
> +
> + monitor_init(chr, flags);
> + return 0;
> +}
> +
Apart from that, monitor changes seem ok to me.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 14:39 ` Gerd Hoffmann
@ 2009-12-07 15:12 ` Alexander Graf
2009-12-07 16:05 ` Gerd Hoffmann
0 siblings, 1 reply; 39+ messages in thread
From: Alexander Graf @ 2009-12-07 15:12 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, lcapitulino
On 07.12.2009, at 15:39, Gerd Hoffmann wrote:
> On 12/07/09 15:07, Alexander Graf wrote:
>>
>> On 07.12.2009, at 14:27, Gerd Hoffmann wrote:
>>
>>>> Default variables belong in the machine description IMHO. On
>>>> S390, we can't create serial, parallel or vga (or any MMIO/PIO
>>>> requiring) devices.
>>>
>>> See last patch of this series. Moving that into the machine
>>> description is certainly worth looking at. For now I'm happy that
>>> the #ifdef S390 code for the default virtio console is down to just
>>> two lines.
>>
>> Would it be that hard to move the list of default devices to the
>> machine description? You could probably still keep the default_xxx
>> variables in vl.c, but access them from e.g. pc.c.
>
>
> Hmm? access from pc.c? What exactly do you have in mind?
>
>
> I think we could add flags to QEMUMachine to disable default devices not supported anyway, i.e. add no_parallel variable, then in vl.c do
>
> if (machine->no_parallel)
> default_parallel = 0;
>
> So qemu would stop creating a useless parallel0 chardev which isn't used because the machine in question can't support parallel ports anyway.
Well I was basically thinking of moving default_list inside the machine description. That way you can easily choose what default devices there are available.
Then make default_serial and friends visible to pc.c and just put the same code you have now in there. For other machines the default device list surely looks different.
Alex
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts
2009-12-07 14:59 ` [Qemu-devel] " Luiz Capitulino
@ 2009-12-07 15:18 ` Gerd Hoffmann
0 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 15:18 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: qemu-devel, agraf
On 12/07/09 15:59, Luiz Capitulino wrote:
>> + chardev = qemu_opt_get(opts, "chardev");
>> + chr = qemu_chr_find(chardev);
>> + if (chardev == NULL) {
>> + fprintf(stderr, "chardev \"%s\" not found\n", chardev);
>> + exit(1);
>> + }
>
> We should check for NULL before calling qemu_chr_find().
No. qemu_chr_find() can deal with NULL just fine. We should check the
return value (chr) instead though. When fixing that it prints the error
message and exits as it should. Well, almost, because ...
> The reason for the segfault is that the chardev 'monitor' is not found,
> so qemu_chr_find() returns NULL, passing it down to:
... 'monitor' should be there, there is a default for the monitor
device. Hmm, checking why ...
cheers,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 15:12 ` Alexander Graf
@ 2009-12-07 16:05 ` Gerd Hoffmann
2009-12-07 16:10 ` Alexander Graf
0 siblings, 1 reply; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 16:05 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel, lcapitulino
On 12/07/09 16:12, Alexander Graf wrote:
> Well I was basically thinking of moving default_list inside the
> machine description. That way you can easily choose what default
> devices there are available.
Doesn't make sense. The list is not about *creating* default devices,
but about *not* creating them.
> Then make default_serial and friends visible to pc.c and just put the
> same code you have now in there. For other machines the default
> device list surely looks different.
ppc, sparc and x86 serial devices can happily live together in this list
without causing any harm.
cheers,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 16:05 ` Gerd Hoffmann
@ 2009-12-07 16:10 ` Alexander Graf
2009-12-08 9:23 ` Gerd Hoffmann
0 siblings, 1 reply; 39+ messages in thread
From: Alexander Graf @ 2009-12-07 16:10 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel, lcapitulino
On 07.12.2009, at 17:05, Gerd Hoffmann wrote:
> On 12/07/09 16:12, Alexander Graf wrote:
>> Well I was basically thinking of moving default_list inside the
>> machine description. That way you can easily choose what default
>> devices there are available.
>
> Doesn't make sense. The list is not about *creating* default devices, but about *not* creating them.
Why do we need a negative list? Wouldn't it be a lot more useful to have positive lists? Maybe I'm just missing the whole point of your patchset though.
Alex
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Qemu-devel] [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts Gerd Hoffmann
2009-12-07 14:59 ` [Qemu-devel] " Luiz Capitulino
@ 2009-12-07 19:11 ` Anthony Liguori
1 sibling, 0 replies; 39+ messages in thread
From: Anthony Liguori @ 2009-12-07 19:11 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: lcapitulino, qemu-devel, agraf
Gerd Hoffmann wrote:
> This patch reworks the -monitor handling:
>
> - It adds a new "mon" QemuOpts list for the monitor(s).
> - It adds a monitor_parse() function to parse the -monitor switch.
> - It adds a mon_init function to initialize the monitor(s) from the
> "mon" QemuOpts list.
> - It winds up everything and removes the old bits.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>
This SEGVs as Luiz has reported, but it also has some debugging noise in it:
> +static int mon_init_func(QemuOpts *opts, void *opaque)
> +{
> + CharDriverState *chr;
> + const char *chardev;
> + const char *mode;
> + int flags;
> +
> + qemu_opts_print(opts, NULL);
>
Right here.
> + mode = qemu_opt_get(opts, "mode");
> + if (mode == NULL) {
> + mode = "readline";
> + }
> + if (strcmp(mode, "readline") == 0) {
> + flags = MONITOR_USE_READLINE;
> + } else if (strcmp(mode, "control") == 0) {
> + flags = MONITOR_USE_CONTROL;
> + } else {
> + fprintf(stderr, "unknown monitor mode \"%s\"\n", mode);
> + exit(1);
> + }
> +
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines.
2009-12-07 16:10 ` Alexander Graf
@ 2009-12-08 9:23 ` Gerd Hoffmann
0 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-08 9:23 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel, lcapitulino
Hi,
>> Doesn't make sense. The list is not about *creating* default devices, but about *not* creating them.
>
> Why do we need a negative list? Wouldn't it be a lot more useful to have positive lists? Maybe I'm just missing the whole point of your patchset though.
Probably the latter ;)
The situation we have right is (with the serial lines as example, the
same applies to some other devices as well):
(1) If you start qemu without any arguments, it will automagically
create a chardev for the serial line (serial_hds[]), which then
will be used by machine->init() to create the (board-specific)
serial lines.
(2) If you start qemu with -serial <something> the specified chardev
will be created and assigned to serial_hds[], which again will be
used by machine->init() ...
Worked fine before qdev appeared. Now we also can create serial lines
like this:
(3) Start qemu with '-device isa-serial,...'.
Problem is this clashes with (1) and qemu will attempt to create the
serial port twice. So this patchset introduces default_serial
(+friends) to fix this issue. The new workflow is:
* default_serial defaults to enabled, when qemu finds it still enabled
after processing all command line the automagic default serial line
is actually created.
* If qemu finds '-serial <something>' it clears default_serial.
* If qemu finds '-device isa-serial,...' it clears default_serial.
- this fixes the conflict mentioned above.
- other serial drivers can be added to the list if needed to solve
the same conflict for them.
* If qemu finds '-nodefaults' it clears default_serial (and the
others).
- new feature, figured this could be useful.
What we could do on top of the above is:
* If the board has the machine->no_serial flag set, clear
default_serial.
s390 could set that flag then and qemu would stop creating a chardev for
a serial line nobody will ever use because s390 has no serial ports.
/me hopes the whole picture is more clear now.
cheers,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
* [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Gerd Hoffmann
@ 2009-12-08 12:46 ` Paolo Bonzini
2009-12-08 15:58 ` Gerd Hoffmann
0 siblings, 1 reply; 39+ messages in thread
From: Paolo Bonzini @ 2009-12-08 12:46 UTC (permalink / raw)
To: qemu-devel
On 12/07/2009 01:42 PM, Gerd Hoffmann wrote:
> Add global command line option to disable default devices.
Should -readconfig imply this?
Paolo
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
2009-12-08 12:46 ` [Qemu-devel] " Paolo Bonzini
@ 2009-12-08 15:58 ` Gerd Hoffmann
0 siblings, 0 replies; 39+ messages in thread
From: Gerd Hoffmann @ 2009-12-08 15:58 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On 12/08/09 13:46, Paolo Bonzini wrote:
> On 12/07/2009 01:42 PM, Gerd Hoffmann wrote:
>> Add global command line option to disable default devices.
>
> Should -readconfig imply this?
Hmm, not sure. Why do you think this would be useful?
cheers,
Gerd
^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2009-12-08 15:59 UTC | newest]
Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 01/21] Revert "monitor: Command-line flag to enable control mode" Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 02/21] Revert "Set default console to virtio on S390x" Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 03/21] chardev: move greeting into vc backend Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 04/21] vc: colorize chardev title line with blue background Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines Gerd Hoffmann
2009-12-07 12:52 ` [Qemu-devel] " Alexander Graf
2009-12-07 13:27 ` Gerd Hoffmann
2009-12-07 14:07 ` Alexander Graf
2009-12-07 14:39 ` Gerd Hoffmann
2009-12-07 15:12 ` Alexander Graf
2009-12-07 16:05 ` Gerd Hoffmann
2009-12-07 16:10 ` Alexander Graf
2009-12-08 9:23 ` Gerd Hoffmann
2009-12-07 12:54 ` Alexander Graf
2009-12-07 13:30 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 06/21] default devices: parallel port Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 07/21] default devices: qemu monitor Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 08/21] zap serial_monitor_mux Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 09/21] default devices: vga adapter Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Gerd Hoffmann
2009-12-08 12:46 ` [Qemu-devel] " Paolo Bonzini
2009-12-08 15:58 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 11/21] default devices: network Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 12/21] default devices: drives Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 13/21] qdev: make compat stuff more generic Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 14/21] qdev: add command line option to set global defaults for properties Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 15/21] chardev: make chardevs specified in config file work Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 16/21] un-static qemu_chr_parse_compat() Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 17/21] rework -monitor handling, switch to QemuOpts Gerd Hoffmann
2009-12-07 14:59 ` [Qemu-devel] " Luiz Capitulino
2009-12-07 15:18 ` Gerd Hoffmann
2009-12-07 19:11 ` [Qemu-devel] " Anthony Liguori
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 18/21] add new -mon switch Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 19/21] add -qmp convinience switch Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 20/21] default devices: virtio consoles Gerd Hoffmann
2009-12-07 13:07 ` [Qemu-devel] " Alexander Graf
2009-12-07 13:34 ` Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 21/21] Set default console to virtio on S390x Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).