[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/3] spapr: introduce a fixed IRQ number spac
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/3] spapr: introduce a fixed IRQ number space |
Date: |
Wed, 20 Jun 2018 10:19:19 +1000 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Tue, Jun 19, 2018 at 12:05:21PM +0200, Cédric Le Goater wrote:
> On 06/19/2018 03:02 AM, David Gibson wrote:
> > On Mon, Jun 18, 2018 at 07:34:02PM +0200, Cédric Le Goater wrote:
> >> This proposal introduces a new IRQ number space layout using static
> >> numbers for all devices and a bitmap allocator for the MSI numbers
> >> which are negotiated by the guest at runtime.
> >>
> >> The previous layout is kept in machines raising the 'xics_legacy'
> >> flag.
> >>
> >> Signed-off-by: Cédric Le Goater <address@hidden>
> >> ---
> >> include/hw/ppc/spapr.h | 4 ++++
> >> include/hw/ppc/spapr_irq.h | 30 +++++++++++++++++++++++++
> >> hw/ppc/spapr.c | 31 +++++++++++++++++++++++++
> >> hw/ppc/spapr_events.c | 12 ++++++++--
> >> hw/ppc/spapr_irq.c | 56
> >> ++++++++++++++++++++++++++++++++++++++++++++++
> >> hw/ppc/spapr_pci.c | 28 ++++++++++++++++++-----
> >> hw/ppc/spapr_vio.c | 19 ++++++++++++----
> >> hw/ppc/Makefile.objs | 2 +-
> >> 8 files changed, 169 insertions(+), 13 deletions(-)
> >> create mode 100644 include/hw/ppc/spapr_irq.h
> >> create mode 100644 hw/ppc/spapr_irq.c
> >>
> >> diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> >> index 9decc66a1915..4c63b1fac13b 100644
> >> --- a/include/hw/ppc/spapr.h
> >> +++ b/include/hw/ppc/spapr.h
> >> @@ -7,6 +7,7 @@
> >> #include "hw/ppc/spapr_drc.h"
> >> #include "hw/mem/pc-dimm.h"
> >> #include "hw/ppc/spapr_ovec.h"
> >> +#include "hw/ppc/spapr_irq.h"
> >>
> >> struct VIOsPAPRBus;
> >> struct sPAPRPHBState;
> >> @@ -164,6 +165,9 @@ struct sPAPRMachineState {
> >> char *kvm_type;
> >>
> >> const char *icp_type;
> >> + bool xics_legacy;
> >
> > This flag can go in the class, rather than the instance.
> >
> > And maybe call it 'legacy_irq_allocation'. It assumes XICS, but
> > otherwise isn't strongly tied to it.
>
> Here's another idea.
>
> Instead of a bool, we could use a find() operation if it is defined
> by the spapr_irq backend.
So, I don't think find() should go into the irq backend you've been
describing elsewhere. I think that should be restricted to the
claim() side stuff. But you could make it a sPAPRMachineClass method,
and use the static allocations if it's NULL.
--
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
signature.asc
Description: PGP signature