APPLIED: [X][PATCH 0/2] LP#1822821 TSC clocksource not available in nested guests

Khaled Elmously khalid.elmously at canonical.com
Mon Apr 15 04:13:05 UTC 2019


On 2019-04-02 14:49:00 , Heitor R. Alves de Siqueira wrote:
> BugLink: https://bugs.launchpad.net/bugs/1822821
> 
> [Impact]
>  * TSC clocksource not available in nested guests
> 
> [Test Case]
>  * Spin up a nested Xenial/Bionic guest and check for 'tsc' at
>    /sys/devices/system/clocksource/clocksource0/available_clocksource
> 
> [Regression Potential]
>  * The regression potential is low. Upstream code still maintains this
>    behaviour of skipping calibration on guests, and tsc code verifies if
>    the frequency is known before registering the clocksource
> 
>  * Patches were verified against the above test case, and also tested
>    with stress-ng in both nested and non-nested guest scenarios
> 
> [Fix]
>  * By applying the upstream commits, we skip refined calibration and
>    register TSC as a clocksource directly if its frequency is known (via
>    MSR or CPUID)
> 
> [Other Info]
>  * Xenial needs 2 patches, Bionic needs 1 patch
>  * Cosmic onwards (kernels 4.18+) are already fixed
> 
> Bin Gao (1):
>   x86/tsc: Add X86_FEATURE_TSC_KNOWN_FREQ flag
> 
> Peng Hao (1):
>   kvmclock: fix TSC calibration for nested guests
> 
>  arch/x86/include/asm/cpufeatures.h |  1 +
>  arch/x86/kernel/kvmclock.c         |  1 +
>  arch/x86/kernel/tsc.c              | 11 ++++++++---
>  3 files changed, 10 insertions(+), 3 deletions(-)
> 
> -- 
> 2.21.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



More information about the kernel-team mailing list