From: Alexander Graf <agraf@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Alexey Kardashevskiy" <aik@ozlabs.ru>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Markus Armbruster" <armbru@redhat.com>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"Alex Bligh" <alex@alex.org.uk>,
"Cornelia Huck" <cornelia.huck@de.ibm.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v3 1/4] cpus: Define NMI callback
Date: Wed, 11 Jun 2014 14:04:52 +0200 [thread overview]
Message-ID: <539845E4.7030200@suse.de> (raw)
In-Reply-To: <539833C4.5090101@redhat.com>
On 06/11/2014 12:47 PM, Paolo Bonzini wrote:
> Il 11/06/2014 10:42, Alexander Graf ha scritto:
>>
>> On 11.06.14 10:37, Paolo Bonzini wrote:
>>> Il 11/06/2014 10:29, Alexander Graf ha scritto:
>>>>>
>>>>> But right now inject-nmi was a CPU-specific interface and whoever
>>>>> needs something different will have to find a way.
>>>>>
>>>>> You could argue that Alexey does need something different thanks to
>>>>> his need to inject the NMI on all CPUs.
>>>>>
>>>>> What about an NMIMonitorHandler interface that takes a Monitor*, and
>>>>> then you iterate on all of /machine looking for implementors of the
>>>>> interface? Then -M mac99 can add it to the MPIC, -M spapr can just
>>>>> ignore the Monitor*, and i386/s390 can look at the current CPU.
>>>>
>>>> I think modeling a button is easier and closer to what you'd actually
>>>> get on real hardware.
>>>
>>> What is a button? It certainly doesn't have any evdev support in
>>> Linux.
>>
>> It's a device that links a qemu_irq line and implements an interface to
>> call it.
>
> That seems awfully overengineered.
On PPC every input line to a CPU is a qemu_irq. I don't see how a
linking piece between this qemu_irq object and a command line interface
is overengineered. Whether the linking piece is "a device you look for
and call a function in" or "a machine callback you call" is an
implementation detail IMHO.
>
>>> The NMI button is just something that closes a circuit. Whoever is
>>> attached to that circuit reacts, in QEMU that's whoever implements an
>>> NMIMonitorHandler. The Monitor* is just for backwards HMP
>>> compatibility.
>>
>> I think the only major difference in thinking we have here is that I
>> don't think it's necessary to maintain HMP compatibility for this debug
>> feature that maybe 2 people in the world ever used ;).
>
> Ok, I can buy removing the support for CPU != 0. But still, the
> overengineering remains.
>
> If Alexey needs to trigger the NMI on all CPUs, simply moving the new
> method from CPU to Machine, and blindly using first_cpu in s390 and
> x86 makes the most sense.
Yes :).
Alex
next prev parent reply other threads:[~2014-06-11 12:05 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 8:08 [Qemu-devel] [PATCH v3 0/4] cpus: Add generic NMI support Alexey Kardashevskiy
2014-06-04 8:08 ` [Qemu-devel] [PATCH v3 1/4] cpus: Define NMI callback Alexey Kardashevskiy
2014-06-10 13:39 ` Luiz Capitulino
2014-06-10 14:41 ` Cornelia Huck
2014-06-10 14:48 ` Luiz Capitulino
2014-06-10 16:29 ` Paolo Bonzini
2014-06-10 18:09 ` Alexander Graf
2014-06-11 0:12 ` Alexey Kardashevskiy
2014-06-11 0:21 ` Alexander Graf
2014-06-11 0:23 ` Peter Maydell
2014-06-11 0:28 ` Alexander Graf
2014-06-11 4:59 ` Paolo Bonzini
2014-06-11 8:01 ` Alexander Graf
2014-06-11 8:27 ` Paolo Bonzini
2014-06-11 8:29 ` Alexander Graf
2014-06-11 8:37 ` Paolo Bonzini
2014-06-11 8:42 ` Alexander Graf
2014-06-11 10:47 ` Paolo Bonzini
2014-06-11 10:59 ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2014-06-11 12:04 ` Alexander Graf [this message]
2014-06-11 9:04 ` [Qemu-devel] " Alexey Kardashevskiy
2014-06-11 9:19 ` Alexander Graf
2014-06-11 13:10 ` Luiz Capitulino
2014-06-11 13:36 ` Cornelia Huck
2014-06-11 13:42 ` Luiz Capitulino
2014-06-11 6:50 ` Alexey Kardashevskiy
2014-06-11 7:57 ` Paolo Bonzini
2014-06-11 8:38 ` Cornelia Huck
2014-06-11 9:18 ` Cornelia Huck
2014-06-10 15:13 ` Eric Blake
2014-06-10 15:40 ` Alexey Kardashevskiy
2014-06-11 12:50 ` Luiz Capitulino
2014-06-04 8:08 ` [Qemu-devel] [PATCH v3 2/4] target-s390x: Migrate to new nmi() CPU callback Alexey Kardashevskiy
2014-06-04 8:08 ` [Qemu-devel] [PATCH v3 3/4] target-i386: " Alexey Kardashevskiy
2014-06-04 8:08 ` [Qemu-devel] [PATCH v3 4/4] target-ppc: Add support for " Alexey Kardashevskiy
2014-06-04 9:11 ` [Qemu-devel] [PATCH v3 0/4] cpus: Add generic NMI support Paolo Bonzini
2014-06-04 9:16 ` Peter Maydell
2014-06-04 9:30 ` Alexey Kardashevskiy
2014-06-04 9:33 ` Peter Maydell
2014-06-04 9:38 ` Alexander Graf
2014-06-04 9:39 ` Alexey Kardashevskiy
2014-06-04 9:39 ` Paolo Bonzini
2014-06-04 9:47 ` Peter Maydell
2014-06-04 9:50 ` Alexander Graf
2014-06-04 10:44 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2014-06-04 10:51 ` Cornelia Huck
2014-06-04 11:34 ` [Qemu-devel] " 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=539845E4.7030200@suse.de \
--to=agraf@suse.de \
--cc=afaerber@suse.de \
--cc=aik@ozlabs.ru \
--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).