Messages in this thread | | | From | KY Srinivasan <> | Subject | RE: [PATCH] x86: Hyper-V: register clocksource only if its advertised | Date | Tue, 29 Jan 2013 15:58:08 +0000 |
| |
> -----Original Message----- > From: Stefano Stabellini [mailto:stefano.stabellini@eu.citrix.com] > Sent: Tuesday, January 29, 2013 10:31 AM > To: KY Srinivasan > Cc: Olaf Hering; Jan Beulich; Stefano Stabellini; Greg KH; linux- > kernel@vger.kernel.org > Subject: RE: [PATCH] x86: Hyper-V: register clocksource only if its advertised > > On Tue, 29 Jan 2013, KY Srinivasan wrote: > > > The patch which started this thread is still valid because it enables > > > feature B only if the featurebit for B is enabled. > > > > Why would we need this if we have some other way of detecting that Hyper-V > is being > > emulated. > > I don't think that Hyper-V being emulated or not matters here. > What matters is whether the feature is available: only if it is then it > should be used. > > > > Furthermore, I am not sure I understand the logic here. The fact that the > hypervisor > > supports PARTITION_REFERENCE_COUNTER does not necessarily mean that we > should register > > a clocksource based on that reference counter. It is true that that is the case on > Hyper-V today. > > However, on other hypervisors emulating Hyper-V, other standard > clocksources maybe more > > appropriate. > > The point is that if a feature is NOT supported, then it should NOT be > used. Only if it is supported, then Linux might consider using it. And > of course can decide not to use it. > > > > I agree with you that your patch is valid for making the Hyper-V code more > robust but not for dealing > > with general issue of Xen emulating Hyper-V. > > What "general issue" would that be?
Not all Hyper-V specific features are advertised via a feature bit. For instance, we need to reserve an IDT entry to have VMBUS interrupts delivered on a per-CPU basis and this reservation is done after confirming that we are running on Hyper-V. With Xen emulating Hyper-V, we have an issue. Since Hyper-V will never emulate Xen, I am going to add a check in the Hyper-V detection code to deal with this issue.
Regards,
K. Y
| |