public inbox for linux-mips@vger.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Huacai Chen <chenhuacai@kernel.org>,
	linux-mips@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled
Date: Fri, 7 Jul 2023 10:50:01 +0200	[thread overview]
Message-ID: <d662fe0e-e463-5c22-2e31-31aec6307c05@linaro.org> (raw)
In-Reply-To: <20230706163610.106938-1-tsbogend@alpha.franken.de>

On 6/7/23 18:36, Thomas Bogendoerfer wrote:
> Commit e4de20576986 ("MIPS: KVM: Fix NULL pointer dereference") missed
> converting one place accessing cop0 registers, which results in a build
> error, if KVM_MIPS_DEBUG_COP0_COUNTERS is enabled.
> 
> Fixes: e4de20576986 ("MIPS: KVM: Fix NULL pointer dereference")
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> ---
>   arch/mips/kvm/stats.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/kvm/stats.c b/arch/mips/kvm/stats.c
> index 53f851a61554..3e6682018fbe 100644
> --- a/arch/mips/kvm/stats.c
> +++ b/arch/mips/kvm/stats.c
> @@ -54,9 +54,9 @@ void kvm_mips_dump_stats(struct kvm_vcpu *vcpu)
>   	kvm_info("\nKVM VCPU[%d] COP0 Access Profile:\n", vcpu->vcpu_id);
>   	for (i = 0; i < N_MIPS_COPROC_REGS; i++) {
>   		for (j = 0; j < N_MIPS_COPROC_SEL; j++) {
> -			if (vcpu->arch.cop0->stat[i][j])
> +			if (vcpu->arch.cop0.stat[i][j])
>   				kvm_info("%s[%d]: %lu\n", kvm_cop0_str[i], j,
> -					 vcpu->arch.cop0->stat[i][j]);
> +					 vcpu->arch.cop0.stat[i][j]);
>   		}
>   	}
>   #endif

Oops, sorry I missed that :/

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  reply	other threads:[~2023-07-07  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 16:36 [PATCH] MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled Thomas Bogendoerfer
2023-07-07  8:50 ` Philippe Mathieu-Daudé [this message]
2023-07-07 12:43 ` Thomas Bogendoerfer

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=d662fe0e-e463-5c22-2e31-31aec6307c05@linaro.org \
    --to=philmd@linaro.org \
    --cc=chenhuacai@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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