|
From: | Daniel Henrique Barboza |
Subject: | Re: [PATCH] target/riscv KVM_RISCV_SET_TIMER macro is not configured correctly |
Date: | Fri, 7 Jul 2023 04:16:46 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 |
On 7/7/23 00:23, yang.zhang wrote:
From: "yang.zhang" <yang.zhang@hexintek.com> Should set/get riscv all reg timer,i.e, time/compare/frequency/state.
Nice catch. The reason why this went under the radar for 18 months is because kvm.c is using an external 'time' variable.
Signed-off-by:Yang Zhang <yang.zhang@hexintek.com> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1688 ---
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
target/riscv/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index 30f21453d6..0c567f668c 100644 --- a/target/riscv/kvm.c +++ b/target/riscv/kvm.c @@ -99,7 +99,7 @@ static uint64_t kvm_riscv_reg_id(CPURISCVState *env, uint64_t type,#define KVM_RISCV_SET_TIMER(cs, env, name, reg) \do { \ - int ret = kvm_set_one_reg(cs, RISCV_TIMER_REG(env, time), ®); \ + int ret = kvm_set_one_reg(cs, RISCV_TIMER_REG(env, name), ®); \ if (ret) { \ abort(); \ } \
[Prev in Thread] | Current Thread | [Next in Thread] |