Skip to content

fix the way riscv_plic_hart_config_string() gets the CPUState

Chao Liu qemu-devel qemu-riscv 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 2 repliesIn review
  2. v31 patch 2 repliesSuperseded
  3. v21 patch 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v01 patch3 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1hw/riscv: fix PLIC hart topology configuration string when not getting CPUState correctlyhw/intc/sifive_plic.c hw/riscv/boot.c hw/riscv/microchip_pfsoc.c +3 more+10 -92 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchTingjian ZhangAlistair Francis
1/1R-b R-b R-b

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

Read the v4 thread

Cover letter [PATCH v4 0/1] fix the way riscv_plic_hart_config_string() gets the CPUState

From: "Chao Liu" <[email protected]>

Hi, all:

Thanks to Alistair for the review~

PATCH v4:

Rebasing this on
https://github.com/alistair23/qemu/tree/riscv-to-apply.next

PATCH v3:

Use cpu_by_arch_id() instead of qemu_get_cpu(), when registering gpio in sifive_plic_create().

PATCH v2:

During plic initialization, CPUSate is obtained by traversing qemu_get_cpu(), which was an early design flaw (see PATCH v1 reviewed).

A better approach is to use riscv's hartid for indexing via the cpu_by_arch_id() interface.

PATCH v1 (Reviewed):
https://lore.kernel.org/qemu-riscv/[email protected]/T/#u

--
Regards,
Chao

Chao Liu (1):
hw/riscv: fix PLIC hart topology configuration string when not getting
CPUState correctly

 hw/intc/sifive_plic.c      | 4 ++--
 hw/riscv/boot.c            | 4 ++--
 hw/riscv/microchip_pfsoc.c | 2 +-
 hw/riscv/sifive_u.c        | 5 +++--
 hw/riscv/virt.c            | 2 +-
 include/hw/riscv/boot.h    | 2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)
Signature · 1 line
2.48.1