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.
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to