mbox series

[0/2] hw/riscv/virt: Remove unnecessary use of &first_cpu

Message ID 20250112231344.34632-1-philmd@linaro.org
Headers show
Series hw/riscv/virt: Remove unnecessary use of &first_cpu | expand

Message

Philippe Mathieu-Daudé Jan. 12, 2025, 11:13 p.m. UTC
Pass RISCVCPU to kvm_riscv_get_timebase_frequency(),
then access the first vCPU via Virt::Array::Hart[]
rather than the &first_cpu global, which is going to
be removed as part of the heterogeneous emulation
effort.

Philippe Mathieu-Daudé (2):
  target/riscv: Have kvm_riscv_get_timebase_frequency() take RISCVCPU
    cpu
  hw/riscv/virt: Remove unnecessary use of &first_cpu

 target/riscv/kvm/kvm_riscv.h | 4 +++-
 hw/riscv/virt.c              | 2 +-
 target/riscv/kvm/kvm-cpu.c   | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

Comments

Alistair Francis Jan. 13, 2025, 12:54 a.m. UTC | #1
On Mon, Jan 13, 2025 at 9:14 AM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> Pass RISCVCPU to kvm_riscv_get_timebase_frequency(),
> then access the first vCPU via Virt::Array::Hart[]
> rather than the &first_cpu global, which is going to
> be removed as part of the heterogeneous emulation
> effort.
>
> Philippe Mathieu-Daudé (2):
>   target/riscv: Have kvm_riscv_get_timebase_frequency() take RISCVCPU
>     cpu
>   hw/riscv/virt: Remove unnecessary use of &first_cpu

Thanks!

Applied to riscv-to-apply.next

Alistair

>
>  target/riscv/kvm/kvm_riscv.h | 4 +++-
>  hw/riscv/virt.c              | 2 +-
>  target/riscv/kvm/kvm-cpu.c   | 4 ++--
>  3 files changed, 6 insertions(+), 4 deletions(-)
>
> --
> 2.47.1
>
>