]> git.baikalelectronics.ru Git - kernel.git/commit
x86/kvm: Don't waste memory if kvmclock is disabled
authorWanpeng Li <wanpengli@tencent.com>
Tue, 22 Feb 2022 09:02:03 +0000 (01:02 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 15:09:34 +0000 (10:09 -0500)
commitc4982d4ff44af31b1ef02c73f45acde904019f63
tree8810288e3d48c3a5997391d3840d05f05ee1a94e
parent3e57d3d2a5c3c3fd8812e3deaa1b77306324c873
x86/kvm: Don't waste memory if kvmclock is disabled

Even if "no-kvmclock" is passed in cmdline parameter, the guest kernel
still allocates hvclock_mem which is scaled by the number of vCPUs,
let's check kvmclock enable in advance to avoid this memory waste.

Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1645520523-30814-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/kvmclock.c