[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/13] x86/HV: Add new hvcall guest address host visibility support
- To: Dave Hansen <dave.hansen@xxxxxxxxx>, kys@xxxxxxxxxxxxx, haiyangz@xxxxxxxxxxxxx, sthemmin@xxxxxxxxxxxxx, wei.liu@xxxxxxxxxx, decui@xxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, luto@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, joro@xxxxxxxxxx, will@xxxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, jejb@xxxxxxxxxxxxx, martin.petersen@xxxxxxxxxx, arnd@xxxxxxxx, hch@xxxxxx, m.szyprowski@xxxxxxxxxxx, robin.murphy@xxxxxxx, thomas.lendacky@xxxxxxx, brijesh.singh@xxxxxxx, ardb@xxxxxxxxxx, Tianyu.Lan@xxxxxxxxxxxxx, rientjes@xxxxxxxxxx, martin.b.radev@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, rppt@xxxxxxxxxx, kirill.shutemov@xxxxxxxxxxxxxxx, aneesh.kumar@xxxxxxxxxxxxx, krish.sadhukhan@xxxxxxxxxx, saravanand@xxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, pgonda@xxxxxxxxxx, david@xxxxxxxxxx, keescook@xxxxxxxxxxxx, hannes@xxxxxxxxxxx, sfr@xxxxxxxxxxxxxxxx, michael.h.kelley@xxxxxxxxxxxxx
- From: Tianyu Lan <ltykernel@xxxxxxxxx>
- Date: Fri, 30 Jul 2021 10:52:43 +0800
- Cc: iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, vkuznets@xxxxxxxxxx, anparri@xxxxxxxxxxxxx
- Delivery-date: Fri, 30 Jul 2021 02:53:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 7/30/2021 12:05 AM, Dave Hansen wrote:
On 7/29/21 8:02 AM, Tianyu Lan wrote:
There is x86_hyper_type to identify hypervisor type and we may check
this variable after checking X86_FEATURE_HYPERVISOR.
static inline bool hv_is_isolation_supported(void)
{
if (!cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
return 0;
if (x86_hyper_type != X86_HYPER_MS_HYPERV)
return 0;
// out of line function call:
return __hv_is_isolation_supported();
}
Looks fine. You just might want to use this existing helper:
static inline bool hypervisor_is_type(enum x86_hypervisor_type type)
{
return x86_hyper_type == type;
}
Yes,thanks for suggestion and will update in the next version.
|