All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: smccc: support both conduits for getting hyp UUID
@ 2025-05-21  9:40 Anirudh Rayabharam
  2025-06-04 21:45 ` Roman Kisel
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Anirudh Rayabharam @ 2025-05-21  9:40 UTC (permalink / raw)
  To: Mark Rutland, Lorenzo Pieralisi, Sudeep Holla
  Cc: anirudh, linux-hyperv, linux-arm-kernel, linux-kernel

From: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>

When Linux is running as the root partition under Microsoft Hypervisor
(MSHV) a.k.a Hyper-V, smc is used as the conduit for smc calls.

Extend arm_smccc_hypervisor_has_uuid() to support this usecase. Use
arm_smccc_1_1_invoke to retrieve and use the appropriate conduit instead
of supporting only hvc.

Boot tested on MSHV guest, MSHV root & KVM guest.

Signed-off-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
---
 drivers/firmware/smccc/smccc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/firmware/smccc/smccc.c b/drivers/firmware/smccc/smccc.c
index cd65b434dc6e..bdee057db2fd 100644
--- a/drivers/firmware/smccc/smccc.c
+++ b/drivers/firmware/smccc/smccc.c
@@ -72,10 +72,7 @@ bool arm_smccc_hypervisor_has_uuid(const uuid_t *hyp_uuid)
 	struct arm_smccc_res res = {};
 	uuid_t uuid;
 
-	if (arm_smccc_1_1_get_conduit() != SMCCC_CONDUIT_HVC)
-		return false;
-
-	arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID, &res);
+	arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID, &res);
 	if (res.a0 == SMCCC_RET_NOT_SUPPORTED)
 		return false;
 
-- 
2.34.1



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

end of thread, other threads:[~2025-06-27 10:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21  9:40 [PATCH] firmware: smccc: support both conduits for getting hyp UUID Anirudh Rayabharam
2025-06-04 21:45 ` Roman Kisel
2025-06-05 15:33 ` Sudeep Holla
2025-06-10 16:06   ` Roman Kisel
2025-06-11 12:52     ` Sudeep Holla
2025-06-18 12:20       ` Anirudh Rayabharam
2025-06-18 12:20     ` Anirudh Rayabharam
2025-06-18 17:57       ` Roman Kisel
2025-06-27  9:59 ` Sudeep Holla

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.