[PATCH v2 0/3] Refactor PPI logic/definitions for virt/sbsa-ref

Leif Lindholm posted 3 patches 7 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230919090229.188092-1-quic._5Fllindhol@quicinc.com
Maintainers: Radoslaw Biernacki <rad@semihalf.com>, Peter Maydell <peter.maydell@linaro.org>, Leif Lindholm <quic_llindhol@quicinc.com>, Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>, Shannon Zhao <shannon.zhaosl@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>
hw/arm/sbsa-ref.c        | 20 +++++++++-----------
hw/arm/virt-acpi-build.c | 12 ++++++------
hw/arm/virt.c            | 24 ++++++++++++++----------
include/hw/arm/bsa.h     | 37 +++++++++++++++++++++++++++++++++++++
include/hw/arm/virt.h    | 12 +-----------
5 files changed, 67 insertions(+), 38 deletions(-)
create mode 100644 include/hw/arm/bsa.h
[PATCH v2 0/3] Refactor PPI logic/definitions for virt/sbsa-ref
Posted by Leif Lindholm 7 months, 2 weeks ago
This set reworks the handling of private peripheral interrupts in virt
to use INTIDs instead of PPI IDs, to make it easier to cross reference
against Arm's Base System Architecture specification.

It then breaks those definitions out into a separate header and switches
sbsa-ref to use the same header instead of defining its own values
locally.

Changes since v1:
- Replaced PPI macro with PPI_TO_INTID/INTID_TO_PPI macros.
- Fixed a few missing changes to interrupt translation (some reported
  by Peter, some I found when I searched more properly)
- Changed ppibase to intidbase in gic creation instead of doing the
  translation, as suggested by Peter.
- Added explicit comment that listed IDs are INTIDs.

Changes since RFC:
- Compilation tested
- Reordered patches 1-2 as suggested by Philippe.

Leif Lindholm (3):
  {include/}hw/arm: refactor virt PPI logic
  include/hw/arm: move BSA definitions to bsa.h
  hw/arm/sbsa-ref: use bsa.h for PPI definitions

 hw/arm/sbsa-ref.c        | 20 +++++++++-----------
 hw/arm/virt-acpi-build.c | 12 ++++++------
 hw/arm/virt.c            | 24 ++++++++++++++----------
 include/hw/arm/bsa.h     | 37 +++++++++++++++++++++++++++++++++++++
 include/hw/arm/virt.h    | 12 +-----------
 5 files changed, 67 insertions(+), 38 deletions(-)
 create mode 100644 include/hw/arm/bsa.h

-- 
2.30.2
Re: [PATCH v2 0/3] Refactor PPI logic/definitions for virt/sbsa-ref
Posted by Peter Maydell 6 months, 2 weeks ago
On Tue, 19 Sept 2023 at 10:02, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> This set reworks the handling of private peripheral interrupts in virt
> to use INTIDs instead of PPI IDs, to make it easier to cross reference
> against Arm's Base System Architecture specification.
>
> It then breaks those definitions out into a separate header and switches
> sbsa-ref to use the same header instead of defining its own values
> locally.

I've applied these patches, with a few tweaks to patch 2:
 * the macro PPI_TO_INTID is unused, so I dropped it
 * I sorted the defines into numerical order
 * I added ARCH_TIMER_NS_EL2_VIRT_IRQ, which fixes up a
   minor conflict with the recent sbsa-ref change which added
   use of that IRQ

Applied to target-arm.next, thanks.

-- PMM