qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clegoate@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Mark Burton <mburton@qti.qualcomm.com>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"qemu-s390x@nongnu.org" <qemu-s390x@nongnu.org>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>
Subject: Re: [PATCH 0/4] hw/nmi: Remove @cpu_index argument
Date: Fri, 22 Mar 2024 15:08:09 +0100	[thread overview]
Message-ID: <6dfb82c0-d2c0-4618-94b0-2e2561534d96@redhat.com> (raw)
In-Reply-To: <CAFEAcA8=H=xD75T-e6JFnz9RtT2kG2nM5HbqE0AsTiWFe+0a-w@mail.gmail.com>

On 3/20/24 16:00, Peter Maydell wrote:
> On Wed, 20 Mar 2024 at 14:10, Mark Burton <mburton@qti.qualcomm.com> wrote:
>> I’d broaden this to all ’signals’ (IRQ, Reset etc) - and I guess
>> similar statements apply, with the “bridge” between the function
>> and the GPIO mechanism moved closer or further from the originator(s)
>> of the activity.
>>
>> The issue isn’t my “machine” model, rather the compose-ability of
>> (any) such machine.  A-priori, a model writer doesn’t know if they
>> should respond directly to an NMI or not - Hence they dont know if
>> they should implement the TYPE_NMI or not. That’s a decision only
>> the machine composer knows.
>> My suggestion would be to use a GPIO interface to models, which can
>> then be appropriately wired. (And, hence, to have a single place
>> that implements the TYPE_NMI interface and provides the GPIO wire
>> ready for wiring to appropriate devices).
> 
> I feel like that's a long way in the future, but my back-of-the-envelope
> design sketch of that is that the TYPE_MACHINE class that's implementing
> the "I am just a container for all the devices that the user has
> specified and wired together" machine would itself implement TYPE_NMI and
> when an NMI came in it would assert a GPIO line that the user could
> wire up, or not wire up, as they chose.
> 
> Right now we can't do that though, because, among other reasons,
> TYPE_MACHINE isn't a TYPE_DEVICE. (I do want to fix that, though:
> I'm hoping it won't be too difficult.)

Oh that's interesting. Will that introduce an extra level of container
with multiple machines below ?

/qemu
   /machine[0]
     ...
     /peripheral (container)
     /peripheral-anon (container)
   /machine[1]
     ...
     /peripheral (container)
     /peripheral-anon (container)
   /unattached (container)
     ...
     /sysbus (System)
     /system[0] (memory-region)

Thanks,

C.



  parent reply	other threads:[~2024-03-22 14:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 15:08 [PATCH 0/4] hw/nmi: Remove @cpu_index argument Philippe Mathieu-Daudé
2024-02-20 15:08 ` [PATCH 1/4] hw/nmi: Use object_child_foreach_recursive() in nmi_children() Philippe Mathieu-Daudé
2024-03-20 13:09   ` Peter Maydell
2024-02-20 15:08 ` [PATCH 2/4] hw/s390x/virtio-ccw: Always deliver NMI to first CPU Philippe Mathieu-Daudé
2024-03-20 13:16   ` Peter Maydell
2024-03-20 14:12   ` David Hildenbrand
2024-02-20 15:08 ` [PATCH 3/4] hw/nmi: Remove @cpu_index argument from NMIClass::nmi_handler() Philippe Mathieu-Daudé
2024-03-20 13:23   ` Peter Maydell
2024-03-20 16:47     ` Philippe Mathieu-Daudé
2024-03-20 19:05       ` Markus Armbruster
2024-03-20 19:39         ` Peter Maydell
2024-02-20 15:08 ` [PATCH 4/4] hw/nmi: Remove @cpu_index argument from nmi_trigger() Philippe Mathieu-Daudé
2024-03-20 13:34   ` Peter Maydell
2024-02-20 15:19 ` [PATCH 0/4] hw/nmi: Remove @cpu_index argument Thomas Huth
2024-02-20 20:05   ` Philippe Mathieu-Daudé
2024-03-20 11:19   ` Philippe Mathieu-Daudé
2024-03-20 11:44     ` Mark Burton
2024-03-20 12:00     ` Peter Maydell
2024-03-20 12:31       ` Mark Burton
2024-03-20 13:55         ` Peter Maydell
2024-03-20 14:09           ` Mark Burton
2024-03-20 15:00             ` Peter Maydell
2024-03-20 15:40               ` Mark Burton
2024-03-22 14:08               ` Cédric Le Goater [this message]
2024-03-22 14:55                 ` Peter Maydell

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=6dfb82c0-d2c0-4618-94b0-2e2561534d96@redhat.com \
    --to=clegoate@redhat.com \
    --cc=armbru@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=mburton@qti.qualcomm.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@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).