diff options
author | Wanpeng Li <wanpengli@tencent.com> | 2022-03-08 00:18:49 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-13 13:37:19 -0400 |
commit | 77d727926607ba42f0c4ba82baaec1076e8cbebf (patch) | |
tree | 6118447668ef02b61d99513de6274d897328fda3 /arch/x86/kernel/kvmclock.c | |
parent | 6e97b2b822902f80142be26614fc0f6a8053ac45 (diff) | |
download | linux-stable-77d727926607ba42f0c4ba82baaec1076e8cbebf.tar.gz linux-stable-77d727926607ba42f0c4ba82baaec1076e8cbebf.tar.bz2 linux-stable-77d727926607ba42f0c4ba82baaec1076e8cbebf.zip |
x86/kvm: Don't waste kvmclock memory if there is nopv parameter
When the "nopv" command line parameter is used, it should not waste
memory for kvmclock.
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1646727529-11774-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kernel/kvmclock.c')
-rw-r--r-- | arch/x86/kernel/kvmclock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index c5caa7311bd8..16333ba1904b 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c @@ -239,7 +239,7 @@ static void __init kvmclock_init_mem(void) static int __init kvm_setup_vsyscall_timeinfo(void) { - if (!kvm_para_available() || !kvmclock) + if (!kvm_para_available() || !kvmclock || nopv) return 0; kvmclock_init_mem(); |