target/riscv/kvm: fix timebase-frequency when using KVM acceleration
authorYong-Xuan Wang <yongxuan.wang@sifive.com>
Thu, 14 Mar 2024 06:15:09 +0000 (14:15 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 22 Mar 2024 05:41:01 +0000 (15:41 +1000)
commit385e575cd5ab2436c123e4b7f8c9b383a64c0dbe
tree388e07c05c4dee30d5579f1f8638f3380e895986
parente06adebb08325c39e4c9b652139426c10f021abb
target/riscv/kvm: fix timebase-frequency when using KVM acceleration

The timebase-frequency of guest OS should be the same with host
machine. The timebase-frequency value in DTS should be got from
hypervisor when using KVM acceleration.

Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Message-ID: <20240314061510.9800-1-yongxuan.wang@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/virt.c
target/riscv/kvm/kvm-cpu.c
target/riscv/kvm/kvm_riscv.h