]> git.baikalelectronics.ru Git - kernel.git/commitdiff
x86/kvm: Don't waste kvmclock memory if there is nopv parameter
authorWanpeng Li <wanpengli@tencent.com>
Tue, 8 Mar 2022 08:18:49 +0000 (00:18 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Apr 2022 17:37:19 +0000 (13:37 -0400)
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>
arch/x86/kernel/kvmclock.c

index c5caa7311bd826154dbfd93b19a4701803e1fea3..16333ba1904ba5b1a31276c77d2807be4a6b72f1 100644 (file)
@@ -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();