From: Sean Christopherson <seanjc@google.com>
To: Yejune Deng <yejune.deng@gmail.com>
Cc: pbonzini@redhat.com, vkuznets@redhat.com, wanpengli@tencent.com,
jmattson@google.com, joro@8bytes.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: Remove the best->function == 0x7 assignment
Date: Wed, 24 Feb 2021 10:04:19 -0800 [thread overview]
Message-ID: <YDaVIyWSO2hTVAkp@google.com> (raw)
In-Reply-To: <20210224022931.14094-1-yejune.deng@gmail.com>
Hmm, the shortlog should provide a higher level overview of the change. Stating
the literal code change doesn't provide much context. Maybe:
KVM: x86: Remove an unnecessary best->function check
On Wed, Feb 24, 2021, Yejune Deng wrote:
> In kvm_update_cpuid_runtime(), there is no need the best->function
> == 0x7 assignment, because there is e->function == function in
s/assignment/check, here and in the shortlog.
> cpuid_entry2_find().
>
> Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
With the shortlog and changelog cleaned up:
Reviewed-by: Sean Christopherson <seanjc@google.com>
> ---
> arch/x86/kvm/cpuid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index c8f2592ccc99..eb7a01b1907b 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -120,7 +120,7 @@ void kvm_update_cpuid_runtime(struct kvm_vcpu *vcpu)
> }
>
> best = kvm_find_cpuid_entry(vcpu, 7, 0);
> - if (best && boot_cpu_has(X86_FEATURE_PKU) && best->function == 0x7)
> + if (best && boot_cpu_has(X86_FEATURE_PKU))
> cpuid_entry_change(best, X86_FEATURE_OSPKE,
> kvm_read_cr4_bits(vcpu, X86_CR4_PKE));
>
> --
> 2.29.0
>
prev parent reply other threads:[~2021-02-24 18:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 2:29 [PATCH] KVM: x86: Remove the best->function == 0x7 assignment Yejune Deng
2021-02-24 18:04 ` Sean Christopherson [this message]
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=YDaVIyWSO2hTVAkp@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
--cc=yejune.deng@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.