mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH] x86/kvm: Don't waste kvmclock memory if there is nopv parameter
Date: Tue, 8 Mar 2022 13:13:54 +0100	[thread overview]
Message-ID: <6e57aad6-1322-8a3d-6dfa-ff010a61a9a9@redhat.com> (raw)
In-Reply-To: <1646727529-11774-1-git-send-email-wanpengli@tencent.com>

On 3/8/22 09:18, Wanpeng Li wrote:
> From: Wanpeng Li <wanpengli@tencent.com>
> 
> When the "nopv" command line parameter is used, it should not waste
> memory for kvmclock.
> 
> Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
> ---
>   arch/x86/kernel/kvmclock.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
> index c5caa73..16333ba 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();

Perhaps instead !kvm_para_available() && nopv should clear the kvmclock 
variable?

Paolo

  reply	other threads:[~2022-03-08 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08  8:18 Wanpeng Li
2022-03-08 12:13 ` Paolo Bonzini [this message]
2022-03-09  1:36   ` Wanpeng Li
2022-04-08  7:44 ` Wanpeng Li
2022-04-08 16:47 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e57aad6-1322-8a3d-6dfa-ff010a61a9a9@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®