* [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* [PATCH] firmware: smccc: support both conduits for getting hyp UUID 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-27 9:59 ` Sudeep Holla 2 siblings, 0 replies; 9+ messages in thread From: Roman Kisel @ 2025-06-04 21:45 UTC (permalink / raw) To: anirudh Cc: linux-arm-kernel, linux-hyperv, linux-kernel, lpieralisi, mark.rutland, sudeep.holla, apais, benhill, bperkins, sunilmut > 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; 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. Tested-by: Roman Kisel <romank@linux.microsoft.com> Reviewed-by: Roman Kisel <romank@linux.microsoft.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] firmware: smccc: support both conduits for getting hyp UUID 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-27 9:59 ` Sudeep Holla 2 siblings, 1 reply; 9+ messages in thread From: Sudeep Holla @ 2025-06-05 15:33 UTC (permalink / raw) To: Anirudh Rayabharam Cc: Mark Rutland, Sudeep Holla, Lorenzo Pieralisi, linux-hyperv, linux-arm-kernel, linux-kernel (sorry for the delay, found the patch in the spam 🙁) On Wed, May 21, 2025 at 09:40:48AM +0000, Anirudh Rayabharam wrote: > 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. > Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> 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. -- Regards, Sudeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] firmware: smccc: support both conduits for getting hyp UUID 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 0 siblings, 2 replies; 9+ messages in thread From: Roman Kisel @ 2025-06-10 16:06 UTC (permalink / raw) To: sudeep.holla Cc: anirudh, linux-arm-kernel, linux-hyperv, linux-kernel, lpieralisi, mark.rutland > (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! > > On Wed, May 21, 2025 at 09:40:48AM +0000, Anirudh Rayabharam wrote: >> 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. >> > > Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> > > 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! > > -- > Regards, > Sudeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] firmware: smccc: support both conduits for getting hyp UUID 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 1 sibling, 1 reply; 9+ messages in thread From: Sudeep Holla @ 2025-06-11 12:52 UTC (permalink / raw) To: Roman Kisel Cc: anirudh, linux-arm-kernel, Sudeep Holla, linux-hyperv, linux-kernel, lpieralisi, mark.rutland On Tue, Jun 10, 2025 at 09:06:48AM -0700, Roman Kisel wrote: > > (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. > > > > On Wed, May 21, 2025 at 09:40:48AM +0000, Anirudh Rayabharam wrote: > >> 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. > >> > > > > Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> > > > > 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. > 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. > 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 😄. -- Regards, Sudeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] firmware: smccc: support both conduits for getting hyp UUID 2025-06-11 12:52 ` Sudeep Holla @ 2025-06-18 12:20 ` Anirudh Rayabharam 0 siblings, 0 replies; 9+ messages in thread From: Anirudh Rayabharam @ 2025-06-18 12:20 UTC (permalink / raw) To: Sudeep Holla Cc: Roman Kisel, linux-arm-kernel, linux-hyperv, linux-kernel, lpieralisi, mark.rutland On Wed, Jun 11, 2025 at 01:52:32PM +0100, Sudeep Holla wrote: > On Tue, Jun 10, 2025 at 09:06:48AM -0700, Roman Kisel wrote: > > > (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. > > > > > > > On Wed, May 21, 2025 at 09:40:48AM +0000, Anirudh Rayabharam wrote: > > >> 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. > > >> > > > > > > Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> > > > > > > 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. > > > > 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. > > > 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. > > -- > Regards, > Sudeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] firmware: smccc: support both conduits for getting hyp UUID 2025-06-10 16:06 ` Roman Kisel 2025-06-11 12:52 ` Sudeep Holla @ 2025-06-18 12:20 ` Anirudh Rayabharam 2025-06-18 17:57 ` Roman Kisel 1 sibling, 1 reply; 9+ messages in thread From: Anirudh Rayabharam @ 2025-06-18 12:20 UTC (permalink / raw) To: Roman Kisel Cc: sudeep.holla, linux-arm-kernel, linux-hyperv, linux-kernel, lpieralisi, mark.rutland On Tue, Jun 10, 2025 at 09:06:48AM -0700, Roman Kisel wrote: > > (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... > expected :) Thanks for your help! > > > > > On Wed, May 21, 2025 at 09:40:48AM +0000, Anirudh Rayabharam wrote: > >> 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. > >> > > > > Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> > > > > 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 > > 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! > > > > > -- > > Regards, > > Sudeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] firmware: smccc: support both conduits for getting hyp UUID 2025-06-18 12:20 ` Anirudh Rayabharam @ 2025-06-18 17:57 ` Roman Kisel 0 siblings, 0 replies; 9+ messages in thread From: Roman Kisel @ 2025-06-18 17:57 UTC (permalink / raw) To: Anirudh Rayabharam Cc: sudeep.holla, linux-arm-kernel, linux-hyperv, linux-kernel, lpieralisi, mark.rutland On 6/18/2025 5:20 AM, Anirudh Rayabharam wrote: > On Tue, Jun 10, 2025 at 09:06:48AM -0700, Roman Kisel wrote: >>> (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 20250521094049.960056-1-anirudh@anirudhrb.com | | Grabbing thread from lore.kernel.org/all/20250521094049.960056-1-anirudh@anirudhrb.com/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 <sudeep.holla@arm.com> | + Tested-by: Roman Kisel <romank@linux.microsoft.com> (✓ DKIM/linux.microsoft.com) | + Reviewed-by: Roman Kisel <romank@linux.microsoft.com> (✓ DKIM/linux.microsoft.com) | --- | ✓ Signed: DKIM/anirudhrb.com | --- | Total patches: 1 | --- | Link: https://lore.kernel.org/r/20250521094049.960056-1-anirudh@anirudhrb.com | 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 | [...] >> Anirudh had been OOF for some time and would be for another >> week iiuc so I thought I'd reply. > > Thanks Roman! My pleasure :) > > Regards, > Anirudh > >> >> 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! >> >>> >>> -- >>> Regards, >>> Sudeep -- Thank you, Roman ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] firmware: smccc: support both conduits for getting hyp UUID 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-27 9:59 ` Sudeep Holla 2 siblings, 0 replies; 9+ messages in thread From: Sudeep Holla @ 2025-06-27 9:59 UTC (permalink / raw) To: Mark Rutland, Lorenzo Pieralisi, Anirudh Rayabharam Cc: Sudeep Holla, linux-hyperv, linux-arm-kernel, linux-kernel On Wed, 21 May 2025 09:40:48 +0000, Anirudh Rayabharam wrote: > 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. > > [...] 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 ^ permalink raw reply [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.