From: Eric Auger <eric.auger@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Andrew Jones" <ajones@ventanamicro.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-arm@nongnu.org, "Udo Steinberg" <udo@hypervisor.org>,
"Shannon Zhao" <shannon.zhaosl@gmail.com>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Igor Mammedov" <imammedo@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Ani Sinha" <anisinha@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH-for-10.1 v3 4/9] hw/arm/virt-acpi: Factor its_enabled() helper out
Date: Mon, 7 Apr 2025 14:08:21 +0200 [thread overview]
Message-ID: <d5b9e64f-6fe3-4de9-ba4b-4cf3b61a5800@redhat.com> (raw)
In-Reply-To: <20250403204029.47958-5-philmd@linaro.org>
On 4/3/25 10:40 PM, Philippe Mathieu-Daudé wrote:
> GIC ITS is checked for the MADT and IORT tables.
> Factor the checks out to the its_enabled() helper.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Eric
> ---
> hw/arm/virt-acpi-build.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 9b7fc99f170..1c389ef5cdb 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -208,6 +208,13 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)
> #define ROOT_COMPLEX_ENTRY_SIZE 36
> #define IORT_NODE_OFFSET 48
>
> +static bool its_enabled(VirtMachineState *vms)
> +{
> + VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
> +
> + return !vmc->no_its;
> +}
> +
> /*
> * Append an ID mapping entry as described by "Table 4 ID mapping format" in
> * "IO Remapping Table System Software on ARM Platforms", Chapter 3.
> @@ -670,7 +677,6 @@ static void
> build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
> {
> int i;
> - VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
> const MemMapEntry *memmap = vms->memmap;
> AcpiTable table = { .sig = "APIC", .rev = 4, .oem_id = vms->oem_id,
> .oem_table_id = vms->oem_table_id };
> @@ -741,7 +747,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
> memmap[VIRT_HIGH_GIC_REDIST2].size);
> }
>
> - if (!vmc->no_its) {
> + if (its_enabled(vms)) {
> /*
> * ACPI spec, Revision 6.0 Errata A
> * (original 6.0 definition has invalid Length)
> @@ -973,7 +979,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
> vms->oem_table_id);
> }
>
> - if (!vmc->no_its) {
> + if (its_enabled(vms)) {
> acpi_add_table(table_offsets, tables_blob);
> build_iort(tables_blob, tables->linker, vms);
> }
next prev parent reply other threads:[~2025-04-07 12:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 20:40 [PATCH-for-10.1 v3 0/9] hw/arm: GIC ITS=off ACPI tables fixes Philippe Mathieu-Daudé
2025-04-03 20:40 ` [PATCH-for-10.1 v3 1/9] hw/arm/virt: Remove pointless VirtMachineState::tcg_its field Philippe Mathieu-Daudé
2025-04-07 11:57 ` Eric Auger
2025-04-03 20:40 ` [PATCH-for-10.1 v3 2/9] hw/intc/gicv3_its: Do not check its_class_name() for NULL Philippe Mathieu-Daudé
2025-04-07 11:57 ` Eric Auger
2025-04-03 20:40 ` [PATCH-for-10.1 v3 3/9] hw/arm/virt: Simplify create_its() Philippe Mathieu-Daudé
2025-04-04 2:59 ` Gustavo Romero
2025-04-07 12:05 ` Eric Auger
2025-04-03 20:40 ` [PATCH-for-10.1 v3 4/9] hw/arm/virt-acpi: Factor its_enabled() helper out Philippe Mathieu-Daudé
2025-04-07 12:08 ` Eric Auger [this message]
2025-04-03 20:40 ` [PATCH-for-10.1 v3 5/9] qtest/bios-tables-test: Add test for -M virt, its=off Philippe Mathieu-Daudé
2025-04-04 3:00 ` [PATCH-for-10.1 v3 5/9] qtest/bios-tables-test: Add test for -M virt,its=off Gustavo Romero
2025-04-07 12:55 ` Eric Auger
2025-04-03 20:40 ` [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs Philippe Mathieu-Daudé
2025-04-04 3:01 ` Gustavo Romero
2025-04-09 14:05 ` Igor Mammedov
2025-04-09 15:49 ` Gustavo Romero
2025-04-10 6:50 ` Igor Mammedov
2025-04-10 16:22 ` Gustavo Romero
2025-04-17 21:06 ` Gustavo Romero
2025-04-17 21:21 ` Michael S. Tsirkin
2025-05-06 15:36 ` Igor Mammedov
2025-04-03 20:40 ` [PATCH-for-10.1 v3 7/9] hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled) Philippe Mathieu-Daudé
2025-04-04 3:02 ` Gustavo Romero
2025-04-07 13:30 ` Eric Auger
2025-04-03 20:40 ` [PATCH-for-10.1 v3 8/9] hw/arm/virt-acpi: Do not advertise disabled GIC ITS Philippe Mathieu-Daudé
2025-04-03 20:40 ` [PATCH-for-10.1 v3 9/9] qtest/bios-tables-test: Update aarch64/virt 'its_off' variant blobs Philippe Mathieu-Daudé
2025-04-04 3:04 ` Gustavo Romero
2025-04-15 8:19 ` [PATCH-for-10.1 v3 0/9] hw/arm: GIC ITS=off ACPI tables fixes Philippe Mathieu-Daudé
2025-04-17 21:08 ` Gustavo Romero
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=d5b9e64f-6fe3-4de9-ba4b-4cf3b61a5800@redhat.com \
--to=eric.auger@redhat.com \
--cc=ajones@ventanamicro.com \
--cc=alex.bennee@linaro.org \
--cc=anisinha@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shannon.zhaosl@gmail.com \
--cc=udo@hypervisor.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).