mbox series

[PATCH-for-10.1,v4,0/8] hw/arm: GIC 'its=off' ACPI table fixes

Message ID 20250616131824.425315-1-gustavo.romero@linaro.org
Headers show
Series hw/arm: GIC 'its=off' ACPI table fixes | expand

Message

Gustavo Romero June 16, 2025, 1:18 p.m. UTC
Since v2:
- Fixed no_tcg_its inverted logic (rth)

Since v3:
- Fixed remappings in the IORT table when ITS is no present
- Rebased on master and resoled conflics, like no more "no_its"
  flag in VirtMachineClass
- Dropped patch 1/9 because we actually want the instance flags,
  not only the class flags, and the instance flags are the ones
  to be used often when deciding about the presence/absence of a
  machine feature, instead of the negated class flags ("no_*")
- Adapted the other patches that depended on 1/9
- Dropped patch 4/9 in favor of using the instance flag for
  checking if ITS is on or off
- Simplified VM options for the new "its=off" test

v1: https://lists.gnu.org/archive/html/qemu-devel/2025-03/msg07080.html
v2: https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00495.html (Patches 6/14 -> 14/14 in the series)
v3: https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00567.html

Fix ACPI tables for '-M its=off' CLI option and resolve the issue:

https://gitlab.com/qemu-project/qemu/-/issues/2886

Cheers,
Gustavo

Gustavo Romero (7):
  hw/intc/gicv3_its: Do not check its_class_name()
  hw/arm/virt: Simplify logic for setting instance's 'tcg_its' variable
  hw/arm/virt: Simplify create_its()
  hw/arm/virt-acpi-build: Fix comment in build_iort
  qtest/bios-tables-test: Add blobs for its=off test on aarch64
  hw/arm/virt-acpi-build: Fix ACPI IORT and MADT tables when its=off
  qtest/bios-tables-test: Update blobs for its=off test on aarch64

Philippe Mathieu-Daudé (1):
  qtest/bios-tables-test: Add test for when ITS is off on aarch64

 hw/arm/virt-acpi-build.c                  | 134 +++++++++++++---------
 hw/arm/virt.c                             |  25 ++--
 include/hw/intc/arm_gicv3_its_common.h    |   2 +-
 tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 164 bytes
 tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 172 bytes
 tests/qtest/bios-tables-test.c            |  21 ++++
 6 files changed, 113 insertions(+), 69 deletions(-)
 create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off
 create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off

Comments

Eric Auger June 17, 2025, 9:35 a.m. UTC | #1
Hi Gustavo,

On 6/16/25 3:18 PM, Gustavo Romero wrote:
> Since v2:
> - Fixed no_tcg_its inverted logic (rth)
>
> Since v3:
> - Fixed remappings in the IORT table when ITS is no present
> - Rebased on master and resoled conflics, like no more "no_its"
>   flag in VirtMachineClass
> - Dropped patch 1/9 because we actually want the instance flags,
>   not only the class flags, and the instance flags are the ones
>   to be used often when deciding about the presence/absence of a
>   machine feature, instead of the negated class flags ("no_*")
> - Adapted the other patches that depended on 1/9
> - Dropped patch 4/9 in favor of using the instance flag for
>   checking if ITS is on or off
> - Simplified VM options for the new "its=off" test
>
> v1: https://lists.gnu.org/archive/html/qemu-devel/2025-03/msg07080.html
> v2: https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00495.html (Patches 6/14 -> 14/14 in the series)
> v3: https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00567.html
>
> Fix ACPI tables for '-M its=off' CLI option and resolve the issue:
>
> https://gitlab.com/qemu-project/qemu/-/issues/2886

One first comment is that this series will collide with Shameer's SMMU
multi instance series which has been lunder review for quite some time
(adding him in TO):

