Re: [PATCH v6 6/6] arm64: hyperv: Implement hv_is_isolation_supported() for CCA Realms
From: Kameron Carr
Date: Wed Nov 11 2026 - 14:35:17 EST
On 11/11/2026 10:01 AM, Michael Kelley wrote:
> From: Kameron Carr <kameroncarr@xxxxxxxxxxxxxxxxxxx> Sent: Friday, October 30, 2026 5:14 PM
>>
>> Provide an arm64 implementation of hv_is_isolation_supported() that
>> overrides the __weak default in drivers/hv/hv_common.c.
>>
>> The implementation deliberately does not depend on
>> hv_is_hyperv_initialized() because hv_common_init() consults
>> hv_is_isolation_supported() before hyperv_initialized is set.
>
> Quibble: What's the genesis of this statement about
> hv_is_hyperv_initialized()? On the x86 side, hv_is_isolation_supported()
> doesn't depend on hv_is_hyperv_initialized(), so I don't think you
> are making a distinction vs. what x86 does. The statement seems
> like it might be a leftover from an early version of this patch set.
>From what I recall, I wrote this line after going down a long rabbit
hole attempting to have functional parity with x86
hv_is_isolation_supported(). I agree that is doesn't make sense without
context.
I couldn't find equivalent methods for checking if the Realm is running
on Hyper-V. I initially considered using hv_is_hyperv_initialized(), but
that ran into ordering issue described above. I eventually concluded
that just returning is_realm_world() is sufficient, since
hv_is_isolation_supported() is never used to determine whether the VM is
running on Hyper-V.
The comment would be more clear if it simply pointed out that
hv_is_isolation_supported() functionally differs on ARM64 vs. x86
because it does not check whether it is running on Hyper-V.
I believe Wei already applied this series to hyperv-next, but perhaps he
can remove this line from the commit message.
--
Regards,
Kameron
> Michael
>
>>
>> Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
>> Signed-off-by: Kameron Carr <kameroncarr@xxxxxxxxxxxxxxxxxxx>
>> ---
>> arch/arm64/hyperv/mshyperv.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm64/hyperv/mshyperv.c b/arch/arm64/hyperv/mshyperv.c
>> index da6c3aa0..8a2c446 100644
>> --- a/arch/arm64/hyperv/mshyperv.c
>> +++ b/arch/arm64/hyperv/mshyperv.c
>> @@ -187,3 +187,8 @@ bool hv_isolation_type_cca(void)
>> {
>> return is_realm_world();
>> }
>> +
>> +bool hv_is_isolation_supported(void)
>> +{
>> + return is_realm_world();
>> +}
>> --
>> 2.45.4
>>