kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/10] target/arm: Introduce host_cpu_feature_supported() API
@ 2025-08-12 17:28 Philippe Mathieu-Daudé
  2025-08-12 17:28 ` [PATCH v2 01/10] accel/system: Introduce hwaccel_enabled() helper Philippe Mathieu-Daudé
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-08-12 17:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: Claudio Fontana, Cameron Esfahani, Mohamed Mediouni,
	Alexander Graf, Paolo Bonzini, kvm, Eric Auger, qemu-arm,
	Mads Ynddal, Richard Henderson, Alex Bennée, Peter Maydell,
	Miguel Luis, Philippe Mathieu-Daudé

Since v1:
- Addressed Richard's review comments removing 'can_emulate' arg

Hi,

Mohamed and myself are working on adding nested virtualization
support to HVF Aarch64. Mohamed approach leverages the latest
hardware features of the Apple M3+ Silicon chips [1], while mine
falls back to emulation [2] when features are not available, as
it happens with the M1 and M2 chipsets.

We want to support both methods long term, as they solve different
use cases. Therefore I'm looking for a common API for methods
added in both series.

In this series we propose the host_cpu_feature_supported() method
to check if a feature is supported by the host, allowing fall back
to TCG. KVM uses are converted, and an example -- while not really
usable without other patch applied -- is provided for HVF.

Does this look reasonable enough to pursue in that direction?

Thanks,

Phil.

[1] https://lore.kernel.org/qemu-devel/20250808070137.48716-1-mohamed@unpredictable.fr/
[2] https://lore.kernel.org/qemu-devel/20250620172751.94231-1-philmd@linaro.org/

Mohamed Mediouni (2):
  target/arm: Factor hvf_psci_get_target_el() out
  target/arm/hvf: Sync registers used at EL2

Philippe Mathieu-Daudé (8):
  accel/system: Introduce hwaccel_enabled() helper
  target/arm: Use generic hwaccel_enabled() to check 'host' cpu type
  target/arm: Restrict PMU to system mode
  target/arm: Introduce host_cpu_feature_supported()
  target/arm: Replace kvm_arm_pmu_supported by
    host_cpu_feature_supported
  target/arm: Replace kvm_arm_el2_supported by
    host_cpu_feature_supported
  target/arm/hvf: Consider EL2 acceleration for Silicon M3+ chipsets
  target/arm/hvf: Allow EL2/EL3 emulation on Silicon M1 / M2

 include/system/hw_accel.h | 13 ++++++++
 target/arm/internals.h    |  8 +++++
 target/arm/kvm_arm.h      | 24 --------------
 hw/arm/virt.c             |  8 +----
 target/arm/arm-qmp-cmds.c |  5 +--
 target/arm/cpu.c          | 16 +++++----
 target/arm/cpu64.c        | 11 ++++---
 target/arm/hvf/hvf.c      | 69 +++++++++++++++++++++++++++++++++++++--
 target/arm/kvm-stub.c     | 10 ------
 target/arm/kvm.c          | 33 ++++++++++++++-----
 10 files changed, 133 insertions(+), 64 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-08-12 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 17:28 [RFC PATCH v2 00/10] target/arm: Introduce host_cpu_feature_supported() API Philippe Mathieu-Daudé
2025-08-12 17:28 ` [PATCH v2 01/10] accel/system: Introduce hwaccel_enabled() helper Philippe Mathieu-Daudé
2025-08-12 17:28 ` [PATCH v2 02/10] target/arm: Use generic hwaccel_enabled() to check 'host' cpu type Philippe Mathieu-Daudé
2025-08-12 17:28 ` [PATCH v2 03/10] target/arm: Restrict PMU to system mode Philippe Mathieu-Daudé
2025-08-12 17:28 ` [PATCH v2 04/10] target/arm: Factor hvf_psci_get_target_el() out Philippe Mathieu-Daudé
2025-08-12 17:31 ` [RFC PATCH v2 05/10] target/arm: Introduce host_cpu_feature_supported() Philippe Mathieu-Daudé
2025-08-12 17:31   ` [RFC PATCH v2 06/10] target/arm: Replace kvm_arm_pmu_supported by host_cpu_feature_supported Philippe Mathieu-Daudé
2025-08-12 17:31   ` [RFC PATCH v2 07/10] target/arm: Replace kvm_arm_el2_supported " 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).