> From: Konstantin Belousov [mailto:kostik...@gmail.com]
> Sent: Friday, April 8, 2016 22:02
> To: Dexuan Cui <de...@microsoft.com>
> Cc: Sepherosa Ziehau <se...@freebsd.org>; smokehydrat...@tutanota.com;
> freebsd-current@freebsd.org
> Subject: Re: Revision 297176 - hyperv/evttimer: Use an independent message
> slot so that it can work
> 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.

Hi Konstantin,
Thanks for the suggestion!

We're trying to solve the issue with "hv_features/hv_recommendations" of
some Hyper-V specific CPUIDs -- the other hypervisors are unlikely to touch
these CPUIDs; even if they do touch the CPUIDs, I think they should
respect the meanings of the CPUIDs and shouldn't incorrectly report
capabilities they doesn't really have.

A drafted patch is here:
We'll clean up & post it

-- Dexuan
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to