Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fix hgatp mode settings within kvm_riscv_gstage_vmid_detect
@ 2025-08-20 12:59 fangyu.yu
  2025-08-20 12:59 ` [PATCH v3 1/2] RISC-V: KVM: Write hgatp register with valid mode bits fangyu.yu
  2025-08-20 12:59 ` [PATCH v3 2/2] RISC-V KVM: Remove unnecessary HGATP csr_read fangyu.yu
  0 siblings, 2 replies; 8+ messages in thread
From: fangyu.yu @ 2025-08-20 12:59 UTC (permalink / raw)
  To: anup, atish.patra, paul.walmsley, palmer, aou, alex
  Cc: guoren, kvm, kvm-riscv, linux-riscv, linux-kernel, Fangyu Yu

From: Fangyu Yu <fangyu.yu@linux.alibaba.com>

According to the RISC-V Privileged Architecture Spec, when MODE=Bare
is selected,software must write zero to the remaining fields of hgatp.

So,use a valid mode when detecting vmids of the HW supported,meanwhile
remove unnecessary HGATP csr_read.

---
Changes in v3:
 - Add "Fixes" tag.
 - Involve("RISC-V KVM: Remove unnecessary HGATP csr_read"), which
   depends on patch 1.

Changes in v2:
 - Fixed build error since kvm_riscv_gstage_mode() has been modified.
---

Fangyu Yu (1):
  RISC-V: KVM: Write hgatp register with valid mode bits

Guo Ren (Alibaba DAMO Academy) (1):
  RISC-V KVM: Remove unnecessary HGATP csr_read

 arch/riscv/kvm/vmid.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

-- 
2.49.0


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-08-21  3:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 12:59 [PATCH v3 0/2] Fix hgatp mode settings within kvm_riscv_gstage_vmid_detect fangyu.yu
2025-08-20 12:59 ` [PATCH v3 1/2] RISC-V: KVM: Write hgatp register with valid mode bits fangyu.yu
2025-08-20 12:59 ` [PATCH v3 2/2] RISC-V KVM: Remove unnecessary HGATP csr_read fangyu.yu
2025-08-20 14:40   ` Troy Mitchell
2025-08-21  1:13     ` Guo Ren
2025-08-21  1:25     ` Guo Ren
2025-08-21  2:29       ` Guo Ren
2025-08-21  2:49   ` Nutty.Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox