qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Bernhard Beschow <shentey@gmail.com>
Cc: qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	qemu-ppc@nongnu.org,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Huacai Chen" <chenhuacai@kernel.org>
Subject: Re: [PATCH 0/3] Resolve vt82c686 and piix4 qemu_irq memory leaks
Date: Mon, 22 Jul 2024 20:21:32 -0400	[thread overview]
Message-ID: <20240722202107-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <184E18CE-C4DF-4DEA-A20A-84B31833093F@gmail.com>

On Mon, Jul 22, 2024 at 10:21:30PM +0000, Bernhard Beschow wrote:
> 
> 
> Am 20. Juli 2024 18:38:42 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
> >On Thu, Jul 04, 2024 at 10:58:51PM +0200, Bernhard Beschow wrote:
> >> This series first turns vt82c686's "INTR" pin into a named GPIO for better
> >> comprehensibility. It then continues fixing qemu_irq memory leaks in vt82c686
> >> and piix4 by connecting out IRQs of the south bridges before they get realized.
> >> This approach is already used in the pc machines after it had been discussed at
> >> KVM forum `23.
> >> 
> >> Observe that out IRQs are callbacks such as an INTR IRQ handler in a CPU which a
> >> south bridge wants to trigger. If, as an implementation detail, the south bridge
> >> wants to pass this callback to a child device, such as the PIC, then this
> >> callback must be known to the south bridge before it gets realized. Otherwise
> >> board code had to wire the PIC device itself, breaking encapsulation. This means
> >> that qdev_connect_gpio_out*() has to be called before realize() which this
> >> series implements. Another way to look at it is that callbacks apparently are
> >> resouces such as memory regions which are also populated before realize().
> >> 
> >> Please check if above paragraph makes sense.
> >> 
> >> Best regards,
> >> Bernhard
> >
> >
> >Bernhard, do you intend to resolve Zoltan's comments on this
> >patchset?
> 
> Hi Michael,
> 
> I was hoping for some more comments on the last two commits. These resolve various issues in one go, some of which have been addressed in the past. Since this is apparently a new style to handle out-GPIOs, I'd like to get an OK from the community.
> 
> As Zoltan writes the ideal solution might be to qdev'ify the PIC. This is a bigger task which is more than I intended to do in this series.
> 
> Best regards,
> Bernhard


ATM I'm just looking at whether we can fix any bugs for the coming
release.

> >
> >Thanks!
> >
> >
> >> See also:
> >> * https://lore.kernel.org/qemu-devel/0FFB5FD2-08CE-4CEC-9001-E7AC24407A44@gmail.
> >> com/
> >> * "Remove intermediate IRQ forwarder" patches in
> >> https://lore.kernel.org/qemu-devel/20230210163744.32182-1-philmd@linaro.org/
> >> 
> >> Testing done:
> >> * Boot amigaone machine into Linux
> >> * Boot pegasos2 machine into MorphOS
> >> * Start fuloong2e machine and check that it doesn't abort
> >> * Boot malta machine with https://people.debian.org/~gio/dqib/
> >> 
> >> Bernhard Beschow (3):
> >>   hw/isa/vt82c686: Turn "intr" irq into a named gpio
> >>   hw/isa/vt82c686: Resolve intermediate IRQ forwarder
> >>   hw/isa/piix: Resolve intermediate IRQ forwarder
> >> 
> >>  hw/isa/piix.c       | 13 ++-----------
> >>  hw/isa/vt82c686.c   | 12 ++----------
> >>  hw/mips/fuloong2e.c |  2 +-
> >>  hw/mips/malta.c     |  4 +---
> >>  hw/ppc/amigaone.c   |  8 ++++----
> >>  hw/ppc/pegasos2.c   |  4 ++--
> >>  6 files changed, 12 insertions(+), 31 deletions(-)
> >> 
> >> -- 
> >> 2.45.2
> >> 
> >



  reply	other threads:[~2024-07-23  0:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04 20:58 [PATCH 0/3] Resolve vt82c686 and piix4 qemu_irq memory leaks Bernhard Beschow
2024-07-04 20:58 ` [PATCH 1/3] hw/isa/vt82c686: Turn "intr" irq into a named gpio Bernhard Beschow
2024-07-05  0:32   ` BALATON Zoltan
2024-07-08 15:26     ` Peter Maydell
2024-07-15 10:10   ` Philippe Mathieu-Daudé
2024-07-04 20:58 ` [PATCH 2/3] hw/isa/vt82c686: Resolve intermediate IRQ forwarder Bernhard Beschow
2024-07-05  0:35   ` BALATON Zoltan
2024-07-05  0:39     ` BALATON Zoltan
2024-07-04 20:58 ` [PATCH 3/3] hw/isa/piix: " Bernhard Beschow
2024-07-20 18:38 ` [PATCH 0/3] Resolve vt82c686 and piix4 qemu_irq memory leaks Michael S. Tsirkin
2024-07-21 10:22   ` BALATON Zoltan
2024-07-22 22:21   ` Bernhard Beschow
2024-07-23  0:21     ` Michael S. Tsirkin [this message]
2024-07-24  8:20       ` Bernhard Beschow
2024-07-24 11:58         ` BALATON Zoltan

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=20240722202107-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=armbru@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=balaton@eik.bme.hu \
    --cc=chenhuacai@kernel.org \
    --cc=hpoussin@reactos.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=shentey@gmail.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).