[PATCH 0/2] Risc-V CPU state by hart ID

Mayuresh Chitale posted 2 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230303065055.915652-1-mchitale@ventanamicro.com
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liweiwei@iscas.ac.cn>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
hw/intc/riscv_aclint.c | 16 ++++++++--------
hw/intc/riscv_aplic.c  |  4 ++--
hw/intc/riscv_imsic.c  |  6 +++---
target/riscv/cpu.c     |  8 ++++++++
4 files changed, 21 insertions(+), 13 deletions(-)
[PATCH 0/2] Risc-V CPU state by hart ID
Posted by Mayuresh Chitale 1 year, 1 month ago
Currently a Risc-V platform cannot realizes multiple CPUs with non contiguous
hart IDs because the APLIC, IMSIC and ACLINT emulation code uses the
contiguous logical CPU ID to fetch per CPU state.

This patchset implements cpu_by_arch_id for Risc-V to get the CPU state
by hart ID which may be sparse instead of the contigous logical CPU id.

Mayuresh Chitale (2):
  target/riscv: cpu: Implement get_arch_id callback
  hw: intc: Use cpu_by_arch_id to fetch CPU state

 hw/intc/riscv_aclint.c | 16 ++++++++--------
 hw/intc/riscv_aplic.c  |  4 ++--
 hw/intc/riscv_imsic.c  |  6 +++---
 target/riscv/cpu.c     |  8 ++++++++
 4 files changed, 21 insertions(+), 13 deletions(-)

-- 
2.34.1
Re: [PATCH 0/2] Risc-V CPU state by hart ID
Posted by Palmer Dabbelt 1 year, 1 month ago
On Thu, 02 Mar 2023 22:50:53 PST (-0800), mchitale@ventanamicro.com wrote:
> Currently a Risc-V platform cannot realizes multiple CPUs with non contiguous
> hart IDs because the APLIC, IMSIC and ACLINT emulation code uses the
> contiguous logical CPU ID to fetch per CPU state.
>
> This patchset implements cpu_by_arch_id for Risc-V to get the CPU state
> by hart ID which may be sparse instead of the contigous logical CPU id.
>
> Mayuresh Chitale (2):
>   target/riscv: cpu: Implement get_arch_id callback
>   hw: intc: Use cpu_by_arch_id to fetch CPU state
>
>  hw/intc/riscv_aclint.c | 16 ++++++++--------
>  hw/intc/riscv_aplic.c  |  4 ++--
>  hw/intc/riscv_imsic.c  |  6 +++---
>  target/riscv/cpu.c     |  8 ++++++++
>  4 files changed, 21 insertions(+), 13 deletions(-)

Thanks, these are queue up on riscv-to-apply.next.