[PATCH v4 00/19] spapr: IRQ subsystem cleanup

David Gibson posted 19 patches 1 week ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191009060818.29719-1-david@gibson.dropbear.id.au
Maintainers: David Gibson <david@gibson.dropbear.id.au>, "Cédric Le Goater" <clg@kaod.org>
hw/intc/spapr_xive.c                | 295 ++++++++----
hw/intc/spapr_xive_kvm.c            |  22 +-
hw/intc/xics.c                      |  10 +
hw/intc/xics_kvm.c                  |   9 +-
hw/intc/xics_spapr.c                | 110 ++++-
hw/intc/xive.c                      |  15 +
hw/ppc/spapr.c                      |  52 ++-
hw/ppc/spapr_caps.c                 |  64 +++
hw/ppc/spapr_cpu_core.c             |   3 +-
hw/ppc/spapr_hcall.c                |   7 +-
hw/ppc/spapr_irq.c                  | 668 +++++++++-------------------
hw/ppc/spapr_pci.c                  |  16 +-
include/hw/pci-host/spapr.h         |   4 +-
include/hw/ppc/spapr.h              |  17 +-
include/hw/ppc/spapr_irq.h          |  72 +--
include/hw/ppc/spapr_xive.h         |   9 +-
include/hw/ppc/xics_spapr.h         |   6 +-
target/ppc/translate/vmx-impl.inc.c |  84 ++--
18 files changed, 769 insertions(+), 694 deletions(-)

[PATCH v4 00/19] spapr: IRQ subsystem cleanup

Posted by David Gibson 1 week ago
This is a substantial rework to clean up the handling of IRQs in
spapr.  It includes some cleanups to both the XICS and XIVE interrupt
controller backends, as well as more to the common spapr irq handling
infrastructure.

The last two patches of this series, dealing with VFIO devices, are
RFC only - there some problems that I'm discussing with Alex
Williamson.

Changes since v3:
 * Further minor tweaks to error handling
 * Other minor polishes from feedback
 * Added some patches to address VFIO irq routing
 * Removed the first ~20 patches, which are now merged

Changes since v2:
 * Fixed a bug where the "move handling multiple irq frees" to
   frontend patch was actually freeing one irq over and over, rather
   than freeing multiple irqs
 * Fixed some places I missed still using only-Error * style, and flow
   on adjustments
 * New idiom to iterate across all constructed backends for the things
   that need that (cpu_intc_create, claim & freem), rather than
   open-coding a call on the xics, then xive versions.

Changes since v1:
 * Lots of extra patches
 * Many minor adjustments based on feedback
 * Moved towards return value + Error * style, instead of just Error *
   style

David Gibson (16):
  spapr, xics, xive: Introduce SpaprInterruptController QOM interface
  spapr, xics, xive: Move cpu_intc_create from SpaprIrq to
    SpaprInterruptController
  spapr, xics, xive: Move irq claim and free from SpaprIrq to
    SpaprInterruptController
  spapr: Formalize notion of active interrupt controller
  spapr, xics, xive: Move set_irq from SpaprIrq to
    SpaprInterruptController
  spapr, xics, xive: Move print_info from SpaprIrq to
    SpaprInterruptController
  spapr, xics, xive: Move dt_populate from SpaprIrq to
    SpaprInterruptController
  spapr, xics, xive: Match signatures for XICS and XIVE KVM connect
    routines
  spapr: Remove SpaprIrq::init_kvm hook
  spapr, xics, xive: Move SpaprIrq::reset hook logic into
    activate/deactivate
  spapr, xics, xive: Move SpaprIrq::post_load hook to backends
  spapr: Remove SpaprIrq::nr_msis
  spapr: Move SpaprIrq::nr_xirqs to SpaprMachineClass
  spapr: Remove last pieces of SpaprIrq
  spapr: Handle irq backend changes with VFIO PCI devices
  spapr: Work around spurious warnings from vfio INTx initialization

Greg Kurz (2):
  xive: Make some device types not user creatable
  xics: Make some device types not user creatable

Stefan Brankovic (1):
  target/ppc: Fix for optimized vsl/vsr instructions

 hw/intc/spapr_xive.c                | 295 ++++++++----
 hw/intc/spapr_xive_kvm.c            |  22 +-
 hw/intc/xics.c                      |  10 +
 hw/intc/xics_kvm.c                  |   9 +-
 hw/intc/xics_spapr.c                | 110 ++++-
 hw/intc/xive.c                      |  15 +
 hw/ppc/spapr.c                      |  52 ++-
 hw/ppc/spapr_caps.c                 |  64 +++
 hw/ppc/spapr_cpu_core.c             |   3 +-
 hw/ppc/spapr_hcall.c                |   7 +-
 hw/ppc/spapr_irq.c                  | 668 +++++++++-------------------
 hw/ppc/spapr_pci.c                  |  16 +-
 include/hw/pci-host/spapr.h         |   4 +-
 include/hw/ppc/spapr.h              |  17 +-
 include/hw/ppc/spapr_irq.h          |  72 +--
 include/hw/ppc/spapr_xive.h         |   9 +-
 include/hw/ppc/xics_spapr.h         |   6 +-
 target/ppc/translate/vmx-impl.inc.c |  84 ++--
 18 files changed, 769 insertions(+), 694 deletions(-)

-- 
2.21.0


Re: [PATCH v4 00/19] spapr: IRQ subsystem cleanup

