Commit 77d72792 authored by Wanpeng Li's avatar Wanpeng Li Committed by Paolo Bonzini

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: default avatarWanpeng Li <wanpengli@tencent.com>
Message-Id: <1646727529-11774-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 6e97b2b8
...@@ -239,7 +239,7 @@ static void __init kvmclock_init_mem(void) ...@@ -239,7 +239,7 @@ static void __init kvmclock_init_mem(void)
static int __init kvm_setup_vsyscall_timeinfo(void) static int __init kvm_setup_vsyscall_timeinfo(void)
{ {
if (!kvm_para_available() || !kvmclock) if (!kvm_para_available() || !kvmclock || nopv)
return 0; return 0;
kvmclock_init_mem(); kvmclock_init_mem();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment