* [PATCH 0/2] hw/intc: Select generic ARM_GICV3 when KVM is not available @ 2024-12-27 20:24 Philippe Mathieu-Daudé 2024-12-27 20:24 ` [PATCH 1/2] hw/intc: Remove TCG dependency on ARM_GICV3 Philippe Mathieu-Daudé ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2024-12-27 20:24 UTC (permalink / raw) To: qemu-devel Cc: Peter Maydell, Phil Dennis-Jordan, Paolo Bonzini, qemu-arm, Philippe Mathieu-Daudé ARM_GICV3 is not restricted to TCG and can be used on HVF. Philippe Mathieu-Daudé (2): hw/intc: Remove TCG dependency on ARM_GICV3 hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available hw/intc/Kconfig | 6 +++--- hw/intc/meson.build | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.47.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] hw/intc: Remove TCG dependency on ARM_GICV3 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 ` 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é 2025-03-03 15:34 ` [PATCH 0/2] hw/intc: Select generic " Philippe Mathieu-Daudé 2 siblings, 1 reply; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2024-12-27 20:24 UTC (permalink / raw) To: qemu-devel Cc: Peter Maydell, Phil Dennis-Jordan, Paolo Bonzini, qemu-arm, Philippe Mathieu-Daudé The TYPE_ARM_GICV3 model doesn't have any particular dependency on TCG, remove it. Rename the Kconfig selector ARM_GICV3_TCG -> ARM_GICV3. Fixes: a8a5546798c ("hw/intc/arm_gicv3: Introduce CONFIG_ARM_GIC_TCG Kconfig selector") Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/intc/Kconfig | 6 +++--- hw/intc/meson.build | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig index dd405bdb5d2..7547528f2c2 100644 --- a/hw/intc/Kconfig +++ b/hw/intc/Kconfig @@ -23,13 +23,13 @@ config APIC config ARM_GIC bool - select ARM_GICV3_TCG if TCG + select ARM_GICV3 if TCG select ARM_GIC_KVM if KVM select MSI_NONBROKEN -config ARM_GICV3_TCG +config ARM_GICV3 bool - depends on ARM_GIC && TCG + depends on ARM_GIC config ARM_GIC_KVM bool diff --git a/hw/intc/meson.build b/hw/intc/meson.build index 510fdfb6886..602da304b02 100644 --- a/hw/intc/meson.build +++ b/hw/intc/meson.build @@ -6,7 +6,7 @@ system_ss.add(when: 'CONFIG_ARM_GIC', if_true: files( 'arm_gicv3_common.c', 'arm_gicv3_its_common.c', )) -system_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files( +system_ss.add(when: 'CONFIG_ARM_GICV3', if_true: files( 'arm_gicv3.c', 'arm_gicv3_dist.c', 'arm_gicv3_its.c', @@ -39,7 +39,7 @@ endif specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', 'apic_common.c')) specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif_common.c')) -specific_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files('arm_gicv3_cpuif.c')) +specific_ss.add(when: 'CONFIG_ARM_GICV3', if_true: files('arm_gicv3_cpuif.c')) specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c')) specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c')) -- 2.47.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] hw/intc: Remove TCG dependency on ARM_GICV3 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 0 siblings, 0 replies; 8+ messages in thread From: Phil Dennis-Jordan @ 2024-12-28 10:45 UTC (permalink / raw) To: Philippe Mathieu-Daudé Cc: qemu-devel, Peter Maydell, Paolo Bonzini, qemu-arm [-- Attachment #1: Type: text/plain, Size: 2331 bytes --] On Fri, 27 Dec 2024 at 21:24, Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > The TYPE_ARM_GICV3 model doesn't have any particular > dependency on TCG, remove it. Rename the Kconfig selector > ARM_GICV3_TCG -> ARM_GICV3. > > Fixes: a8a5546798c ("hw/intc/arm_gicv3: Introduce CONFIG_ARM_GIC_TCG > Kconfig selector") > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu> Tested-by: Phil Dennis-Jordan <phil@philjordan.eu> > --- > hw/intc/Kconfig | 6 +++--- > hw/intc/meson.build | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig > index dd405bdb5d2..7547528f2c2 100644 > --- a/hw/intc/Kconfig > +++ b/hw/intc/Kconfig > @@ -23,13 +23,13 @@ config APIC > > config ARM_GIC > bool > - select ARM_GICV3_TCG if TCG > + select ARM_GICV3 if TCG > select ARM_GIC_KVM if KVM > select MSI_NONBROKEN > > -config ARM_GICV3_TCG > +config ARM_GICV3 > bool > - depends on ARM_GIC && TCG > + depends on ARM_GIC > > config ARM_GIC_KVM > bool > diff --git a/hw/intc/meson.build b/hw/intc/meson.build > index 510fdfb6886..602da304b02 100644 > --- a/hw/intc/meson.build > +++ b/hw/intc/meson.build > @@ -6,7 +6,7 @@ system_ss.add(when: 'CONFIG_ARM_GIC', if_true: files( > 'arm_gicv3_common.c', > 'arm_gicv3_its_common.c', > )) > -system_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files( > +system_ss.add(when: 'CONFIG_ARM_GICV3', if_true: files( > 'arm_gicv3.c', > 'arm_gicv3_dist.c', > 'arm_gicv3_its.c', > @@ -39,7 +39,7 @@ endif > > specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', > 'apic_common.c')) > specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: > files('arm_gicv3_cpuif_common.c')) > -specific_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: > files('arm_gicv3_cpuif.c')) > +specific_ss.add(when: 'CONFIG_ARM_GICV3', if_true: > files('arm_gicv3_cpuif.c')) > specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: > files('arm_gic_kvm.c')) > specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: > files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) > specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c')) > -- > 2.47.1 > > [-- Attachment #2: Type: text/html, Size: 3337 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available 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-27 20:24 ` Philippe Mathieu-Daudé 2024-12-28 10:48 ` Phil Dennis-Jordan 2025-03-03 15:34 ` [PATCH 0/2] hw/intc: Select generic " Philippe Mathieu-Daudé 2 siblings, 1 reply; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2024-12-27 20:24 UTC (permalink / raw) To: qemu-devel Cc: Peter Maydell, Phil Dennis-Jordan, Paolo Bonzini, qemu-arm, Philippe Mathieu-Daudé 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 select ARM_GIC_KVM if KVM select MSI_NONBROKEN -- 2.47.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available 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 0 siblings, 1 reply; 8+ messages in thread From: Phil Dennis-Jordan @ 2024-12-28 10:48 UTC (permalink / raw) To: Philippe Mathieu-Daudé Cc: qemu-devel, Peter Maydell, Paolo Bonzini, qemu-arm [-- Attachment #1: Type: text/plain, Size: 1031 bytes --] 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.) > select ARM_GIC_KVM if KVM > select MSI_NONBROKEN > > -- > 2.47.1 > > [-- Attachment #2: Type: text/html, Size: 1659 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available 2024-12-28 10:48 ` Phil Dennis-Jordan @ 2025-01-07 16:05 ` Phil Dennis-Jordan 2025-02-19 13:42 ` Philippe Mathieu-Daudé 0 siblings, 1 reply; 8+ messages in thread From: Phil Dennis-Jordan @ 2025-01-07 16:05 UTC (permalink / raw) To: Philippe Mathieu-Daudé Cc: qemu-devel, Peter Maydell, Paolo Bonzini, qemu-arm [-- 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 --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available 2025-01-07 16:05 ` Phil Dennis-Jordan @ 2025-02-19 13:42 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2025-02-19 13:42 UTC (permalink / raw) To: Phil Dennis-Jordan, Alex Bennée, Gustavo Romero Cc: qemu-devel, Peter Maydell, Paolo Bonzini, qemu-arm On 7/1/25 17:05, Phil Dennis-Jordan wrote: > > > On Sat, 28 Dec 2024 at 11:48, Phil Dennis-Jordan <phil@philjordan.eu > <mailto:phil@philjordan.eu>> wrote: > > > > On Fri, 27 Dec 2024 at 21:24, Philippe Mathieu-Daudé > <philmd@linaro.org <mailto: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 > <mailto: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? Cc'ing Alex & Gustavo who are more familiar with GIC devices. > 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? > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] hw/intc: Select generic ARM_GICV3 when KVM is not available 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-27 20:24 ` [PATCH 2/2] hw/intc: Have ARM_GIC select ARM_GICV3 when KVM is not available Philippe Mathieu-Daudé @ 2025-03-03 15:34 ` Philippe Mathieu-Daudé 2 siblings, 0 replies; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2025-03-03 15:34 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Phil Dennis-Jordan, Paolo Bonzini, qemu-arm Hi, On 27/12/24 21:24, Philippe Mathieu-Daudé wrote: > ARM_GICV3 is not restricted to TCG and can be used on HVF. > > Philippe Mathieu-Daudé (2): > hw/intc: Remove TCG dependency on ARM_GICV3 First reviewed/tested patch queued via hw-misc tree. Thanks, Phil. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-03-03 15:36 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2025-02-19 13:42 ` Philippe Mathieu-Daudé 2025-03-03 15:34 ` [PATCH 0/2] hw/intc: Select generic " Philippe Mathieu-Daudé
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).