firmware: smccc: support both conduits for getting hyp UUID
Subsystems (3)
PATCH 1/1 firmware: smccc: support both conduits for getting hyp UUID
From: Anirudh Rayabharam (Microsoft) <[email protected]>
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.
--- drivers/firmware/smccc/smccc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/firmware/smccc/smccc.c +1 -4
@@ -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;
Signature · 1 line
2.34.1
PATCH 1/1 firmware: smccc: support both conduits for getting hyp UUID
Quoted 21 lines
From: Anirudh Rayabharam (Microsoft) <[email protected]>
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. Usearm_smccc_1_1_invoketo 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) <[email protected]>--- drivers/firmware/smccc/smccc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/firmware/smccc/smccc.c +0
-0
drivers/firmware/smccc/smccc.c bool arm_smccc_hypervisor_has_uuid(const uuid_t *hyp_uuid) · line 77
Quoted 10 lines
drivers/firmware/smccc/smccc.c +1
-4@@ -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;
The patch is a strict superset of the existing functionality. Validated on baremetal Linux and KVM, Apple M3 nested virt., various client and server ARM64 systems running Windows ARM64 with VMs managed by Hyper-V and OpenVMM.
Looks good to me.
(sorry for the delay, found the patch in the spam 🙁)
Quoted 11 lines · Anirudh Rayabharam
From: Anirudh Rayabharam (Microsoft) <[email protected]>
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. Usearm_smccc_1_1_invoketo retrieve and use the appropriate conduit instead of supporting only hvc.Boot tested on MSHV guest, MSHV root & KVM guest.
Are they any dependent patches or series using this ? Do you plan to route it via KVM tree if there are any dependency. Or else I can push it through (arm-)soc tree. Let me know.
Signature · 2 lines
Regards, Sudeep
Quoted 1 line
(sorry for the delay, found the patch in the spam 🙁)
"b4" shows the the mail server used for the patch submission doesn't pass the DKIM check, so finding the patch in the spam seems expected :) Thanks for your help!
Quoted 11 lines · Anirudh Rayabharam
Quoted 9 lines
From: Anirudh Rayabharam (Microsoft) <[email protected]>
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. Usearm_smccc_1_1_invoketo retrieve and use the appropriate conduit instead of supporting only hvc.
Quoted 8 lines
Quoted 2 lines
Boot tested on MSHV guest, MSHV root & KVM guest.
Reviewed-by Sudeep Holla <[email protected]>Are they any dependent patches or series using this ? Do you plan to route it via KVM tree if there are any dependency. Or else I can push it through (arm-)soc tree. Let me know.
Anirudh had been OOF for some time and would be for another week iiuc so I thought I'd reply.
The patch this depends on is 13423063c7cb
("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID"), and this patch has already been pulled into the Linus'es tree.
As for routing, (arm-)soc should be good it appears as the change is contained within the firmware drivers path. Although I'd trust more to your, Arnd's or Wei's opinion than mine!
Quoted 4 lines
--
Regards,
Sudeep
Quoted 6 lines · Roman Kisel
Quoted 1 line
(sorry for the delay, found the patch in the spam 🙁)
"b4" shows the the mail server used for the patch submission doesn't pass the DKIM check, so finding the patch in the spam seems expected :) Thanks for your help!
Thought so looking at the header but I just have very basic knowledge there, so couldn't comment.
Quoted 20 lines
Quoted 11 lines · Anirudh Rayabharam
Quoted 9 lines
From: Anirudh Rayabharam (Microsoft) <[email protected]>
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. Usearm_smccc_1_1_invoketo retrieve and use the appropriate conduit instead of supporting only hvc.Quoted 8 lines
Quoted 2 lines
Boot tested on MSHV guest, MSHV root & KVM guest.
Reviewed-by Sudeep Holla <[email protected]>Are they any dependent patches or series using this ? Do you plan to route it via KVM tree if there are any dependency. Or else I can push it through (arm-)soc tree. Let me know.
Quoted 7 lines
Anirudh had been OOF for some time and would be for another week iiuc so I thought I'd reply.
The patch this depends on is
13423063c7cb
("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID"), and this patch has already been pulled into the Linus'es tree.
Had a quick look at the commit to refresh my memory and as you mentioned it is new feature. I was checking to see if this is a fix.
Quoted 4 lines
As for routing, (arm-)soc should be good it appears as the change is contained within the firmware drivers path. Although I'd trust more to your, Arnd's or Wei's opinion than mine!
I will queue this once I start collecting patches for v6.17 in 1/2 weeks' time, so expect silence until then 😄.
Signature · 2 lines
Regards, Sudeep
Quoted 42 lines · Sudeep Holla
Quoted 6 lines · Roman Kisel
Quoted 1 line
(sorry for the delay, found the patch in the spam 🙁)
"b4" shows the the mail server used for the patch submission doesn't pass the DKIM check, so finding the patch in the spam seems expected :) Thanks for your help!
Thought so looking at the header but I just have very basic knowledge there, so couldn't comment.
Quoted 20 lines
Quoted 11 lines · Anirudh Rayabharam
Quoted 9 lines
From: Anirudh Rayabharam (Microsoft) <[email protected]>
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. Usearm_smccc_1_1_invoketo retrieve and use the appropriate conduit instead of supporting only hvc.Quoted 8 lines
Quoted 2 lines
Boot tested on MSHV guest, MSHV root & KVM guest.
Reviewed-by Sudeep Holla <[email protected]>Are they any dependent patches or series using this ? Do you plan to route it via KVM tree if there are any dependency. Or else I can push it through (arm-)soc tree. Let me know.
Quoted 7 lines
Anirudh had been OOF for some time and would be for another week iiuc so I thought I'd reply.
The patch this depends on is
13423063c7cb
("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID"), and this patch has already been pulled into the Linus'es tree.Had a quick look at the commit to refresh my memory and as you mentioned it is new feature. I was checking to see if this is a fix.
Quoted 7 lines
Quoted 4 lines
As for routing, (arm-)soc should be good it appears as the change is contained within the firmware drivers path. Although I'd trust more to your, Arnd's or Wei's opinion than mine!
I will queue this once I start collecting patches for v6.17 in 1/2 weeks' time, so expect silence until then 😄.
Sounds good, thanks!
Regards,
Anirudh.
Quoted 4 lines
Signature · 3 lines
-- Regards, Sudeep
Quoted 4 lines · Roman Kisel
Quoted 1 line
(sorry for the delay, found the patch in the spam 🙁)
"b4" shows the the mail server used for the patch submission doesn't pass the DKIM check, so finding the patch in the spam seems
How do you check this? I mean, what b4 command do you run?
I think it should be fix now. Let's see...
Quoted 16 lines
expected :) Thanks for your help!
Quoted 14 lines · Anirudh Rayabharam
Quoted 11 lines
From: Anirudh Rayabharam (Microsoft) <[email protected]>
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. Usearm_smccc_1_1_invoketo retrieve and use the appropriate conduit instead of supporting only hvc.Boot tested on MSHV guest, MSHV root & KVM guest.
Quoted 8 lines
Quoted 5 lines
Reviewed-by Sudeep Holla <[email protected]>Are they any dependent patches or series using this ? Do you plan to route it via KVM tree if there are any dependency. Or else I can push it through (arm-)soc tree. Let me know.
Anirudh had been OOF for some time and would be for another week iiuc so I thought I'd reply.
Thanks Roman!
Regards,
Anirudh
Quoted 13 lines
The patch this depends on is
13423063c7cb
("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID"), and this patch has already been pulled into the Linus'es tree.As for routing, (arm-)soc should be good it appears as the change is contained within the firmware drivers path. Although I'd trust more to your, Arnd's or Wei's opinion than mine!
Quoted 4 lines
--
Regards,
Sudeep
Quoted 9 lines · Anirudh Rayabharam
Quoted 4 lines · Roman Kisel
Quoted 1 line
(sorry for the delay, found the patch in the spam 🙁)
"b4" shows the the mail server used for the patch submission doesn't pass the DKIM check, so finding the patch in the spam seems
How do you check this? I mean, what b4 command do you run?
I think it should be fix now. Let's see...
"b4 am" was showing the failed DKIM check, and all good now!
| $ b4 am [email protected] | | Grabbing thread from lore.kernel.org/all/[email protected]/t.mbox.gz | Analyzing 7 messages in the thread | Looking for additional code-review trailers on lore.kernel.org | Checking attestation on all messages, may take a moment... | --- | ✓ [PATCH] firmware: smccc: support both conduits for getting hyp UUID | + Reviewed-by: Sudeep Holla <[email protected]> | + Tested-by: Roman Kisel <[email protected]> (✓ DKIM/linux.microsoft.com) | + Reviewed-by: Roman Kisel <[email protected]> (✓ DKIM/linux.microsoft.com) | --- | ✓ Signed: DKIM/anirudhrb.com | --- | Total patches: 1 | --- | Link: https://lore.kernel.org/r/[email protected] | Base: applies clean to current tree | git checkout -b 20250521_anirudh_anirudhrb_com HEAD | git am ./20250521_anirudh_firmware_smccc_support_both_conduits_for_getting_hyp_uuid.mbx |
[...]
Quoted 4 lines
Quoted 2 lines
Anirudh had been OOF for some time and would be for another week iiuc so I thought I'd reply.
Thanks Roman!
My pleasure :)
Quoted 17 lines
Regards,
AnirudhQuoted 13 lines
The patch this depends on is
13423063c7cb
("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID"), and this patch has already been pulled into the Linus'es tree.As for routing, (arm-)soc should be good it appears as the change is contained within the firmware drivers path. Although I'd trust more to your, Arnd's or Wei's opinion than mine!
Quoted 4 lines
--
Regards,
Sudeep
Signature · 2 lines
Thank you, Roman
Sudeep Holla
AppliedQuoted 8 lines · Anirudh Rayabharam
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. Usearm_smccc_1_1_invoketo retrieve and use the appropriate conduit instead of supporting only hvc.[...]
Applied to sudeep.holla/linux (for-next/smccc/updates), thanks!
[1/1] firmware: smccc: support both conduits for getting hyp UUID
https://git.kernel.org/sudeep.holla/c/1733432638f3
--
Regards,
Sudeep