qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: kvm list <kvm@vger.kernel.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	linux-kernel@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [Qemu-devel] [PATCH]qemu: deal with guest paniced event
Date: Mon, 27 Feb 2012 09:59:07 +0100	[thread overview]
Message-ID: <4F4B45DB.9050006@web.de> (raw)
In-Reply-To: <4F4AF316.50400@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]

On 2012-02-27 04:05, Wen Congyang wrote:
> When the host knows the guest is paniced, it will set
> exit_reason to KVM_EXIT_GUEST_PANIC. So if qemu receive
> this exit_reason, we can send a event to tell management
> application that the guest is paniced.
> 
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
>  kvm-all.c                 |    3 +++
>  linux-headers/linux/kvm.h |    1 +
>  monitor.c                 |    3 +++
>  monitor.h                 |    1 +
>  4 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index c4babda..ae428ab 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1190,6 +1190,9 @@ int kvm_cpu_exec(CPUState *env)
>                      (uint64_t)run->hw.hardware_exit_reason);
>              ret = -1;
>              break;
> +        case KVM_EXIT_GUEST_PANIC:
> +            monitor_protocol_event(QEVENT_GUEST_PANICED, NULL);
> +            break;
>          case KVM_EXIT_INTERNAL_ERROR:
>              ret = kvm_handle_internal_error(env, run);
>              break;
> diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
> index f6b5343..45dd031 100644
> --- a/linux-headers/linux/kvm.h
> +++ b/linux-headers/linux/kvm.h
> @@ -163,6 +163,7 @@ struct kvm_pit_config {
>  #define KVM_EXIT_OSI              18
>  #define KVM_EXIT_PAPR_HCALL	  19
>  #define KVM_EXIT_S390_UCONTROL	  20
> +#define KVM_EXIT_GUEST_PANIC	  21
>  
>  /* For KVM_EXIT_INTERNAL_ERROR */
>  #define KVM_INTERNAL_ERROR_EMULATION 1

linux-headers are supposed to be synchronized in a separate patch,
naming the upstream or kvm.git hash they pull in. IOW: the KVM ABI
change has to be applied first.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-02-27  8:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27  3:01 [Qemu-devel] [PATCH] kvm: notify host when guest paniced Wen Congyang
2012-02-27  3:05 ` [Qemu-devel] [PATCH]qemu: deal with guest paniced event Wen Congyang
2012-02-27  8:59   ` Jan Kiszka [this message]
2012-03-01 16:51   ` Luiz Capitulino
2012-03-02  0:40     ` Wen Congyang
2012-02-27 15:08 ` [Qemu-devel] [PATCH] kvm: notify host when guest paniced Jan Kiszka
2012-02-28  5:26   ` Wen Congyang
2012-02-28  8:07     ` Wen Congyang
2012-02-28  8:23   ` Wen Congyang
2012-02-28  9:34     ` Jan Kiszka
2012-02-28  9:42       ` Wen Congyang
2012-02-28 10:19         ` Jan Kiszka
2012-02-28 10:45           ` Gleb Natapov
2012-02-29  1:08             ` Wen Congyang
2012-02-29  9:36               ` Gleb Natapov
2012-02-29 10:06                 ` Wen Congyang
2012-02-28 11:23 ` Avi Kivity
2012-02-29  1:29   ` Wen Congyang
2012-02-29  9:49     ` Avi Kivity
2012-02-29  9:55       ` Gleb Natapov
2012-02-29 10:00         ` Avi Kivity
2012-02-29 10:05           ` Gleb Natapov
2012-02-29 10:08             ` Avi Kivity
2012-02-29 10:17               ` Wen Congyang
2012-02-29 10:39                 ` Avi Kivity
2012-03-01  3:34                   ` Wen Congyang
2012-03-01  5:21                   ` Wen Congyang
2012-02-29 10:44               ` Gleb Natapov
2012-02-29 10:48                 ` Avi Kivity
2012-02-29 10:52                   ` Gleb Natapov
2012-02-29  9:58       ` Daniel P. Berrange
2012-02-29 10:05         ` Avi Kivity
2012-02-29 10:19           ` Daniel P. Berrange
2012-02-29 10:44             ` Avi Kivity
2012-02-29 10:31           ` Wen Congyang
2012-02-29 10:46             ` Avi Kivity

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=4F4B45DB.9050006@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wency@cn.fujitsu.com \
    /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;
as well as URLs for NNTP newsgroup(s).