lkml.org 
[lkml]   [2013]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Hyper-V: register clocksource only if its advertised
On Fri, Jan 25, KY Srinivasan wrote:

>
>
> > -----Original Message-----
> > From: Olaf Hering [mailto:olaf@aepfle.de]
> > Sent: Friday, January 25, 2013 8:37 AM
> > To: linux-kernel@vger.kernel.org
> > Cc: Olaf Hering; stable@kernel.org; KY Srinivasan; Greg KH
> > Subject: [PATCH] x86: Hyper-V: register clocksource only if its advertised
> >
> > Enable hyperv_clocksource only if its advertised as a feature.
> > XenServer 6 returns the signature which is checked in
> > ms_hyperv_platform(), but it does not offer all features. Currently the
> > clocksource is enabled unconditionally in ms_hyperv_init_platform(), and
> > the result is a hanging guest.
> >
> > Hyper-V spec Bit 1 indicates the availability of Partition Reference
> > Counter. Register the clocksource only if this bit is set.
> >
> > The guest in question prints this in dmesg:
> > [ 0.000000] Hypervisor detected: Microsoft HyperV
> > [ 0.000000] HyperV: features 0x70, hints 0x0
> >
> > This bug can be reproduced easily be setting 'viridian=1' in a HVM domU
> > .cfg file. A workaround without this patch is to boot the HVM guest with
> > 'clocksource=jiffies'.
>
> I am curious why you are setting viridian=1 for a Linux HVM guest. Initially when
> I did the Hyper-V emulation work on Xen, this configuration flag would be set only
> for Windows guests since the idea was to run the "enlightened" Windows on Xen.
> While the current Xen emulation code does not emulate "Partition Reference Counter"
> there is no guarantee that Xen would not do this in the future. Perhaps dealing with this issue
> by identifying the guest (via the viridian domain or not) may be a safer approach?

I'm not sure if XenServer does that per default, but I used the
viridian= flag to reproduce the report.
If Xen starts to emulate the "Partition Reference Counter" it should
also advertise this emulation with the feature flag. Are you saying that
checking for features is not the right approach?

Olaf


\
 
 \ /
  Last update: 2013-01-25 18:21    [W:0.068 / U:5.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site