qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

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>

+1 -80
-4
docs/qdev-device-use.txt
··· 190 190 191 191 -device usb-braille,chardev=braille -chardev braille,id=braille 192 192 193 - * -virtioconsole becomes 194 - -device virtio-serial-pci,class=C,vectors=V,ioeventfd=IOEVENTFD,max_ports=N 195 - -device virtconsole,is_console=NUM,nr=NR,name=NAME 196 - 197 193 LEGACY-CHARDEV translates to -chardev HOST-OPTS... as follows: 198 194 199 195 * null becomes -chardev null
-1
include/hw/boards.h
··· 180 180 int default_cpus; 181 181 unsigned int no_serial:1, 182 182 no_parallel:1, 183 - use_virtcon:1, 184 183 no_floppy:1, 185 184 no_cdrom:1, 186 185 no_sdcard:1,
-5
qemu-deprecated.texi
··· 43 43 interfaces never implemented this in the first place. So this will be 44 44 removed together with SDL 1.2 support. 45 45 46 - @subsection -virtioconsole (since 3.0.0) 47 - 48 - Option @option{-virtioconsole} has been replaced by 49 - @option{-device virtconsole}. 50 - 51 46 @subsection -clock (since 3.0.0) 52 47 53 48 The @code{-clock} option is ignored since QEMU version 1.7.0. There is no
-10
qemu-options.hx
··· 3616 3616 @end table 3617 3617 ETEXI 3618 3618 3619 - DEF("virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon, \ 3620 - "-virtioconsole c\n" \ 3621 - " set virtio console\n", QEMU_ARCH_ALL) 3622 - STEXI 3623 - @item -virtioconsole @var{c} 3624 - @findex -virtioconsole 3625 - Set virtio console. 3626 - This option is deprecated, please use @option{-device virtconsole} instead. 3627 - ETEXI 3628 - 3629 3619 DEF("show-cursor", 0, QEMU_OPTION_show_cursor, \ 3630 3620 "-show-cursor show cursor\n", QEMU_ARCH_ALL) 3631 3621 STEXI
+1 -60
vl.c
··· 164 164 static int num_serial_hds; 165 165 static Chardev **serial_hds; 166 166 Chardev *parallel_hds[MAX_PARALLEL_PORTS]; 167 - Chardev *virtcon_hds[MAX_VIRTIO_CONSOLES]; 168 167 int win2k_install_hack = 0; 169 168 int singlestep = 0; 170 169 int smp_cpus; ··· 215 214 static int has_defaults = 1; 216 215 static int default_serial = 1; 217 216 static int default_parallel = 1; 218 - static int default_virtcon = 1; 219 217 static int default_monitor = 1; 220 218 static int default_floppy = 1; 221 219 static int default_cdrom = 1; ··· 236 234 { .driver = "ide-drive", .flag = &default_cdrom }, 237 235 { .driver = "scsi-cd", .flag = &default_cdrom }, 238 236 { .driver = "scsi-hd", .flag = &default_cdrom }, 239 - { .driver = "virtio-serial-pci", .flag = &default_virtcon }, 240 - { .driver = "virtio-serial", .flag = &default_virtcon }, 241 237 { .driver = "VGA", .flag = &default_vga }, 242 238 { .driver = "isa-vga", .flag = &default_vga }, 243 239 { .driver = "cirrus-vga", .flag = &default_vga }, ··· 2405 2401 DEV_BT, /* -bt */ 2406 2402 DEV_SERIAL, /* -serial */ 2407 2403 DEV_PARALLEL, /* -parallel */ 2408 - DEV_VIRTCON, /* -virtioconsole */ 2409 2404 DEV_DEBUGCON, /* -debugcon */ 2410 2405 DEV_GDB, /* -gdb, -s */ 2411 2406 DEV_SCLP, /* s390 sclp */ ··· 2503 2498 return 0; 2504 2499 } 2505 2500 2506 - static int virtcon_parse(const char *devname) 2507 - { 2508 - QemuOptsList *device = qemu_find_opts("device"); 2509 - static int index = 0; 2510 - char label[32]; 2511 - QemuOpts *bus_opts, *dev_opts; 2512 - 2513 - if (strcmp(devname, "none") == 0) 2514 - return 0; 2515 - if (index == MAX_VIRTIO_CONSOLES) { 2516 - error_report("too many virtio consoles"); 2517 - exit(1); 2518 - } 2519 - 2520 - bus_opts = qemu_opts_create(device, NULL, 0, &error_abort); 2521 - qemu_opt_set(bus_opts, "driver", "virtio-serial", &error_abort); 2522 - 2523 - dev_opts = qemu_opts_create(device, NULL, 0, &error_abort); 2524 - qemu_opt_set(dev_opts, "driver", "virtconsole", &error_abort); 2525 - 2526 - snprintf(label, sizeof(label), "virtcon%d", index); 2527 - virtcon_hds[index] = qemu_chr_new_mux_mon(label, devname); 2528 - if (!virtcon_hds[index]) { 2529 - error_report("could not connect virtio console" 2530 - " to character backend '%s'", devname); 2531 - return -1; 2532 - } 2533 - qemu_opt_set(dev_opts, "chardev", label, &error_abort); 2534 - 2535 - index++; 2536 - return 0; 2537 - } 2538 - 2539 2501 static int debugcon_parse(const char *devname) 2540 2502 { 2541 2503 QemuOpts *opts; ··· 3570 3532 exit(1); 3571 3533 } 3572 3534 break; 3573 - case QEMU_OPTION_virtiocon: 3574 - warn_report("This option is deprecated, " 3575 - "use '-device virtconsole' instead"); 3576 - add_device_config(DEV_VIRTCON, optarg); 3577 - default_virtcon = 0; 3578 - if (strncmp(optarg, "mon:", 4) == 0) { 3579 - default_monitor = 0; 3580 - } 3581 - break; 3582 3535 case QEMU_OPTION_parallel: 3583 3536 add_device_config(DEV_PARALLEL, optarg); 3584 3537 default_parallel = 0; ··· 4183 4136 if (!has_defaults || machine_class->no_parallel) { 4184 4137 default_parallel = 0; 4185 4138 } 4186 - if (!has_defaults || !machine_class->use_virtcon) { 4187 - default_virtcon = 0; 4188 - } 4189 4139 if (!has_defaults || machine_class->no_floppy) { 4190 4140 default_floppy = 0; 4191 4141 } ··· 4218 4168 * usage, -nographic is just a no-op in this case. 4219 4169 */ 4220 4170 if (nographic 4221 - && (default_parallel || default_serial 4222 - || default_monitor || default_virtcon)) { 4171 + && (default_parallel || default_serial || default_monitor)) { 4223 4172 error_report("-nographic cannot be used with -daemonize"); 4224 4173 exit(1); 4225 4174 } ··· 4236 4185 add_device_config(DEV_PARALLEL, "null"); 4237 4186 if (default_serial && default_monitor) { 4238 4187 add_device_config(DEV_SERIAL, "mon:stdio"); 4239 - } else if (default_virtcon && default_monitor) { 4240 - add_device_config(DEV_VIRTCON, "mon:stdio"); 4241 4188 } else { 4242 4189 if (default_serial) 4243 4190 add_device_config(DEV_SERIAL, "stdio"); 4244 - if (default_virtcon) 4245 - add_device_config(DEV_VIRTCON, "stdio"); 4246 4191 if (default_monitor) 4247 4192 monitor_parse("stdio", "readline", false); 4248 4193 } ··· 4253 4198 add_device_config(DEV_PARALLEL, "vc:80Cx24C"); 4254 4199 if (default_monitor) 4255 4200 monitor_parse("vc:80Cx24C", "readline", false); 4256 - if (default_virtcon) 4257 - add_device_config(DEV_VIRTCON, "vc:80Cx24C"); 4258 4201 } 4259 4202 4260 4203 #if defined(CONFIG_VNC) ··· 4484 4427 if (foreach_device_config(DEV_SERIAL, serial_parse) < 0) 4485 4428 exit(1); 4486 4429 if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0) 4487 - exit(1); 4488 - if (foreach_device_config(DEV_VIRTCON, virtcon_parse) < 0) 4489 4430 exit(1); 4490 4431 if (foreach_device_config(DEV_DEBUGCON, debugcon_parse) < 0) 4491 4432 exit(1);