qemu-options: Remove deprecated "-virtioconsole" option

It's been deprecated since QEMU 3.0, and nobody complained so far, so
it is time to remove this option now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1544684731-18828-1-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2019-02-02 11:45:32 +01:00
parent 292fa230cb
commit 9fd7e96aab
5 changed files with 1 additions and 80 deletions

View File

@ -190,10 +190,6 @@ The appropriate DEVNAME depends on the machine type. For type "pc":
-device usb-braille,chardev=braille -chardev braille,id=braille -device usb-braille,chardev=braille -chardev braille,id=braille
* -virtioconsole becomes
-device virtio-serial-pci,class=C,vectors=V,ioeventfd=IOEVENTFD,max_ports=N
-device virtconsole,is_console=NUM,nr=NR,name=NAME
LEGACY-CHARDEV translates to -chardev HOST-OPTS... as follows: LEGACY-CHARDEV translates to -chardev HOST-OPTS... as follows:
* null becomes -chardev null * null becomes -chardev null

View File

@ -180,7 +180,6 @@ struct MachineClass {
int default_cpus; int default_cpus;
unsigned int no_serial:1, unsigned int no_serial:1,
no_parallel:1, no_parallel:1,
use_virtcon:1,
no_floppy:1, no_floppy:1,
no_cdrom:1, no_cdrom:1,
no_sdcard:1, no_sdcard:1,

View File

@ -43,11 +43,6 @@ The @code{--no-frame} argument works with SDL 1.2 only. The other user
interfaces never implemented this in the first place. So this will be interfaces never implemented this in the first place. So this will be
removed together with SDL 1.2 support. removed together with SDL 1.2 support.
@subsection -virtioconsole (since 3.0.0)
Option @option{-virtioconsole} has been replaced by
@option{-device virtconsole}.
@subsection -clock (since 3.0.0) @subsection -clock (since 3.0.0)
The @code{-clock} option is ignored since QEMU version 1.7.0. There is no The @code{-clock} option is ignored since QEMU version 1.7.0. There is no

View File

@ -3616,16 +3616,6 @@ character to Control-t.
@end table @end table
ETEXI ETEXI
DEF("virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon, \
"-virtioconsole c\n" \
" set virtio console\n", QEMU_ARCH_ALL)
STEXI
@item -virtioconsole @var{c}
@findex -virtioconsole
Set virtio console.
This option is deprecated, please use @option{-device virtconsole} instead.
ETEXI
DEF("show-cursor", 0, QEMU_OPTION_show_cursor, \ DEF("show-cursor", 0, QEMU_OPTION_show_cursor, \
"-show-cursor show cursor\n", QEMU_ARCH_ALL) "-show-cursor show cursor\n", QEMU_ARCH_ALL)
STEXI STEXI

61
vl.c
View File

@ -164,7 +164,6 @@ int no_frame;
static int num_serial_hds; static int num_serial_hds;
static Chardev **serial_hds; static Chardev **serial_hds;
Chardev *parallel_hds[MAX_PARALLEL_PORTS]; Chardev *parallel_hds[MAX_PARALLEL_PORTS];
Chardev *virtcon_hds[MAX_VIRTIO_CONSOLES];
int win2k_install_hack = 0; int win2k_install_hack = 0;
int singlestep = 0; int singlestep = 0;
int smp_cpus; int smp_cpus;
@ -215,7 +214,6 @@ bool xen_domid_restrict;
static int has_defaults = 1; static int has_defaults = 1;
static int default_serial = 1; static int default_serial = 1;
static int default_parallel = 1; static int default_parallel = 1;
static int default_virtcon = 1;
static int default_monitor = 1; static int default_monitor = 1;
static int default_floppy = 1; static int default_floppy = 1;
static int default_cdrom = 1; static int default_cdrom = 1;
@ -236,8 +234,6 @@ static struct {
{ .driver = "ide-drive", .flag = &default_cdrom }, { .driver = "ide-drive", .flag = &default_cdrom },
{ .driver = "scsi-cd", .flag = &default_cdrom }, { .driver = "scsi-cd", .flag = &default_cdrom },
{ .driver = "scsi-hd", .flag = &default_cdrom }, { .driver = "scsi-hd", .flag = &default_cdrom },
{ .driver = "virtio-serial-pci", .flag = &default_virtcon },
{ .driver = "virtio-serial", .flag = &default_virtcon },
{ .driver = "VGA", .flag = &default_vga }, { .driver = "VGA", .flag = &default_vga },
{ .driver = "isa-vga", .flag = &default_vga }, { .driver = "isa-vga", .flag = &default_vga },
{ .driver = "cirrus-vga", .flag = &default_vga }, { .driver = "cirrus-vga", .flag = &default_vga },
@ -2405,7 +2401,6 @@ struct device_config {
DEV_BT, /* -bt */ DEV_BT, /* -bt */
DEV_SERIAL, /* -serial */ DEV_SERIAL, /* -serial */
DEV_PARALLEL, /* -parallel */ DEV_PARALLEL, /* -parallel */
DEV_VIRTCON, /* -virtioconsole */
DEV_DEBUGCON, /* -debugcon */ DEV_DEBUGCON, /* -debugcon */
DEV_GDB, /* -gdb, -s */ DEV_GDB, /* -gdb, -s */
DEV_SCLP, /* s390 sclp */ DEV_SCLP, /* s390 sclp */
@ -2503,39 +2498,6 @@ static int parallel_parse(const char *devname)
return 0; return 0;
} }
static int virtcon_parse(const char *devname)
{
QemuOptsList *device = qemu_find_opts("device");
static int index = 0;
char label[32];
QemuOpts *bus_opts, *dev_opts;
if (strcmp(devname, "none") == 0)
return 0;
if (index == MAX_VIRTIO_CONSOLES) {
error_report("too many virtio consoles");
exit(1);
}
bus_opts = qemu_opts_create(device, NULL, 0, &error_abort);
qemu_opt_set(bus_opts, "driver", "virtio-serial", &error_abort);
dev_opts = qemu_opts_create(device, NULL, 0, &error_abort);
qemu_opt_set(dev_opts, "driver", "virtconsole", &error_abort);
snprintf(label, sizeof(label), "virtcon%d", index);
virtcon_hds[index] = qemu_chr_new_mux_mon(label, devname);
if (!virtcon_hds[index]) {
error_report("could not connect virtio console"
" to character backend '%s'", devname);
return -1;
}
qemu_opt_set(dev_opts, "chardev", label, &error_abort);
index++;
return 0;
}
static int debugcon_parse(const char *devname) static int debugcon_parse(const char *devname)
{ {
QemuOpts *opts; QemuOpts *opts;
@ -3570,15 +3532,6 @@ int main(int argc, char **argv, char **envp)
exit(1); exit(1);
} }
break; break;
case QEMU_OPTION_virtiocon:
warn_report("This option is deprecated, "
"use '-device virtconsole' instead");
add_device_config(DEV_VIRTCON, optarg);
default_virtcon = 0;
if (strncmp(optarg, "mon:", 4) == 0) {
default_monitor = 0;
}
break;
case QEMU_OPTION_parallel: case QEMU_OPTION_parallel:
add_device_config(DEV_PARALLEL, optarg); add_device_config(DEV_PARALLEL, optarg);
default_parallel = 0; default_parallel = 0;
@ -4183,9 +4136,6 @@ int main(int argc, char **argv, char **envp)
if (!has_defaults || machine_class->no_parallel) { if (!has_defaults || machine_class->no_parallel) {
default_parallel = 0; default_parallel = 0;
} }
if (!has_defaults || !machine_class->use_virtcon) {
default_virtcon = 0;
}
if (!has_defaults || machine_class->no_floppy) { if (!has_defaults || machine_class->no_floppy) {
default_floppy = 0; default_floppy = 0;
} }
@ -4218,8 +4168,7 @@ int main(int argc, char **argv, char **envp)
* usage, -nographic is just a no-op in this case. * usage, -nographic is just a no-op in this case.
*/ */
if (nographic if (nographic
&& (default_parallel || default_serial && (default_parallel || default_serial || default_monitor)) {
|| default_monitor || default_virtcon)) {
error_report("-nographic cannot be used with -daemonize"); error_report("-nographic cannot be used with -daemonize");
exit(1); exit(1);
} }
@ -4236,13 +4185,9 @@ int main(int argc, char **argv, char **envp)
add_device_config(DEV_PARALLEL, "null"); add_device_config(DEV_PARALLEL, "null");
if (default_serial && default_monitor) { if (default_serial && default_monitor) {
add_device_config(DEV_SERIAL, "mon:stdio"); add_device_config(DEV_SERIAL, "mon:stdio");
} else if (default_virtcon && default_monitor) {
add_device_config(DEV_VIRTCON, "mon:stdio");
} else { } else {
if (default_serial) if (default_serial)
add_device_config(DEV_SERIAL, "stdio"); add_device_config(DEV_SERIAL, "stdio");
if (default_virtcon)
add_device_config(DEV_VIRTCON, "stdio");
if (default_monitor) if (default_monitor)
monitor_parse("stdio", "readline", false); monitor_parse("stdio", "readline", false);
} }
@ -4253,8 +4198,6 @@ int main(int argc, char **argv, char **envp)
add_device_config(DEV_PARALLEL, "vc:80Cx24C"); add_device_config(DEV_PARALLEL, "vc:80Cx24C");
if (default_monitor) if (default_monitor)
monitor_parse("vc:80Cx24C", "readline", false); monitor_parse("vc:80Cx24C", "readline", false);
if (default_virtcon)
add_device_config(DEV_VIRTCON, "vc:80Cx24C");
} }
#if defined(CONFIG_VNC) #if defined(CONFIG_VNC)
@ -4485,8 +4428,6 @@ int main(int argc, char **argv, char **envp)
exit(1); exit(1);
if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0) if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
exit(1); exit(1);
if (foreach_device_config(DEV_VIRTCON, virtcon_parse) < 0)
exit(1);
if (foreach_device_config(DEV_DEBUGCON, debugcon_parse) < 0) if (foreach_device_config(DEV_DEBUGCON, debugcon_parse) < 0)
exit(1); exit(1);