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

Hi,

In this version, aside from minor adjustments suggested by Drew in v2,
the most relevant change made is left mcounteren untouched in patch
8. We're just changing scounteren to target_ulong as required by KVM.

Patches based on alistair/riscv-to-apply.next with a KVM build fix [1]. 

Patches missing review/acks: patch 8.

Changes from v2:
- patch 2:
  - changed 'g+malloc' to 'g-malloc' in the commit msg
- patch 3:
  - changed commit subject: sed s/in/into/
- patch 4:
  - changed commit subject: sed s/in/into/
- patch 5:
  - kvm_cpu_csr_get_u32() now returns an uint32_t (for real this time)
  - tabulate kvm_csrs_cfg[]
- patch 6: 
  - mention kvm_riscv_init_cfg() in commit msg
- patch 8:
  - added comment explaning why we're changing scounteren
  - left mcounteren untouched
- patch 9:
  - add scounteren in the same order as it is shown in kvm_riscv_csr
- v2 link: https://lore.kernel.org/qemu-riscv/20250425113705.2741457-1-dbarboza@ventanamicro.com/

[1] https://lore.kernel.org/qemu-devel/8f3bae37-e1f3-4e55-9dc6-b7876992b47e@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: widen scounteren to target_ulong
  target/riscv/kvm: add scounteren CSR

 target/riscv/cpu.h         |  10 +-
 target/riscv/kvm/kvm-cpu.c | 331 +++++++++++++++++++++++--------------
 target/riscv/machine.c     |   6 +-
 3 files changed, 221 insertions(+), 126 deletions(-)

-- 
2.49.0



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

end of thread, other threads:[~2025-04-28 12:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 16:01 [PATCH v3 0/9] target/riscv/kvm: CSR related fixes Daniel Henrique Barboza
2025-04-25 16:01 ` [PATCH v3 1/9] target/riscv/kvm: minor fixes/tweaks Daniel Henrique Barboza
2025-04-28 11:34   ` Alistair Francis
2025-04-25 16:01 ` [PATCH v3 2/9] target/riscv/kvm: fix leak in kvm_riscv_init_multiext_cfg() Daniel Henrique Barboza
2025-04-28 11:35   ` Alistair Francis
2025-04-25 16:01 ` [PATCH v3 3/9] target/riscv/kvm: turn u32/u64 reg functions into macros Daniel Henrique Barboza
2025-04-28 11:37   ` Alistair Francis
2025-04-25 16:01 ` [PATCH v3 4/9] target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro Daniel Henrique Barboza
2025-04-28 11:41   ` Alistair Francis
2025-04-25 16:01 ` [PATCH v3 5/9] target/riscv/kvm: add kvm_csr_cfgs[] Daniel Henrique Barboza
2025-04-28 11:44   ` Alistair Francis
2025-04-25 16:02 ` [PATCH v3 6/9] target/riscv/kvm: do not read unavailable CSRs Daniel Henrique Barboza
2025-04-25 16:02 ` [PATCH v3 7/9] target/riscv/kvm: add senvcfg CSR Daniel Henrique Barboza
2025-04-25 16:02 ` [PATCH v3 8/9] target/riscv: widen scounteren to target_ulong Daniel Henrique Barboza
2025-04-25 16:43   ` Andrew Jones
2025-04-27  5:59   ` Andrew Jones
2025-04-28 11:34     ` Daniel Henrique Barboza
2025-04-28 12:27     ` Daniel Henrique Barboza
2025-04-25 16:02 ` [PATCH v3 9/9] target/riscv/kvm: add scounteren CSR Daniel Henrique Barboza

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