Re: [PATCH 2/4] Hypervisor detection and get tsc_freq from hypervisor

From: H. Peter Anvin
Date: Mon Nov 10 2008 - 10:33:01 EST


Mark McLoughlin wrote:
>>
>> diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
>> index f73e95d..78478f2 100644
>> --- a/arch/x86/include/asm/cpufeature.h
>> +++ b/arch/x86/include/asm/cpufeature.h
>> @@ -117,6 +117,7 @@
>> #define X86_FEATURE_XSAVE (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
>> #define X86_FEATURE_OSXSAVE (4*32+27) /* "" XSAVE enabled in the OS */
>> #define X86_FEATURE_AVX (4*32+28) /* Advanced Vector Extensions */
>> +#define X86_FEATURE_HYPERVISOR (4*32+31) /* Running on a hypervisor */
>
> I don't see you set this anywhere.
>

This bit is set by the hypervisor in the pattern returned by the CPUID
instruction.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/