Date: Fri, 8 Apr 2016 14:15:05 +0000 From: Dexuan Cui <decui@microsoft.com> To: Konstantin Belousov <kostikbel@gmail.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: <BLUPR03MB14108766AA80707283EC7FC0BF910@BLUPR03MB1410.namprd03.prod.outlook.com> In-Reply-To: <20160408140208.GN1741@kib.kiev.ua> References: <KEosm96--3-0@tutanota.com> <CAMOc5cyskn2qEoki_N_yWquc3YTzoBzkUU2Gku61BR82UPSa6g@mail.gmail.com> <BLUPR03MB1410B6C6318441D74BD3AC27BF910@BLUPR03MB1410.namprd03.prod.outlook.com> <20160408140208.GN1741@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
> From: Konstantin Belousov [mailto:kostikbel@gmail.com] > Sent: Friday, April 8, 2016 22:02 > To: Dexuan Cui <decui@microsoft.com> > Cc: Sepherosa Ziehau <sephe@freebsd.org>; smokehydration@tutanota.com; > freebsd-current@freebsd.org > Subject: Re: Revision 297176 - hyperv/evttimer: Use an independent messag= e > slot so that it can work >=20 > 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 =3D 1" or > > "viridian_enlightenment=3Dxxx". > > > > 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 hyperv= isors > that > > try to pretend to be Hyper-V... >=20 > 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: https://github.com/howard0su/freebsd/commit/d1d031e0d8991ab1f94de00325705d2= 66829c647 We'll clean up & post it -- Dexuan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLUPR03MB14108766AA80707283EC7FC0BF910>