RE: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequencyfrom the hypervisor

From: KY Srinivasan
Date: Fri Sep 27 2013 - 11:23:36 EST




> -----Original Message-----
> From: Olaf Hering [mailto:olaf@xxxxxxxxx]
> Sent: Friday, September 27, 2013 8:10 AM
> To: KY Srinivasan
> Cc: x86@xxxxxxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> devel@xxxxxxxxxxxxxxxxxxxxxx; apw@xxxxxxxxxxxxx; jasowang@xxxxxxxxxx;
> tglx@xxxxxxxxxxxxx; hpa@xxxxxxxxx; JBeulich@xxxxxxxx; bp@xxxxxxxxx
> Subject: Re: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency
> from the hypervisor
>
> On Tue, Sep 03, K. Y. Srinivasan wrote:
>
> > Hyper-V supports a mechanism for retrieving the local APIC frequency.Use this
> and bypass
> > the calibration code in the kernel. This would allow us to boot the Linux kernel
> as a
> > "modern VM" on Hyper-V where many of the legacy devices (such as PIT) are
> not emulated.
>
> > + if (ms_hyperv.features & HV_X64_MSR_APIC_FREQUENCY_AVAILABLE) {
> > + /*
> > + * Get the APIC frequency.
> > + */
> > + rdmsrl(HV_X64_MSR_APIC_FREQUENCY, hv_lapic_frequency);
> > + hv_lapic_frequency /= HZ;
>
> This leads to build errors on 32bit:
>
> linux-3.12-rc2/arch/x86/kernel/cpu/mshyperv.c:88: undefined reference to
> `__udivdi3'
>
> Up to now I have only tested on 64bit, sorry for that.

Thanks Olaf. I am travelling currently; I will fix it when I get back (early next week).

K. Y
>
>
> Olaf
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i