Posted by David Gibson 1 week ago
On Wed, Oct 09, 2019 at 05:07:59PM +1100, David Gibson wrote:
> This is a substantial rework to clean up the handling of IRQs in
> spapr.  It includes some cleanups to both the XICS and XIVE interrupt
> controller backends, as well as more to the common spapr irq handling
> infrastructure.
> 
> The last two patches of this series, dealing with VFIO devices, are
> RFC only - there some problems that I'm discussing with Alex
> Williamson.

Oops, I screwed up my base branch selection for git-publish - patches
1..3 aren't supposed to be in this series (although 1..2 fit well
enough thematically).

-- 
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

Re: [PATCH v4 00/19] spapr: IRQ subsystem cleanup

Posted by Greg Kurz 5 days ago
On Wed,  9 Oct 2019 17:07:59 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> This is a substantial rework to clean up the handling of IRQs in
> spapr.  It includes some cleanups to both the XICS and XIVE interrupt
> controller backends, as well as more to the common spapr irq handling
> infrastructure.
> 

Patches up to 16 have been reviewed. Any chance you merge them before
soft freeze (12 days left) ?

> The last two patches of this series, dealing with VFIO devices, are
> RFC only - there some problems that I'm discussing with Alex
> Williamson.
> 
> Changes since v3:
>  * Further minor tweaks to error handling
>  * Other minor polishes from feedback
>  * Added some patches to address VFIO irq routing
>  * Removed the first ~20 patches, which are now merged
> 
> Changes since v2:
>  * Fixed a bug where the "move handling multiple irq frees" to
>    frontend patch was actually freeing one irq over and over, rather
>    than freeing multiple irqs
>  * Fixed some places I missed still using only-Error * style, and flow
>    on adjustments
>  * New idiom to iterate across all constructed backends for the things
>    that need that (cpu_intc_create, claim & freem), rather than
>    open-coding a call on the xics, then xive versions.
> 
> Changes since v1:
>  * Lots of extra patches
>  * Many minor adjustments based on feedback
>  * Moved towards return value + Error * style, instead of just Error *
>    style
> 
> David Gibson (16):
>   spapr, xics, xive: Introduce SpaprInterruptController QOM interface
>   spapr, xics, xive: Move cpu_intc_create from SpaprIrq to
>     SpaprInterruptController
>   spapr, xics, xive: Move irq claim and free from SpaprIrq to
>     SpaprInterruptController
>   spapr: Formalize notion of active interrupt controller
>   spapr, xics, xive: Move set_irq from SpaprIrq to
>     SpaprInterruptController
>   spapr, xics, xive: Move print_info from SpaprIrq to
>     SpaprInterruptController
>   spapr, xics, xive: Move dt_populate from SpaprIrq to
>     SpaprInterruptController
>   spapr, xics, xive: Match signatures for XICS and XIVE KVM connect
>     routines
>   spapr: Remove SpaprIrq::init_kvm hook
>   spapr, xics, xive: Move SpaprIrq::reset hook logic into
>     activate/deactivate
>   spapr, xics, xive: Move SpaprIrq::post_load hook to backends
>   spapr: Remove SpaprIrq::nr_msis
>   spapr: Move SpaprIrq::nr_xirqs to SpaprMachineClass
>   spapr: Remove last pieces of SpaprIrq
>   spapr: Handle irq backend changes with VFIO PCI devices
>   spapr: Work around spurious warnings from vfio INTx initialization
> 
> Greg Kurz (2):
>   xive: Make some device types not user creatable
>   xics: Make some device types not user creatable
> 
> Stefan Brankovic (1):
>   target/ppc: Fix for optimized vsl/vsr instructions
> 
>  hw/intc/spapr_xive.c                | 295 ++++++++----
>  hw/intc/spapr_xive_kvm.c            |  22 +-
>  hw/intc/xics.c                      |  10 +
>  hw/intc/xics_kvm.c                  |   9 +-
>  hw/intc/xics_spapr.c                | 110 ++++-
>  hw/intc/xive.c                      |  15 +
>  hw/ppc/spapr.c                      |  52 ++-
>  hw/ppc/spapr_caps.c                 |  64 +++
>  hw/ppc/spapr_cpu_core.c             |   3 +-
>  hw/ppc/spapr_hcall.c                |   7 +-
>  hw/ppc/spapr_irq.c                  | 668 +++++++++-------------------
>  hw/ppc/spapr_pci.c                  |  16 +-
>  include/hw/pci-host/spapr.h         |   4 +-
>  include/hw/ppc/spapr.h              |  17 +-
>  include/hw/ppc/spapr_irq.h          |  72 +--
>  include/hw/ppc/spapr_xive.h         |   9 +-
>  include/hw/ppc/xics_spapr.h         |   6 +-
>  target/ppc/translate/vmx-impl.inc.c |  84 ++--
>  18 files changed, 769 insertions(+), 694 deletions(-)
> 


Re: [PATCH v4 00/19] spapr: IRQ subsystem cleanup

Posted by David Gibson 4 days ago
On Wed, Oct 16, 2019 at 06:04:04PM +0200, Greg Kurz wrote:
> On Wed,  9 Oct 2019 17:07:59 +1100
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > This is a substantial rework to clean up the handling of IRQs in
> > spapr.  It includes some cleanups to both the XICS and XIVE interrupt
> > controller backends, as well as more to the common spapr irq handling
> > infrastructure.
> > 
> 
> Patches up to 16 have been reviewed. Any chance you merge them before
> soft freeze (12 days left) ?

Seems reasonable, merged to ppc-for-4.2.

-- 
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