[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V1 12/32] vl: pause option
From: |
Eric Blake |
Subject: |
Re: [PATCH V1 12/32] vl: pause option |
Date: |
Thu, 30 Jul 2020 11:20:58 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 7/30/20 10:14 AM, Steve Sistare wrote:
Provide the -pause command-line parameter and the QEMU_PAUSE environment
variable to briefly pause QEMU in main and allow a developer to attach gdb.
Useful when the developer does not invoke QEMU directly, such as when using
libvirt.
How would you set this option with libvirt?
It feels like you are trying to reinvent something that is already
well-documented:
https://www.berrange.com/posts/2011/10/12/debugging-early-startup-of-kvm-with-gdb-when-launched-by-libvirtd/
Usage:
qemu -pause <seconds>
or
export QEMU_PAUSE=<seconds>
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
qemu-options.hx | 9 +++++++++
softmmu/vl.c | 15 ++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
@@ -3204,6 +3211,12 @@ void qemu_init(int argc, char **argv, char **envp)
case QEMU_OPTION_gdb:
add_device_config(DEV_GDB, optarg);
break;
+ case QEMU_OPTION_pause:
+ seconds = atoi(optarg);
atoi() cannot detect overflow. You should never use it in robust
parsing of untrusted input.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- [PATCH V1 04/32] savevm: HMP Command for cprsave, (continued)
- [PATCH V1 04/32] savevm: HMP Command for cprsave, Steve Sistare, 2020/07/30
- [PATCH V1 03/32] savevm: QMP command for cprsave, Steve Sistare, 2020/07/30
- [PATCH V1 10/32] kvmclock: restore paused KVM clock, Steve Sistare, 2020/07/30
- [PATCH V1 01/32] savevm: add vmstate handler iterators, Steve Sistare, 2020/07/30
- [PATCH V1 08/32] savevm: HMP command for cprinfo, Steve Sistare, 2020/07/30
- [PATCH V1 06/32] savevm: HMP Command for cprload, Steve Sistare, 2020/07/30
- [PATCH V1 11/32] cpu: disable ticks when suspended, Steve Sistare, 2020/07/30
- [PATCH V1 12/32] vl: pause option, Steve Sistare, 2020/07/30
- Re: [PATCH V1 12/32] vl: pause option,
Eric Blake <=
- Re: [PATCH V1 12/32] vl: pause option, Alex Bennée, 2020/07/30
[PATCH V1 14/32] savevm: VMS_RESTART and cprsave restart, Steve Sistare, 2020/07/30
[PATCH V1 15/32] vl: QEMU_START_FREEZE env var, Steve Sistare, 2020/07/30