[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGM2reY5MoUq_BSHwE7GN=55oM1dNhXZ8s_z58HxbARu+REsSA@mail.gmail.com>
Date: Wed, 11 Jul 2018 22:52:53 -0400
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: tglx@...utronix.de
Cc: LKML <linux-kernel@...r.kernel.org>, pbonzini@...hat.com,
rkrcmar@...hat.com, peterz@...radead.org, jgross@...e.com,
Steven Sistare <steven.sistare@...cle.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>, x86@...nel.org,
kvm@...r.kernel.org
Subject: Re: [patch 6/7] x86/kvmclock: Move kvmclock vsyscall param and init
to kvmclock
+#include <asm/hypervisor.h>
Can be removed, because as Paolo, noticed X86_HYPER_KVM check is not needed.
> +static int __init kvm_setup_vsyscall_timeinfo(void)
> +{
> +#ifdef CONFIG_X86_64
> + u8 flags;
> +
> + if (!hv_clock || !kvmclock_vsyscall)
> + return 0;
> +
> + flags = pvclock_read_flags(&hv_clock[0].pvti);
> + if (!(flags & PVCLOCK_TSC_STABLE_BIT))
> + return 1;
> +
> + pvclock_set_pvti_cpu0_va(hv_clock);
> + kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
> +#endif
> + return 0;
> +}
> +early_initcall(kvm_setup_vsyscall_timeinfo);
> +
....
> -
> -int __init kvm_setup_vsyscall_timeinfo(void)
> -{
> -#ifdef CONFIG_X86_64
> - u8 flags;
> -
> - if (!hv_clock)
> - return 0;
> -
> - flags = pvclock_read_flags(&hv_clock[0].pvti);
> - if (!(flags & PVCLOCK_TSC_STABLE_BIT))
> - return 1;
> -
> - pvclock_set_pvti_cpu0_va(hv_clock);
> - kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
> -#endif
> - return 0;
> -}
I am not sure what the point of moving this function. The patch would
be much smaller without it.
Reviewed-by: Pavel Tatashin <pasha.tatashin@...cle.com>
Powered by blists - more mailing lists