qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Gleb Natapov <gleb@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Hu Tao <hutao@cn.fujitsu.com>, qemu-devel <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>, Blue Swirl <blauwirbel@gmail.com>,
	Orit Wasserman <owasserm@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Andrew Jones <drjones@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Sasha Levin <levinsasha928@gmail.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] [RFC] Wire up disabled wait a panicked event on s390
Date: Fri, 5 Apr 2013 09:15:59 -0400	[thread overview]
Message-ID: <20130405091559.22a250c4@redhat.com> (raw)
In-Reply-To: <515E8E7E.8060504@de.ibm.com>

On Fri, 05 Apr 2013 10:42:38 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On s390 the disabled wait state indicates a state of attention.
> For example Linux uses that state after a panic. Lets
> put the system into panicked state.
> 
> An alternative implementation would be to state
> disabled-wait <address> instead of pause in the action field.
> (e.g. z/OS, z/VM and other classic OSes use the address of the
> disabled wait to indicate an error code).
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  target-s390x/kvm.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
> index 644f484..0c111f0 100644
> --- a/target-s390x/kvm.c
> +++ b/target-s390x/kvm.c
> @@ -34,6 +34,8 @@
>  #include "sysemu/kvm.h"
>  #include "cpu.h"
>  #include "sysemu/device_tree.h"
> +#include "qapi/qmp/qjson.h"
> +#include "monitor/monitor.h"
>  
>  /* #define DEBUG_KVM */
>  
> @@ -705,9 +707,18 @@ static int handle_intercept(S390CPU *cpu)
>              r = handle_instruction(cpu, run);
>              break;
>          case ICPT_WAITPSW:
> -            if (s390_del_running_cpu(cpu) == 0 &&
> -                is_special_wait_psw(cs)) {
> -                qemu_system_shutdown_request();
> +            /* disabled wait, since enabled wait is handled in kernel */
> +            if (s390_del_running_cpu(cpu) == 0) {
> +                if (is_special_wait_psw(cs)) {
> +                    qemu_system_shutdown_request();
> +                } else {
> +                    QObject *data;
> +
> +                    data = qobject_from_jsonf("{ 'action': %s }", "pause");
> +                    monitor_protocol_event(QEVENT_GUEST_PANICKED, data);
> +                    qobject_decref(data);
> +                    vm_stop(RUN_STATE_GUEST_PANICKED);

This is on top of the pvpanic device, right?

Seems good to me, although I don't remember the exact semantics of the
new event. Also, I think you could move this code to a function and
share it with the pvpanic device.

> +                }
>              }
>              r = EXCP_HALTED;
>              break;
> 

      reply	other threads:[~2013-04-05 13:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05  6:36 [Qemu-devel] [PATCH v17 0/6] Add pvpanic device to deal with guest panic event Hu Tao
2013-04-05  6:36 ` [Qemu-devel] [PATCH v17 1/6] add a new runstate: RUN_STATE_GUEST_PANICKED Hu Tao
2013-05-17  6:59   ` Christian Borntraeger
2013-05-17  7:43     ` [Qemu-devel] [PATCH] vl: new runstate transition: RUN_STATE_GUEST_PANICKED -> RUN_STATE_FINISH_MIGRATE Hu Tao
2013-05-17  8:03       ` [Qemu-devel] [PATCH for-1.5] " Paolo Bonzini
2013-05-17  8:22       ` [Qemu-devel] [PATCH] " Christian Borntraeger
2013-05-17  7:50     ` [Qemu-devel] [PATCH v17 1/6] add a new runstate: RUN_STATE_GUEST_PANICKED Markus Armbruster
2013-04-05  6:36 ` [Qemu-devel] [PATCH v17 2/6] add a new qevent: QEVENT_GUEST_PANICKED Hu Tao
2013-04-05  6:36 ` [Qemu-devel] [PATCH v17 3/6] introduce a new qom device to deal with panicked event Hu Tao
2013-04-05  6:36 ` [Qemu-devel] [PATCH v17 4/6] pvpanic: pass configurable ioport to seabios Hu Tao
2013-04-05  6:36 ` [Qemu-devel] [PATCH v17 5/6] pvpanic: create pvpanic device by default Hu Tao
2013-04-05 11:14   ` Paolo Bonzini
2013-04-08  2:50     ` Hu Tao
2013-04-09  9:06   ` [Qemu-devel] [PATCH] pvpanic: create pvpanic by default for machine 1.5 Hu Tao
2013-04-09  9:34     ` Paolo Bonzini
2013-04-05  6:36 ` [Qemu-devel] [PATCH v17 6/6] pvpanic: add document of pvpanic Hu Tao
2013-04-05  7:10 ` [Qemu-devel] [PATCH v17] pvpanic: pvpanic device driver Hu Tao
2013-04-05 11:45   ` Paolo Bonzini
2013-04-30 15:39   ` Paolo Bonzini
2013-04-05  7:17 ` [Qemu-devel] [PATCH v17] Add " Hu Tao
2013-04-30 16:00   ` Paolo Bonzini
2013-05-01  1:07     ` Kevin O'Connor
2013-05-15  7:21   ` [Qemu-devel] [SeaBIOS] " Laszlo Ersek
2013-05-15  7:27     ` Hu Tao
2013-05-15  7:30       ` Hu Tao
2013-05-15  7:36       ` Laszlo Ersek
2013-05-15 16:25       ` Laszlo Ersek
2013-05-15 16:25         ` Paolo Bonzini
2013-05-15 16:34           ` Laszlo Ersek
2013-05-15  7:32   ` [Qemu-devel] " Christian Borntraeger
2013-05-15  7:36     ` Hu Tao
2013-04-05  8:42 ` [Qemu-devel] [PATCH] [RFC] Wire up disabled wait a panicked event on s390 Christian Borntraeger
2013-04-05 13:15   ` Luiz Capitulino [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=20130405091559.22a250c4@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=borntraeger@de.ibm.com \
    --cc=drjones@redhat.com \
    --cc=gleb@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=levinsasha928@gmail.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.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).