Skip to content

Commit 1733432

Browse files
Anirudh Rayabharam (Microsoft)sudeep-holla
authored andcommitted
firmware: smccc: Support both smc and hvc conduits for getting hyp UUID
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> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Tested-by: Roman Kisel <romank@linux.microsoft.com> Reviewed-by: Roman Kisel <romank@linux.microsoft.com> Message-Id: <20250521094049.960056-1-anirudh@anirudhrb.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
1 parent 19272b3 commit 1733432

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/firmware/smccc/smccc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ bool arm_smccc_hypervisor_has_uuid(const uuid_t *hyp_uuid)
7272
struct arm_smccc_res res = {};
7373
uuid_t uuid;
7474

75-
if (arm_smccc_1_1_get_conduit() != SMCCC_CONDUIT_HVC)
76-
return false;
77-
78-
arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID, &res);
75+
arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID, &res);
7976
if (res.a0 == SMCCC_RET_NOT_SUPPORTED)
8077
return false;
8178

0 commit comments

Comments
 (0)