From: Phil Dennis-Jordan <phil@philjordan.eu>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-arm@nongnu.org
Subject: Re: [PATCH 2/2] hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available
Date: Tue, 7 Jan 2025 17:05:48 +0100 [thread overview]
Message-ID: <CAAibmn1g6+btdRX99ZUvbaBm7hP_AnAGNfDHz4Wgi3fPn=waOw@mail.gmail.com> (raw)
In-Reply-To: <CAAibmn0zhrZjZ+SL7n7eg041a5APx-o4sCAp0YGDiwUk8gpgDA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]
On Sat, 28 Dec 2024 at 11:48, Phil Dennis-Jordan <phil@philjordan.eu> wrote:
>
>
> On Fri, 27 Dec 2024 at 21:24, Philippe Mathieu-Daudé <philmd@linaro.org>
> wrote:
>
>> When the KVM accelerator is selected, the Kconfig ARM_GIC key
>> selects the KVM GIC implementation (ARM_GIC_KVM).
>> For other accelerators (TCG, HVF, ...), select the generic
>> implementation.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> hw/intc/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
>> index 7547528f2c2..762139d8df3 100644
>> --- a/hw/intc/Kconfig
>> +++ b/hw/intc/Kconfig
>> @@ -23,7 +23,7 @@ config APIC
>>
>> config ARM_GIC
>> bool
>> - select ARM_GICV3 if TCG
>> + select ARM_GICV3 if !KVM
>>
>
> Wouldn't this disable the ARM_GICV3 by default when building with
> --enable-tcg --enable-kvm? And then there would be no GIC available when
> running the built QEMU in TCG mode. (Bear with me, I'm a relative Meson
> newbie.)
>
>
OK, I've managed to answer my own question now by setting up a RPi5 with
aarch64 RPOS and building QEMU on that with --enable-kvm --enable-tcg. With
patch 1/2 applied on current upstream master, I get:
$ build/qemu-system-aarch64 -accel tcg -M virt,gic-version=3 -smp 4 -m 4G
*[runs successfully]*
with 2/2 applied as well:
$ build/qemu-system-aarch64 -accel tcg -M virt,gic-version=3 -smp 4 -m 4G
qemu-system-aarch64: tcg does not support GICv3 emulation
$
In other words, with the proposed change, ARM_GICV3 is indeed deselected if
KVM is selected even if TCG is also selected.
Possibly very basic question: is there any support for kernel-irqchip=off
on aarch64/KVM?
If yes, don't we need ARM_GICV3 in that case anyway, so we should drop any
accel dependency on it in the first place?
If we definitely don't need the software GIC in KVM-only builds, I guess
we're down to listing each accel that needs it individually. Is that:
select ARM_GICV3 if TCG || HVF || NVMM || WHPX || XEN_EMU || XEN
or can we drop any of those? Have I missed anything? What about QTest?
[-- Attachment #2: Type: text/html, Size: 3474 bytes --]
next prev parent reply other threads:[~2025-01-07 16:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-27 20:24 [PATCH 0/2] hw/intc: Select generic ARM_GICV3 when KVM is not available Philippe Mathieu-Daudé
2024-12-27 20:24 ` [PATCH 1/2] hw/intc: Remove TCG dependency on ARM_GICV3 Philippe Mathieu-Daudé
2024-12-28 10:45 ` Phil Dennis-Jordan
2024-12-27 20:24 ` [PATCH 2/2] hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available Philippe Mathieu-Daudé
2024-12-28 10:48 ` Phil Dennis-Jordan
2025-01-07 16:05 ` Phil Dennis-Jordan [this message]
2025-02-19 13:42 ` Philippe Mathieu-Daudé
2025-03-03 15:34 ` [PATCH 0/2] hw/intc: Select generic " Philippe Mathieu-Daudé
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='CAAibmn1g6+btdRX99ZUvbaBm7hP_AnAGNfDHz4Wgi3fPn=waOw@mail.gmail.com' \
--to=phil@philjordan.eu \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@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).