From: Wen Congyang <wency@cn.fujitsu.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: kvm list <kvm@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Avi Kivity <avi@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH 7/7 v6] deal with panicked event accoring to '-machine panic_action=action'
Date: Mon, 09 Jul 2012 18:44:31 +0800 [thread overview]
Message-ID: <4FFAB60F.9040702@cn.fujitsu.com> (raw)
In-Reply-To: <4FF6C77B.208@siemens.com>
At 07/06/2012 07:09 PM, Jan Kiszka Wrote:
> On 2012-07-06 11:41, Wen Congyang wrote:
>> The action is the same as -onpanic parameter.
>
> As explained in patch 5, now that we have a related device, this no
> longer needs to be a machine property.
>
> Would could be a machine property is enabling/disabling this device.
> That's probably useful as it uses a fixed PIO port that might conflict
> with (non-Linux) guest expectations and/or future device models.
Yes, it is very useful. I will do it.
Thanks
Wen Congyang
>
> Jan
>
>>
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> ---
>> qemu-config.c | 4 ++++
>> qemu-options.hx | 4 +++-
>> vl.c | 7 +++++++
>> 3 files changed, 14 insertions(+), 1 deletions(-)
>>
>> diff --git a/qemu-config.c b/qemu-config.c
>> index 5c3296b..805e7c4 100644
>> --- a/qemu-config.c
>> +++ b/qemu-config.c
>> @@ -595,6 +595,10 @@ static QemuOptsList qemu_machine_opts = {
>> .name = "dt_compatible",
>> .type = QEMU_OPT_STRING,
>> .help = "Overrides the \"compatible\" property of the dt root node",
>> + }, {
>> + .name = "panic_action",
>> + .type = QEMU_OPT_STRING,
>> + .help = "The action what QEMU will do when the guest is panicked",
>> },
>> { /* End of list */ }
>> },
>> diff --git a/qemu-options.hx b/qemu-options.hx
>> index 4a061bf..083a21d 100644
>> --- a/qemu-options.hx
>> +++ b/qemu-options.hx
>> @@ -33,7 +33,9 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
>> " property accel=accel1[:accel2[:...]] selects accelerator\n"
>> " supported accelerators are kvm, xen, tcg (default: tcg)\n"
>> " kernel_irqchip=on|off controls accelerated irqchip support\n"
>> - " kvm_shadow_mem=size of KVM shadow MMU\n",
>> + " kvm_shadow_mem=size of KVM shadow MMU\n"
>> + " panic_action=none|pause|poweroff|reset controls what QEmu\n"
>> + " will do when the guest is panicked",
>> QEMU_ARCH_ALL)
>> STEXI
>> @item -machine [type=]@var{name}[,prop=@var{value}[,...]]
>> diff --git a/vl.c b/vl.c
>> index 1a68257..091c43b 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -2301,6 +2301,7 @@ int main(int argc, char **argv, char **envp)
>> };
>> const char *trace_events = NULL;
>> const char *trace_file = NULL;
>> + const char *panic_action = NULL;
>>
>> atexit(qemu_run_exit_notifiers);
>> error_set_progname(argv[0]);
>> @@ -3372,10 +3373,16 @@ int main(int argc, char **argv, char **envp)
>> kernel_filename = qemu_opt_get(machine_opts, "kernel");
>> initrd_filename = qemu_opt_get(machine_opts, "initrd");
>> kernel_cmdline = qemu_opt_get(machine_opts, "append");
>> + panic_action = qemu_opt_get(machine_opts, "panic_action");
>> } else {
>> kernel_filename = initrd_filename = kernel_cmdline = NULL;
>> }
>>
>> + if (panic_action && select_panicked_action(panic_action) == -1) {
>> + fprintf(stderr, "Unknown -panic_action parameter\n");
>> + exit(1);
>> + }
>> +
>> if (!kernel_cmdline) {
>> kernel_cmdline = "";
>> }
>>
>
prev parent reply other threads:[~2012-07-09 10:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 9:36 [PATCH v6] kvm: notify host when the guest is panicked Wen Congyang
2012-07-06 9:38 ` [PATCH 1/7 v6] start vm after reseting it Wen Congyang
2012-07-06 9:38 ` [PATCH 2/7 v6] update linux headers Wen Congyang
2012-07-06 10:25 ` Jan Kiszka
2012-07-06 10:50 ` Wen Congyang
2012-07-06 10:55 ` [Qemu-devel] " 陳韋任 (Wei-Ren Chen)
2012-07-06 11:16 ` Jan Kiszka
2012-07-07 14:35 ` Paul Gortmaker
2012-07-06 9:39 ` [PATCH 3/7 v6] add a new runstate: RUN_STATE_GUEST_PANICKED Wen Congyang
2012-07-06 9:40 ` [PATCH 4/7 v6] add a new qevent: QEVENT_GUEST_PANICKED Wen Congyang
2012-07-06 9:41 ` [PATCH 5/7 v6] introduce a new qom device to deal with panicked event Wen Congyang
2012-07-06 11:05 ` Jan Kiszka
2012-07-18 1:54 ` Wen Congyang
2012-07-18 9:19 ` Jan Kiszka
2012-07-18 9:25 ` Jan Kiszka
2012-07-06 9:41 ` [PATCH 6/7 v6] deal with guest panicked event accoring to -onpanic parameter Wen Congyang
2012-07-06 11:12 ` Jan Kiszka
2012-07-06 9:41 ` [PATCH 7/7 v6] deal with panicked event accoring to '-machine panic_action=action' Wen Congyang
2012-07-06 11:09 ` Jan Kiszka
2012-07-09 10:44 ` Wen Congyang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FFAB60F.9040702@cn.fujitsu.com \
--to=wency@cn.fujitsu.com \
--cc=avi@redhat.com \
--cc=berrange@redhat.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox