qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Harsh Prateek Bora <harshpb@linux.ibm.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Weiwei Li <liwei1518@gmail.com>,
	David Hildenbrand <david@redhat.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
	qemu-s390x@nongnu.org, Song Gao <gaosong@loongson.cn>,
	Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Eric Farman <farman@linux.ibm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Halil Pasic <pasic@linux.ibm.com>,
	kvm@vger.kernel.org, Aurelien Jarno <aurelien@aurel32.net>,
	Aleksandar Rikalo <arikalo@gmail.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Huacai Chen <chenhuacai@kernel.org>,
	qemu-riscv@nongnu.org, Nicholas Piggin <npiggin@gmail.com>,
	Chinmay Rath <rathc@linux.ibm.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>,
	Thomas Huth <thuth@redhat.com>,
	qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH 1/3] accel/kvm: Do not expect more then KVM_PUT_FULL_STATE
Date: Tue, 7 Oct 2025 13:50:29 +0530	[thread overview]
Message-ID: <43f8ed49-e4f7-4ca6-b41a-9b0fec7592c6@linux.ibm.com> (raw)
In-Reply-To: <20251007081616.68442-2-philmd@linaro.org>



On 10/7/25 13:46, Philippe Mathieu-Daudé wrote:
> KVM_PUT_FULL_STATE is the higher level defined so far in

s/higher/highest ?

With that,
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>

> "system/kvm.h"; do not check for more.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/loongarch/kvm/kvm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c
> index e5ea2dba9da..45292edcb1c 100644
> --- a/target/loongarch/kvm/kvm.c
> +++ b/target/loongarch/kvm/kvm.c
> @@ -397,7 +397,7 @@ static int kvm_loongarch_put_csr(CPUState *cs, int level)
>                              &env->CSR_RVACFG);
>   
>       /* CPUID is constant after poweron, it should be set only once */
> -    if (level >= KVM_PUT_FULL_STATE) {
> +    if (level == KVM_PUT_FULL_STATE) {
>           ret |= kvm_set_one_reg(cs, KVM_IOC_CSRID(LOONGARCH_CSR_CPUID),
>                              &env->CSR_CPUID);
>       }
> @@ -801,7 +801,7 @@ int kvm_arch_put_registers(CPUState *cs, int level, Error **errp)
>           once = 1;
>       }
>   
> -    if (level >= KVM_PUT_FULL_STATE) {
> +    if (level == KVM_PUT_FULL_STATE) {
>           /*
>            * only KVM_PUT_FULL_STATE is required, kvm kernel will clear
>            * guest_addr for KVM_PUT_RESET_STATE


  reply	other threads:[~2025-10-07  8:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07  8:16 [PATCH 0/3] accel/kvm: Cleanups around kvm_arch_put_registers() Philippe Mathieu-Daudé
2025-10-07  8:16 ` [PATCH 1/3] accel/kvm: Do not expect more then KVM_PUT_FULL_STATE Philippe Mathieu-Daudé
2025-10-07  8:20   ` Harsh Prateek Bora [this message]
2025-10-07  8:16 ` [PATCH 2/3] accel/kvm: Introduce KvmPutState enum Philippe Mathieu-Daudé
2025-10-07  8:30   ` Harsh Prateek Bora
2025-10-07  8:16 ` [PATCH 3/3] accel/kvm: Factor kvm_cpu_synchronize_put() out Philippe Mathieu-Daudé
2025-10-07 13:30   ` Andrew Jones
2025-10-07 13:53     ` Philippe Mathieu-Daudé
2025-10-07 19:34   ` Richard Henderson

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=43f8ed49-e4f7-4ca6-b41a-9b0fec7592c6@linux.ibm.com \
    --to=harshpb@linux.ibm.com \
    --cc=alistair.francis@wdc.com \
    --cc=arikalo@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=borntraeger@linux.ibm.com \
    --cc=chenhuacai@kernel.org \
    --cc=david@redhat.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=farman@linux.ibm.com \
    --cc=gaosong@loongson.cn \
    --cc=iii@linux.ibm.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liwei1518@gmail.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=mtosatti@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rathc@linux.ibm.com \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=zhiwei_liu@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).