From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "J. Mayer" <l_indien@magic.fr>
Subject: Re: [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...
Date: Sun, 8 Apr 2007 00:13:14 +0100 [thread overview]
Message-ID: <200704080013.14771.paul@codesourcery.com> (raw)
In-Reply-To: <1175984294.1516.33.camel@rapid>
On Saturday 07 April 2007 23:18, J. Mayer wrote:
> It seems that you don't figure out how real hardware works AT ALL.
> IRQ callbacks and private data CANNOT BE SHARED as they are INTERNAL TO
> ONE IRQ CONTROLLER. IRQ management, once again, is completelly specific
> to an IRQ controller technology and absolutely not related to the CPU
> you may use on the same board. So it's a complete nonsense to try to
> share IRQ notion in the CPU. IRQ notions and management is completely
> different to one IRQ controller technology to another.
<snip>
You appear to have misunderstood what my patch does. The arguments you use in
the part of the email I snipped are the same resons why I created this patch.
The most important thing to understand is that the "qemu_irq" object is simply
an abstract interface for connecting two devices. One of which produces a
single-bit output, and the other does something in response to that signal.
qemu_irq isn't an ideal name because it's used for things other than physical
IRQ pins. However it's the best we (Me, Theimo, or anyone else on #qemu about
24 hours ago) could come up with.
The purpose of this abstraction is precisely so that interrupt sources and
sinks can be chained and rearranged in arbitrary fashion.
In the specific case of PPC a typical system, as you say, has several cascaded
levels of interrupt handling. You have multiple external interrupt
controllers, including interrupts from PCI bus based devices.
Contrary to your assertion, a PPC cpu does contains an internal vectored
interrupt controller. This handles the external IRQ pin, plus various
internal interrupt sources (as defined by the PPC_INTERRUPT_* constants).
This is what the IRQ array in the cpu state structure is for. I see no
fundamental reason why this should be treated any differently to an external
interrupt controller.
Because these are currently implemented in the same file I didn't bother
converting them fully and they mostly still use ppc_set_irq dircetly instead
of going via qemu_set_irq. If/when ppc.c is split up and/or cpus with more
than one external IRQ pin are added the generic IRQ routing mechanisms allow
this to happen without having to export ppc_set_irq.
PPC is a slightly bad example because it still has ppc_openpic_irq. This is
exactly the sort of horrible system specific hack I'm trying to replace.
Before my patch chained interrupts were handled with a messy ad-hoc
combination of callbacks and opaque parameters. Some devices were properly
parameterized, others assumed that their IRQ output went to a specific device
or CPU.
My patch introduces a generic mechanism for devices to talk to an interrupt
controller. It means that the code signalling the interrupt doesn't need to
know or care where it ends up. The logic for implementing a particular
interrupt controller is still private to that device.
I have not created a single flat IRQ super-controller, just a consistent
mechanism for glueing the existing bits of emulation together.
> You broke the commited code.... And you also completely break any new
> development for the PowerPC target as most real machine cannot be
> emulated now (even PREP is broken, using 3 IRQ controllers).
Can you send me a testcase of something that worked before my patch and
doesn't afterwards? As I said above, handling of multiple IRQ controllers is
significantly better after my patch than it was before.
Paul
next prev parent reply other threads:[~2007-04-07 23:17 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-07 18:14 [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c Paul Brook
2007-04-07 18:32 ` J. Mayer
2007-04-07 19:10 ` Paul Brook
2007-04-07 19:32 ` Blue Swirl
2007-04-07 19:46 ` Paul Brook
2007-04-07 20:28 ` J. Mayer
2007-04-07 20:45 ` Paul Brook
2007-04-07 22:18 ` J. Mayer
2007-04-07 22:49 ` Thiemo Seufer
2007-04-07 23:13 ` Paul Brook [this message]
2007-04-07 23:54 ` J. Mayer
2007-04-08 0:04 ` Thiemo Seufer
2007-04-08 7:49 ` IRQ handling (was [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...) J. Mayer
2007-04-08 8:38 ` J. Mayer
2007-04-08 14:41 ` Thiemo Seufer
2007-04-08 16:31 ` J. Mayer
2007-04-08 20:43 ` QEMU Automated Testing " Natalia Portillo
2007-04-08 22:07 ` Eduardo Felipe
2007-04-08 23:53 ` Natalia Portillo
2007-04-09 9:36 ` Eduardo Felipe
2007-04-09 21:19 ` Rob Landley
2007-04-10 11:24 ` Jamie Lokier
2007-04-10 12:00 ` Pierre d'Herbemont
2007-07-27 14:21 ` Dan Shearer
2007-07-27 14:29 ` Anthony Liguori
2007-07-27 14:34 ` Dan Shearer
2007-07-27 14:58 ` Sunil Amitkumar Janki
2007-07-27 15:12 ` Dan Shearer
2007-07-27 15:50 ` Sunil Amitkumar Janki
2007-07-27 16:04 ` Dan Shearer
2007-07-27 16:50 ` Jan Marten Simons
2007-07-27 18:51 ` Thiemo Seufer
2007-07-27 19:55 ` Sunil Amitkumar Janki
2007-07-28 10:17 ` Thiemo Seufer
2007-07-28 11:41 ` Sunil Amitkumar Janki
2007-07-28 12:43 ` [Qemu-devel] Re: QEMU Automated Testing Stefan Weil
2007-07-27 18:54 ` QEMU Automated Testing (was [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...) Andreas Färber
2007-07-28 10:36 ` Thiemo Seufer
2007-07-29 15:31 ` Andreas Färber
2007-04-10 11:17 ` IRQ handling " Jamie Lokier
2007-04-09 0:41 ` [Qemu-devel] Re: IRQ handling Paul Brook
2007-04-09 11:11 ` J. Mayer
2007-04-09 13:58 ` Paul Brook
2007-04-09 14:56 ` J. Mayer
2007-04-09 16:57 ` Paul Brook
2007-04-07 23:26 ` [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c Fabrice Bellard
2007-04-08 13:06 ` Wang Cheng Yeh
2007-04-08 13:56 ` Thiemo Seufer
2007-04-08 22:45 ` Paul Brook
2007-04-07 21:20 ` Thiemo Seufer
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=200704080013.14771.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=l_indien@magic.fr \
--cc=qemu-devel@nongnu.org \
/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).