qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
	"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>,
	"Paolo Bonzini" <pbonzini@redhat.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 11:19:51 +0200	[thread overview]
Message-ID: <53981F37.2050607@suse.de> (raw)
In-Reply-To: <53981BA9.4010505@ozlabs.ru>


On 11.06.14 11:04, Alexey Kardashevskiy wrote:
> On 06/11/2014 10:28 AM, Alexander Graf wrote:
>>
>>> Am 11.06.2014 um 02:23 schrieb Peter Maydell <peter.maydell@linaro.org>:
>>>
>>>> On 10 June 2014 19:09, Alexander Graf <agraf@suse.de> wrote:
>>>> I agree. I see two different paths forward:
>>>>
>>>>   1) Use the patches as they are - they seem pretty sound and take the
>>>> existing x86/s390 only feature to spapr
>>>>   2) Model an "NMI" button. That button would get instantiated by the
>>>> machine model. That would allow the wiring to be defined by the board.
>>>> Monitor / QMP would only "press" that button (trigger an edge interrupt?
>>>> call a function? something).
>>>>
>>>>
>>>> I don't mind much either way - option 2 is the architecturally correct way
>>>> of doing this. Option 1 probably won't hurt us either.
>>> In an ideal world I'd like (2), ie actually model front panel switches
>>> per machine and with whatever the machine's behaviour actually
>>> is. However pragmatically speaking that's an awful lot of work
>>> (especially since it basically requires adding a lot of U/I which is
>>> always controversial and hard to drive through). I think pragmatism
>>> should probably win here.
>> Could we just stick a new nmi function callback into the machine class with the nmi command calling it?
>
> MachineClass::nmi_monitor_handler()? Or interface?

That's an implementation detail to me - I don't care either way :).

> What about x86/s390? Leave them alone? Or implement nmi_monitor_handler()
> for them too? I did "grep TYPE_MACHINE", looks like I'll have to implement
> TYPE_PC_MACHINE and TYPE_S390_MACHINE (or more), is that correct?

or the button device that implements the interface ;).

Really what I'd like to see eventually is that the "nmi" monitor command 
just searches for a device labeled "NMI button". That device implements 
a way (qemu_irq or callback) to trigger the NMI.

In the future when someone who's good at UIs wants to take a stab at it, 
he could then expose that button via the UI as well.

Anything that goes into that direction is a step into the right 
direction IMHO.


Alex

>
>
> v1 of this was implementing an interface for a SPAPR machine (like
> fw_path_provider) and it was pointed out that CPUClass is the right place.
> Now I am _really_ confused :)
>
>
>> That gets us on the right track to the right direction without putting
>> too much work on Alexey's shoulders. Converting from there to an actual
>> button object should become reasonably straight forward later.
>>
>>
>> Alex
>>
>

  reply	other threads:[~2014-06-11  9:20 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                               ` [Qemu-devel] " Alexander Graf
2014-06-11  9:04                 ` Alexey Kardashevskiy
2014-06-11  9:19                   ` Alexander Graf [this message]
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=53981F37.2050607@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).