From: Andrew Jones <drjones@redhat.com>
To: Eric Auger <eric.auger@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org,
qemu-arm@nongnu.org, f4bug@amsat.org, eric.auger.pro@gmail.com
Subject: Re: [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
Date: Wed, 9 Mar 2022 08:14:05 +0100 [thread overview]
Message-ID: <20220309071405.z2j2hcpzkbvwl3zh@gator> (raw)
In-Reply-To: <20220308182452.223473-3-eric.auger@redhat.com>
On Tue, Mar 08, 2022 at 07:24:52PM +0100, Eric Auger wrote:
> In TCG mode, if gic-version=max we always select GICv3 even if
> CONFIG_ARM_GICV3_TCG is unset. We shall rather select GICv2.
> This also brings the benefit of fixing qos tests errors for tests
> using gic-version=max with CONFIG_ARM_GICV3_TCG unset.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>
> ---
>
> v2 -> v3:
> - Use module_object_class_by_name() and refer to the renamed
> CONFIG_ARM_GICV3_TCG config
> ---
> hw/arm/virt.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 46bf7ceddf..39790d29d2 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -1852,7 +1852,12 @@ static void finalize_gic_version(VirtMachineState *vms)
> vms->gic_version = VIRT_GIC_VERSION_2;
> break;
> case VIRT_GIC_VERSION_MAX:
> - vms->gic_version = VIRT_GIC_VERSION_3;
> + if (module_object_class_by_name("arm-gicv3")) {
> + /* CONFIG_ARM_GICV3_TCG was set */
> + vms->gic_version = VIRT_GIC_VERSION_3;
> + } else {
> + vms->gic_version = VIRT_GIC_VERSION_2;
> + }
> break;
> case VIRT_GIC_VERSION_HOST:
> error_report("gic-version=host requires KVM");
> --
> 2.26.3
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
next prev parent reply other threads:[~2022-03-09 7:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 18:24 [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset Eric Auger
2022-03-08 18:24 ` [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG Eric Auger
2022-03-09 7:13 ` Andrew Jones
2022-03-08 18:24 ` [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset Eric Auger
2022-03-09 7:14 ` Andrew Jones [this message]
2022-03-15 18:39 ` Philippe Mathieu-Daudé
2022-03-15 18:09 ` [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG " Peter Maydell
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=20220309071405.z2j2hcpzkbvwl3zh@gator \
--to=drjones@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=eric.auger@redhat.com \
--cc=f4bug@amsat.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.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).