I think it may be more future proof if you could rebase on it - I know
it is a pain ;-( -. Or if sbdy objects for Shameer's series please raise
your voice now.

[PATCH v4 0/7] hw/arm/virt: Add support for user creatable SMMUv3 device <https://lore.kernel.org/all/20250613144449.60156-1-shameerali.kolothum.thodi@huawei.com/#r>

https://lore.kernel.org/all/20250613144449.60156-1-shameerali.kolothum.thodi@huawei.com/

Also I understood Shameer intended to write some new bios-tables-test.

Thanks

Eric

>
> Cheers,
> Gustavo
>
> Gustavo Romero (7):
>   hw/intc/gicv3_its: Do not check its_class_name()
>   hw/arm/virt: Simplify logic for setting instance's 'tcg_its' variable
>   hw/arm/virt: Simplify create_its()
>   hw/arm/virt-acpi-build: Fix comment in build_iort
>   qtest/bios-tables-test: Add blobs for its=off test on aarch64
>   hw/arm/virt-acpi-build: Fix ACPI IORT and MADT tables when its=off
>   qtest/bios-tables-test: Update blobs for its=off test on aarch64
>
> Philippe Mathieu-Daudé (1):
>   qtest/bios-tables-test: Add test for when ITS is off on aarch64
>
>  hw/arm/virt-acpi-build.c                  | 134 +++++++++++++---------
>  hw/arm/virt.c                             |  25 ++--
>  include/hw/intc/arm_gicv3_its_common.h    |   2 +-
>  tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 164 bytes
>  tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 172 bytes
>  tests/qtest/bios-tables-test.c            |  21 ++++
>  6 files changed, 113 insertions(+), 69 deletions(-)
>  create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off
>  create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
>
Gustavo Romero June 17, 2025, 1:01 p.m. UTC | #2
Hi Eric,

Thanks a lot for doing a first pass on this series!

On 6/17/25 06:35, Eric Auger wrote:
> Hi Gustavo,
> 
> On 6/16/25 3:18 PM, Gustavo Romero wrote:
>> Since v2:
>> - Fixed no_tcg_its inverted logic (rth)
>>
>> Since v3:
>> - Fixed remappings in the IORT table when ITS is no present
>> - Rebased on master and resoled conflics, like no more "no_its"
>>    flag in VirtMachineClass
>> - Dropped patch 1/9 because we actually want the instance flags,
>>    not only the class flags, and the instance flags are the ones
>>    to be used often when deciding about the presence/absence of a
>>    machine feature, instead of the negated class flags ("no_*")
>> - Adapted the other patches that depended on 1/9
>> - Dropped patch 4/9 in favor of using the instance flag for
>>    checking if ITS is on or off
>> - Simplified VM options for the new "its=off" test
>>
>> v1: https://lists.gnu.org/archive/html/qemu-devel/2025-03/msg07080.html
>> v2: https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00495.html (Patches 6/14 -> 14/14 in the series)
>> v3: https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00567.html
>>
>> Fix ACPI tables for '-M its=off' CLI option and resolve the issue:
>>
>> https://gitlab.com/qemu-project/qemu/-/issues/2886
> 
> One first comment is that this series will collide with Shameer's SMMU
> multi instance series which has been lunder review for quite some time
> (adding him in TO):
> 
> I think it may be more future proof if you could rebase on it - I know
> it is a pain ;-( -. Or if sbdy objects for Shameer's series please raise
> your voice now.
> 
> [PATCH v4 0/7] hw/arm/virt: Add support for user creatable SMMUv3 device <https://lore.kernel.org/all/20250613144449.60156-1-shameerali.kolothum.thodi@huawei.com/#r>
> 
> https://lore.kernel.org/all/20250613144449.60156-1-shameerali.kolothum.thodi@huawei.com/

ayayay, life is never that easy! :)

Thanks for point that out. Sure, I can rebase it on Shameer's series, but also
I'd like to have this ITS fix for 10.1, so I think it's a matter of understanding
if Shameer's series will make the 10.1 release (thanks for asking the reviewers if they
have any current objection so we have an idea if it's close to get accepted
or not)?

Meanwhile, I'm pretty keen on if I'm correctly generating the IORT table pruned from ITS
(patch 7/8 in this series), like, are the remappings for the RC and SMMU nodes correct? That
would make me more comfortable to start working on a rebase.


> Also I understood Shameer intended to write some new bios-tables-test.

I see.


Cheers,
Gustavo
Eric Auger June 17, 2025, 1:26 p.m. UTC | #3
Hi Gustavo,

On 6/17/25 3:01 PM, Gustavo Romero wrote:
> Hi Eric,
>
> Thanks a lot for doing a first pass on this series!
>
> On 6/17/25 06:35, Eric Auger wrote:
>> Hi Gustavo,
>>
>> On 6/16/25 3:18 PM, Gustavo Romero wrote:
>>> Since v2:
>>> - Fixed no_tcg_its inverted logic (rth)
>>>
>>> Since v3:
>>> - Fixed remappings in the IORT table when ITS is no present
>>> - Rebased on master and resoled conflics, like no more "no_its"
>>>    flag in VirtMachineClass
>>> - Dropped patch 1/9 because we actually want the instance flags,
>>>    not only the class flags, and the instance flags are the ones
>>>    to be used often when deciding about the presence/absence of a
>>>    machine feature, instead of the negated class flags ("no_*")
>>> - Adapted the other patches that depended on 1/9
>>> - Dropped patch 4/9 in favor of using the instance flag for
>>>    checking if ITS is on or off
>>> - Simplified VM options for the new "its=off" test
>>>
>>> v1: https://lists.gnu.org/archive/html/qemu-devel/2025-03/msg07080.html
>>> v2:
>>> https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00495.html
>>> (Patches 6/14 -> 14/14 in the series)
>>> v3: https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg00567.html
>>>
>>> Fix ACPI tables for '-M its=off' CLI option and resolve the issue:
>>>
>>> https://gitlab.com/qemu-project/qemu/-/issues/2886
>>
>> One first comment is that this series will collide with Shameer's SMMU
>> multi instance series which has been lunder review for quite some time
>> (adding him in TO):
>>
>> I think it may be more future proof if you could rebase on it - I know
>> it is a pain ;-( -. Or if sbdy objects for Shameer's series please raise
>> your voice now.
>>
>> [PATCH v4 0/7] hw/arm/virt: Add support for user creatable SMMUv3
>> device
>> <https://lore.kernel.org/all/20250613144449.60156-1-shameerali.kolothum.thodi@huawei.com/#r>
>>
>> https://lore.kernel.org/all/20250613144449.60156-1-shameerali.kolothum.thodi@huawei.com/
>>
>
> ayayay, life is never that easy! :)
>
> Thanks for point that out. Sure, I can rebase it on Shameer's series,
> but also
> I'd like to have this ITS fix for 10.1, so I think it's a matter of
> understanding
> if Shameer's series will make the 10.1 release (thanks for asking the
> reviewers if they
> have any current objection so we have an idea if it's close to get
> accepted
> or not)?
Peter was the most annoyed by the usage of -device arm-smmuv3 option
line. We'd better ask him.

On my end I don't see how we can achieve this more elegantly.
>
> Meanwhile, I'm pretty keen on if I'm correctly generating the IORT
> table pruned from ITS
> (patch 7/8 in this series), like, are the remappings for the RC and
> SMMU nodes correct? That
> would make me more comfortable to start working on a rebase.
sure looking at it...

Eric
>
>
>> Also I understood Shameer intended to write some new bios-tables-test.
>
> I see.
>
>
> Cheers,
> Gustavo
>