mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Xiaoyao Li" <xiaoyao.li@intel.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Chenyi Qiang <chenyi.qiang@intel.com>
Subject: Re: [PATCH] KVM: X86: Reset the three MSR list number variables to 0 in kvm_init_msr_list()
Date: Wed, 13 Nov 2019 09:20:41 +0100	[thread overview]
Message-ID: <02a71740-a98d-622e-ee3e-705fe707c772@redhat.com> (raw)
In-Reply-To: <20191113011521.32255-1-xiaoyao.li@intel.com>

On 13/11/19 02:15, Xiaoyao Li wrote:
> When applying commit 7a5ee6edb42e ("KVM: X86: Fix initialization of MSR
> lists"), it forgot to reset the three MSR lists number varialbes to 0
> while removing the useless conditionals.
> 
> Fixes: 7a5ee6edb42e (KVM: X86: Fix initialization of MSR lists)
> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
>  arch/x86/kvm/x86.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 8c8a5e20ea06..9368b0e6bf21 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -5102,6 +5102,10 @@ static void kvm_init_msr_list(void)
>  
>  	perf_get_x86_pmu_capability(&x86_pmu);
>  
> +	num_msrs_to_save = 0;
> +	num_emulated_msrs = 0;
> +	num_msr_based_features = 0;
> +
>  	for (i = 0; i < ARRAY_SIZE(msrs_to_save_all); i++) {
>  		if (rdmsr_safe(msrs_to_save_all[i], &dummy[0], &dummy[1]) < 0)
>  			continue;
> 

Ouch.  Sorry.

Paolo


      reply	other threads:[~2019-11-13  8:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  1:15 Xiaoyao Li
2019-11-13  8:20 ` Paolo Bonzini [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=02a71740-a98d-622e-ee3e-705fe707c772@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=chenyi.qiang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=xiaoyao.li@intel.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®