Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2016 17:02:09 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Dexuan Cui <decui@microsoft.com>
Cc:        Sepherosa Ziehau <sephe@freebsd.org>, "smokehydration@tutanota.com" <smokehydration@tutanota.com>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: Revision 297176 - hyperv/evttimer: Use an independent message slot so that it can work
Message-ID:  <20160408140208.GN1741@kib.kiev.ua>
In-Reply-To: <BLUPR03MB1410B6C6318441D74BD3AC27BF910@BLUPR03MB1410.namprd03.prod.outlook.com>
References:  <KEosm96--3-0@tutanota.com> <CAMOc5cyskn2qEoki_N_yWquc3YTzoBzkUU2Gku61BR82UPSa6g@mail.gmail.com> <BLUPR03MB1410B6C6318441D74BD3AC27BF910@BLUPR03MB1410.namprd03.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160408140208.GN1741>