diff options
author | Pavel Tatashin <pasha.tatashin@oracle.com> | 2018-07-19 23:55:20 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-07-20 01:02:36 +0300 |
commit | 368a540e0232ad446931f5a4e8a5e06f69f21343 (patch) | |
tree | 8724da6be43dd468ab751d9208f93656f06aae5d /arch/x86/kernel/kvm.c | |
parent | 73ab603f44149ff48889d5109ea9ab64bf38cc69 (diff) | |
download | linux-368a540e0232ad446931f5a4e8a5e06f69f21343.tar.xz |
x86/kvmclock: Remove memblock dependency
KVM clock is initialized later compared to other hypervisor clocks because
it has a dependency on the memblock allocator.
Bring it in line with other hypervisors by using memory from the BSS
instead of allocating it.
The benefits:
- Remove ifdef from common code
- Earlier availability of the clock
- Remove dependency on memblock, and reduce code
The downside:
- Static allocation of the per cpu data structures sized NR_CPUS * 64byte
Will be addressed in follow up patches.
[ tglx: Split out from larger series ]
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: steven.sistare@oracle.com
Cc: daniel.m.jordan@oracle.com
Cc: linux@armlinux.org.uk
Cc: schwidefsky@de.ibm.com
Cc: heiko.carstens@de.ibm.com
Cc: john.stultz@linaro.org
Cc: sboyd@codeaurora.org
Cc: hpa@zytor.com
Cc: douly.fnst@cn.fujitsu.com
Cc: peterz@infradead.org
Cc: prarit@redhat.com
Cc: feng.tang@intel.com
Cc: pmladek@suse.com
Cc: gnomes@lxorguk.ukuu.org.uk
Cc: linux-s390@vger.kernel.org
Cc: boris.ostrovsky@oracle.com
Cc: jgross@suse.com
Link: https://lkml.kernel.org/r/20180719205545.16512-2-pasha.tatashin@oracle.com
Diffstat (limited to 'arch/x86/kernel/kvm.c')
-rw-r--r-- | arch/x86/kernel/kvm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 5b2300b818af..c65c232d3ddd 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -628,6 +628,7 @@ const __initconst struct hypervisor_x86 x86_hyper_kvm = { .name = "KVM", .detect = kvm_detect, .type = X86_HYPER_KVM, + .init.init_platform = kvmclock_init, .init.guest_late_init = kvm_guest_init, .init.x2apic_available = kvm_para_available, }; |