Re: Revision 297176 - hyperv/evttimer: Use an independent message slot so that it can work

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Fri, 8 Apr 2016 17:02:09 +0300
On Fri, Apr 08, 2016 at 11:03:46AM +0000, Dexuan Cui wrote:
> Hi smokehydration,
> I guess your VM config file has something like "viridian = 1" or
> "viridian_enlightenment=xxx".
> 
> With this, Xen tries to pretend to be Hyper-V, but obviously Xen can't be 100% Hyper-V.
> BTW, I know at least KVM can have the same behavior.
> 
> We have to find a reliable way to distinguish Hyper-V from other hypervisors that
> try to pretend to be Hyper-V...

At the time when the probe is done, the IDT entries for exceptions are
already set. You can use rdmsr_safe() instead of rdmsr() to read Hyper-V
timecounter register. Then, a fault definitely indicates that the kernel
is not executing on the compatible Hyper-V emulator. Hopefully, a
non-fault read is not impossible for undesired cases.
Received on Fri Apr 08 2016 - 12:02:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:04 UTC