All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] KVM: arm64: Report SMCCC_VERSION and SMCCC_ARCH_FEATURES as implemented
@ 2026-09-14 12:58 Fuad Tabba
  2026-09-14 12:58 ` [PATCH 2/2] KVM: arm64: selftests: Check the mandatory SMCCC_ARCH_FEATURES queries Fuad Tabba
  2026-09-27 16:35 ` [PATCH 1/2] KVM: arm64: Report SMCCC_VERSION and SMCCC_ARCH_FEATURES as implemented Marc Zyngier
  0 siblings, 2 replies; 3+ messages in thread
From: Fuad Tabba @ 2026-09-14 12:58 UTC (permalink / raw)
  To: Marc Zyngier, Oliver Upton
  Cc: Fuad Tabba, Fuad Tabba, Joey Gouly, Steffen Eiden,
	Suzuki K Poulose, Zenghui Yu, Catalin Marinas, Will Deacon,
	Mark Rutland, linux-arm-kernel, kvmarm, linux-kernel

KVM reports SMCCC v1.1 to guests, which makes SMCCC_VERSION and
SMCCC_ARCH_FEATURES mandatory, and DEN0028H 7.3.6 requires
SMCCC_ARCH_FEATURES to return SUCCESS for both function ids: "This
function must return SUCCESS when arch_func_id is the SMCCC_VERSION or
SMCCC_ARCH_FEATURES function id." With arch_func_id set to either, KVM's
guest handler returns NOT_SUPPORTED. Return SUCCESS.

A Linux guest is unaffected: it discovers SMCCC_VERSION through
PSCI_FEATURES, and issues SMCCC_ARCH_FEATURES only with arch_func_id set
to ARCH_SOC_ID, the ARCH_WORKAROUND_* ids or HV_PV_TIME_FEATURES.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
 arch/arm64/kvm/hypercalls.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/kvm/hypercalls.c b/arch/arm64/kvm/hypercalls.c
index b11b8821c9fbc..66f16bf9a8ea7 100644
--- a/arch/arm64/kvm/hypercalls.c
+++ b/arch/arm64/kvm/hypercalls.c
@@ -293,6 +293,10 @@ int kvm_smccc_call_handler(struct kvm_vcpu *vcpu)
 	case ARM_SMCCC_ARCH_FEATURES_FUNC_ID:
 		feature = smccc_get_arg1(vcpu);
 		switch (feature) {
+		case ARM_SMCCC_VERSION_FUNC_ID:
+		case ARM_SMCCC_ARCH_FEATURES_FUNC_ID:
+			val[0] = SMCCC_RET_SUCCESS;
+			break;
 		case ARM_SMCCC_ARCH_WORKAROUND_1:
 			switch (arm64_get_spectre_v2_state()) {
 			case SPECTRE_VULNERABLE:
-- 
2.39.5


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

end of thread, other threads:[~2026-09-27 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 12:58 [PATCH 1/2] KVM: arm64: Report SMCCC_VERSION and SMCCC_ARCH_FEATURES as implemented Fuad Tabba
2026-09-14 12:58 ` [PATCH 2/2] KVM: arm64: selftests: Check the mandatory SMCCC_ARCH_FEATURES queries Fuad Tabba
2026-09-27 16:35 ` [PATCH 1/2] KVM: arm64: Report SMCCC_VERSION and SMCCC_ARCH_FEATURES as implemented Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.