qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/9] target/riscv/kvm: CSR related fixes
@ 2025-04-28 19:23 Daniel Henrique Barboza
  2025-04-28 19:23 ` [PATCH v4 1/9] target/riscv/kvm: minor fixes/tweaks Daniel Henrique Barboza
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2025-04-28 19:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, alistair.francis, liwei1518, zhiwei_liu, palmer,
	ajones, Daniel Henrique Barboza

Hi,

In this new version a change was made in patch 8. Instead of changing
scounteren to target_ulong, change the current logic to honor the QEMU
env storage instead of the KVM reg size. 

This will make QEMU the authority when deciding how to read/write the
CSRs in the env flags instead of KVM.

We're doing this change in patch 8 but it could also be squashed into
patch 4. If the code in patch 8 is good to go I don't oppose merging it
with patch 4 if desired.

No other changes made. 

Patches missing acks/review: patch 8.

Changes from v3:
- patch 8:
  - instead of widening scounteren, use the QEMU storage size instead of
    KVM reg size when reading/writing KVM CSRs
- v3 link: https://lore.kernel.org/qemu-riscv/20250425160203.2774835-1-dbarboza@ventanamicro.com/

Daniel Henrique Barboza (9):
  target/riscv/kvm: minor fixes/tweaks
  target/riscv/kvm: fix leak in kvm_riscv_init_multiext_cfg()
  target/riscv/kvm: turn u32/u64 reg functions into macros
  target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro
  target/riscv/kvm: add kvm_csr_cfgs[]
  target/riscv/kvm: do not read unavailable CSRs
  target/riscv/kvm: add senvcfg CSR
  target/riscv/kvm: read/write KVM regs via env size
  target/riscv/kvm: add scounteren CSR

 target/riscv/cpu.h         |   1 +
 target/riscv/kvm/kvm-cpu.c | 335 +++++++++++++++++++++++--------------
 2 files changed, 214 insertions(+), 122 deletions(-)

-- 
2.49.0



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

end of thread, other threads:[~2025-04-29 10:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28 19:23 [PATCH v4 0/9] target/riscv/kvm: CSR related fixes Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 1/9] target/riscv/kvm: minor fixes/tweaks Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 2/9] target/riscv/kvm: fix leak in kvm_riscv_init_multiext_cfg() Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 3/9] target/riscv/kvm: turn u32/u64 reg functions into macros Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 4/9] target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 5/9] target/riscv/kvm: add kvm_csr_cfgs[] Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 6/9] target/riscv/kvm: do not read unavailable CSRs Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 7/9] target/riscv/kvm: add senvcfg CSR Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 8/9] target/riscv/kvm: read/write KVM regs via env size Daniel Henrique Barboza
2025-04-29  9:02   ` Andrew Jones
2025-04-29 10:39     ` Daniel Henrique Barboza
2025-04-28 19:23 ` [PATCH v4 9/9] target/riscv/kvm: add scounteren CSR Daniel Henrique Barboza
2025-04-29  9:03 ` [PATCH v4 0/9] target/riscv/kvm: CSR related fixes Andrew Jones

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).