> From: Konstantin Belousov [mailto:kostikbel_at_gmail.com] > Sent: Friday, April 8, 2016 22:02 > To: Dexuan Cui <decui_at_microsoft.com> > Cc: Sepherosa Ziehau <sephe_at_freebsd.org>; smokehydration_at_tutanota.com; > freebsd-current_at_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: https://github.com/howard0su/freebsd/commit/d1d031e0d8991ab1f94de00325705d266829c647 We'll clean up & post it -- DexuanReceived on Fri Apr 08 2016 - 12:47:32 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:04 UTC