[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3f09c505-3e4d-3b06-e92a-db6fd3e50d0c@gmail.com>
Date: Tue, 10 Aug 2021 21:09:16 +0800
From: Tianyu Lan <ltykernel@...il.com>
To: Dave Hansen <dave.hansen@...el.com>, kys@...rosoft.com,
haiyangz@...rosoft.com, sthemmin@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, x86@...nel.org, hpa@...or.com,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
konrad.wilk@...cle.com, boris.ostrovsky@...cle.com,
jgross@...e.com, sstabellini@...nel.org, joro@...tes.org,
will@...nel.org, davem@...emloft.net, kuba@...nel.org,
jejb@...ux.ibm.com, martin.petersen@...cle.com, arnd@...db.de,
hch@....de, m.szyprowski@...sung.com, robin.murphy@....com,
thomas.lendacky@....com, brijesh.singh@....com, ardb@...nel.org,
Tianyu.Lan@...rosoft.com, pgonda@...gle.com,
martin.b.radev@...il.com, akpm@...ux-foundation.org,
kirill.shutemov@...ux.intel.com, rppt@...nel.org,
sfr@...b.auug.org.au, saravanand@...com,
krish.sadhukhan@...cle.com, aneesh.kumar@...ux.ibm.com,
xen-devel@...ts.xenproject.org, rientjes@...gle.com,
hannes@...xchg.org, tj@...nel.org, michael.h.kelley@...rosoft.com
Cc: iommu@...ts.linux-foundation.org, linux-arch@...r.kernel.org,
linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org, netdev@...r.kernel.org,
vkuznets@...hat.com, parri.andrea@...il.com
Subject: Re: [PATCH V3 03/13] x86/HV: Add new hvcall guest address host
visibility support
On 8/10/2021 6:12 AM, Dave Hansen wrote:
> On 8/9/21 10:56 AM, Tianyu Lan wrote:
>> From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
>>
>> Add new hvcall guest address host visibility support to mark
>> memory visible to host. Call it inside set_memory_decrypted
>> /encrypted(). Add HYPERVISOR feature check in the
>> hv_is_isolation_supported() to optimize in non-virtualization
>> environment.
>
> From an x86/mm perspective:
>
> Acked-by: Dave Hansen <dave.hansen@...el.com>
>
Thanks for your ACK.
> A tiny nit:
>
>> diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
>> index 0bb4d9ca7a55..b3683083208a 100644
>> --- a/arch/x86/hyperv/hv_init.c
>> +++ b/arch/x86/hyperv/hv_init.c
>> @@ -607,6 +607,12 @@ EXPORT_SYMBOL_GPL(hv_get_isolation_type);
>>
>> bool hv_is_isolation_supported(void)
>> {
>> + if (!cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
>> + return 0;
>> +
>> + if (!hypervisor_is_type(X86_HYPER_MS_HYPERV))
>> + return 0;
>> +
>> return hv_get_isolation_type() != HV_ISOLATION_TYPE_NONE;
>> }
> This might be worthwhile to move to a header. That ensures that
> hv_is_isolation_supported() use can avoid even a function call. But, I
> see this is used in modules and its use here is also in a slow path, so
> it's not a big deal
>
I will move it to header in the following version.
Thanks.
Powered by blists - more mailing lists