From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Alexander Graf <agraf@suse.de>,
Stefan Hajnoczi <stefanha@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>,
qemu-ppc@nongnu.org, Alex Bligh <alex@alex.org.uk>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v6 2/4] target-s390x: Migrate to new NMI interface
Date: Thu, 12 Jun 2014 22:33:21 +1000 [thread overview]
Message-ID: <53999E11.50701@ozlabs.ru> (raw)
In-Reply-To: <20140612130227.2819fbd2.cornelia.huck@de.ibm.com>
On 06/12/2014 09:02 PM, Cornelia Huck wrote:
> On Thu, 12 Jun 2014 19:38:40 +1000
> Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>
>> On 06/12/2014 04:31 PM, Cornelia Huck wrote:
>>> On Thu, 12 Jun 2014 03:03:01 +1000
>>> Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>>>
>>>> This implements an NMI interface for s390 machine.
>>>>
>>>> This removes #ifdef s390 branch in qmp_inject_nmi so new s390's
>>>> nmi_monitor_handler() callback is going to be used for NMI.
>>>>
>>>> Since nmi_monitor_handler()-calling code is platform independent,
>>>> CPUState::cpu_index is used instead of S390CPU::env.cpu_num.
>>>> There should not be any change in behaviour as both @cpu_index and
>>>> @cpu_num are global CPU numbers.
>>>>
>>>> Also, s390_cpu_restart() takes care of preforming operations in
>>>> the specific CPU thread so no extra measure is required here either.
>>>>
>>>> Since the only error s390_cpu_restart() can return is ENOSYS, convert
>>>> it to QERR_UNSUPPORTED.
>>>>
>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>> ---
>>>> Changes:
>>>> v6:
>>>> * supported NMI interface
>>>>
>>>> v5:
>>>> * added ENOSYS -> QERR_UNSUPPORTED, qapi/qmp/qerror.h was added for this
>>>>
>>>> v4:
>>>> * s/\<nmi\>/nmi_monitor_handler/
>>>>
>>>> v3:
>>>> * now contains both old code removal and new code insertion, easier to
>>>> track changes
>>>>
>>>> ---
>>>> Is there any good reason to have @cpu_num in addition to @cpu_index?
>>>> Just asking :)
>>>> ---
>>>> cpus.c | 14 --------------
>>>> hw/s390x/s390-virtio.c | 31 +++++++++++++++++++++++++++++++
>>>> target-s390x/cpu.c | 1 +
>>>> 3 files changed, 32 insertions(+), 14 deletions(-)
>>>>
>
>> I pushed some version to git@github.com:aik/qemu.git , branch nmi-v7
>> Please have a look and give it a go - I do not have s390 kernel/images
>> handy. Thanks!
>
> Gave it a try with both of the machines: Triggering 'nmi' from the
> monitor still triggers the configured on_restart action, so this seems
> to work as well as before.
>
>>
>> It does not look like we really need a new file for NMI now.
>
> Yes, I think the v7 code looks fine.
Cool, thanks! I'll wait for a bit till everybody speaks and repost :-)
--
Alexey
next prev parent reply other threads:[~2014-06-12 12:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 17:02 [Qemu-devel] [PATCH v6 0/4] cpus: Add generic "nmi" monitor command support Alexey Kardashevskiy
2014-06-11 17:03 ` [Qemu-devel] [PATCH v6 1/4] cpus: Define callback for QEMU "nmi" command Alexey Kardashevskiy
2014-06-11 17:21 ` Eric Blake
2014-06-12 0:10 ` Alexey Kardashevskiy
2014-06-12 1:46 ` Eric Blake
2014-06-12 3:29 ` Alexey Kardashevskiy
2014-06-12 13:42 ` Eric Blake
2014-06-11 17:03 ` [Qemu-devel] [PATCH v6 2/4] target-s390x: Migrate to new NMI interface Alexey Kardashevskiy
2014-06-11 17:29 ` Paolo Bonzini
2014-06-12 0:08 ` Alexey Kardashevskiy
2014-06-12 7:42 ` Paolo Bonzini
2014-06-12 8:35 ` Alexey Kardashevskiy
2014-06-12 8:41 ` Paolo Bonzini
2014-06-12 6:31 ` Cornelia Huck
2014-06-12 9:38 ` Alexey Kardashevskiy
2014-06-12 9:39 ` Alexander Graf
2014-06-12 9:55 ` Alexey Kardashevskiy
2014-06-12 11:02 ` Cornelia Huck
2014-06-12 12:33 ` Alexey Kardashevskiy [this message]
2014-06-11 17:03 ` [Qemu-devel] [PATCH v6 3/4] target-i386: " Alexey Kardashevskiy
2014-06-11 17:03 ` [Qemu-devel] [PATCH v6 4/4] target-ppc: Add support for " Alexey Kardashevskiy
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=53999E11.50701@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=alex@alex.org.uk \
--cc=armbru@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
--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).