Skip to content

target/riscv/kvm: CSR related fixes

Daniel Henrique Barboza qemu-devel 5 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 6 repliesApplied
  2. v49 patches 3 repliesSuperseded
  3. v39 patches 9 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v29 patches10 repliesSuperseded
v17 patches10 repliesSuperseded

Changes in v5 from the cover letter

- patch 8:
- remove the 'reg32' variable and add an uint32_t cast when passing

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/9target/riscv/kvm: minor fixes/tweakstarget/riscv/kvm/kvm-cpu.c+14 -150 replies
2/9target/riscv/kvm: fix leak in kvm_riscv_init_multiext_cfg()target/riscv/kvm/kvm-cpu.c+1 -10 replies
3/9target/riscv/kvm: turn u32/u64 reg functions into macrostarget/riscv/kvm/kvm-cpu.c+9 -130 replies
4/9target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macrotarget/riscv/kvm/kvm-cpu.c+41 -580 replies
5/9target/riscv/kvm: add kvm_csr_cfgs[]target/riscv/cpu.h target/riscv/kvm/kvm-cpu.c+86 -360 replies
6/9target/riscv/kvm: do not read unavailable CSRstarget/riscv/kvm/kvm-cpu.c+59 -31 reply
7/9target/riscv/kvm: add senvcfg CSRtarget/riscv/kvm/kvm-cpu.c+2 -01 reply
8/9target/riscv/kvm: read/write KVM regs via env sizetarget/riscv/kvm/kvm-cpu.c+7 -52 replies
9/9target/riscv/kvm: add scounteren CSRtarget/riscv/kvm/kvm-cpu.c+2 -01 reply

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchAndrew JonesAlistair Francis
1/9R-b R-b
2/9R-b R-b
3/9R-b R-b
4/9R-b R-b
5/9R-b A-b
6/9R-b A-b
7/9R-b A-b
8/9R-b R-b
9/9R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/9] target/riscv/kvm: CSR related fixes

Hi,

This version has a fix on patch 8 where I did use an extra variable and happened to set the wrong mask too.

We'll let the compiler cast the uint32_t from an uint64_t reg. A cast was added for extra clarity when reading the code, although some picky toolchains might require an explicit cast in this case too.

No other changes made.

Patches missing acks/reviews: patch 8.

Changes from v4:
- patch 8:
- remove the 'reg32' variable and add an uint32_t cast when passing

    the uint64_t var 'reg' to kvm_cpu_csr_set_u32()

- v4 link: https://lore.kernel.org/qemu-riscv/[email protected]/

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 | 333 +++++++++++++++++++++++--------------
 2 files changed, 212 insertions(+), 122 deletions(-)
Signature · 1 line
2.49.0