Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@ventanamicro.com>
To: "Jinyu Tang" <tjytimi@163.com>,
	"Anup Patel" <anup@brainfault.org>,
	"Atish Patra" <atish.patra@linux.dev>,
	"Andrew Jones" <ajones@ventanamicro.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	"Yong-Xuan Wang" <yongxuan.wang@sifive.com>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Nutty Liu" <nutty.liu@hotmail.com>
Cc: <kvm@vger.kernel.org>, <kvm-riscv@lists.infradead.org>,
	<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	"Tianshun Sun" <stsmail163@163.com>
Subject: Re: [RFC PATCH] kvm/riscv: Add ctxsstatus and ctxhstatus for migration
Date: Mon, 15 Sep 2025 19:01:03 +0200	[thread overview]
Message-ID: <DCTJ9US6E4PG.1MA4ICDR21DS6@ventanamicro.com> (raw)
In-Reply-To: <DCTJ3N8W4PCL.9XCHFVGS62SF@ventanamicro.com>

2025-09-15T18:52:56+02:00, Radim Krčmář <rkrcmar@ventanamicro.com>:
> 2025-09-15T23:27:31+08:00, Jinyu Tang <tjytimi@163.com>:
>> +	if (reg_num == KVM_REG_RISCV_CSR_REG(ctxhstatus))
>> +		csr->ctxhstatus = vcpu->arch.guest_context.hstatus;
>
> Neither should userspace be able to directly set hstatus.
> KVM should derive it from other userspace configuration.
>
> What isn't correctly reflected in hstatus?

Ah, we don't set hstatus.SPVP when setting KVM_REG_RISCV_CORE_REG(mode).

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2025-09-15 17:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15 15:27 [RFC PATCH] kvm/riscv: Add ctxsstatus and ctxhstatus for migration Jinyu Tang
2025-09-15 16:52 ` Radim Krčmář
2025-09-15 17:01   ` Radim Krčmář [this message]
2025-09-15 17:01 ` Andrew Jones

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=DCTJ9US6E4PG.1MA4ICDR21DS6@ventanamicro.com \
    --to=rkrcmar@ventanamicro.com \
    --cc=ajones@ventanamicro.com \
    --cc=anup@brainfault.org \
    --cc=atish.patra@linux.dev \
    --cc=conor.dooley@microchip.com \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=nutty.liu@hotmail.com \
    --cc=paul.walmsley@sifive.com \
    --cc=stsmail163@163.com \
    --cc=tjytimi@163.com \
    --cc=yongxuan.wang@sifive.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