From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, anthony@codemonkey.ws
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/7] pseries: Add support for level interrupts to XICS
Date: Wed, 7 Mar 2012 16:43:40 +1100 [thread overview]
Message-ID: <20120307054340.GJ1929@truffala.fritz.box> (raw)
In-Reply-To: <643A6BE7-F625-43B8-8F7C-C4B2A5A87AED@suse.de>
On Wed, Mar 07, 2012 at 12:30:40AM +0100, Alexander Graf wrote:
>
> On 28.02.2012, at 04:18, David Gibson wrote:
>
> > The pseries "xics" interrupt controller, like most interrupt
> > controllers can support both message (i.e. edge sensitive) interrupts
> > and level sensitive interrupts, but it needs to know which are which.
> >
> > When I implemented the xics emulation for qemu, the only devices we
> > supported were the PAPR virtual IO devices. These devices only use
> > message interrupts, so they were the only ones I implemented in xics.
> >
> > Since then, however, we have added support for PCI devices, which use
> > level sensitive interrupts. It turns out the message interrupt logic
> > still actually works most of the time for these, but there are
> > circumstances where we can lost interrupts due to the incorrect
> > interrupt logic.
> >
> > This patch, therefore, implements the correct xics level-sensitive
> > interrupt logic. The type of the interrupt is set when a device
> > allocates a new xics interrupt.
> >
> > Signed-off-by: David Gibson <david@gibson@.dropbear.id.au>
>
> This looks wrong
Oops, I'll fix that up.
>
> > ---
> > hw/spapr.c | 4 +-
> > hw/spapr.h | 12 +++++-
> > hw/spapr_pci.c | 2 +-
> > hw/spapr_vio.c | 2 +-
> > hw/xics.c | 122 +++++++++++++++++++++++++++++++++++++++++---------------
> > hw/xics.h | 2 +-
> > 6 files changed, 106 insertions(+), 38 deletions(-)
> >
> > diff --git a/hw/spapr.c b/hw/spapr.c
> > index dffb6a2..828bc53 100644
> > --- a/hw/spapr.c
> > +++ b/hw/spapr.c
> > @@ -83,7 +83,7 @@
> >
> > sPAPREnvironment *spapr;
> >
> > -qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num)
> > +qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num, int lsi)
> > {
> > uint32_t irq;
> > qemu_irq qirq;
> > @@ -95,7 +95,7 @@ qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num)
> > irq = spapr->next_irq++;
> > }
> >
> > - qirq = xics_find_qirq(spapr->icp, irq);
> > + qirq = xics_assign_irq(spapr->icp, irq, lsi);
>
> Find becomes assign? Is this on purpose?
Yes. Previously xics_find_qirq() just returned the qmeu_irq
associated with a given xics irq number, without changing any state.
Now it also flags whether the irq is an lsi or msi, so the old name
didn't seem right any more.
> While at it, could you make the "lsi" thing an enum? That'd make
> things easier to track :).
Ok, will do.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2012-03-07 5:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 3:18 [Qemu-devel] [0/7] pseries and Power updates David Gibson
2012-02-28 3:18 ` [Qemu-devel] [PATCH 1/7] pseries: Don't try to munmap() a malloc()ed TCE table David Gibson
2012-02-28 3:18 ` [Qemu-devel] [PATCH 2/7] PPC64: Add support for ldbrx and stdbrx instructions David Gibson
2012-02-28 3:18 ` [Qemu-devel] [PATCH 3/7] pseries: Add support for level interrupts to XICS David Gibson
2012-03-06 23:30 ` Alexander Graf
2012-03-07 5:43 ` David Gibson [this message]
2012-02-28 3:18 ` [Qemu-devel] [PATCH 4/7] pseries: Update SLOF firmware image David Gibson
2012-02-28 3:18 ` [Qemu-devel] [PATCH 5/7] pseries: Remove unused constant from PCI code David Gibson
2012-02-28 3:18 ` [Qemu-devel] [PATCH 6/7] pseries: Remove PCI device from PCI host bridge code David Gibson
2012-02-28 3:18 ` [Qemu-devel] [PATCH 7/7] pseries: Configure PCI bridge using properties David Gibson
2012-03-03 18:42 ` Andreas Färber
2012-03-06 5:22 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2012-03-06 23:35 ` [Qemu-devel] [0/7] pseries and Power updates Alexander Graf
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=20120307054340.GJ1929@truffala.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).