Revision 297176 - hyperv/evttimer: Use an independent message slot so that it can work
Konstantin Belousov
kostikbel at gmail.com
Fri Apr 8 14:02:18 UTC 2016
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.
More information about the freebsd-current
mailing list