Re: [PATCH 03/13] x86/HV: Add new hvcall guest address host visibility support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux