RE: [PATCH v2 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-20 Thread Jiangyifei via
l > ; QEMU Developers ; > wanbo (G) ; Palmer Dabbelt ; > kvm-ri...@lists.infradead.org; Wanghaibin (D) > ; Alistair Francis > ; Fanliang (EulerOS) ; > Wubin (H) > Subject: Re: [PATCH v2 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer > > On 12/12/21 9:05 PM, Anup

Re: [PATCH v2 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-13 Thread Richard Henderson
On 12/12/21 9:05 PM, Anup Patel wrote: +ret = kvm_get_one_reg(cs, RISCV_TIMER_REG(env, state), ®); +if (ret) { +abort(); +} +env->kvm_timer_state = reg; Please read the timer frequency here. Yep. + +env->kvm_timer_dirty = true; +} + +static void kvm_riscv_put_reg

Re: [PATCH v2 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-12 Thread Anup Patel
On Fri, Dec 10, 2021 at 3:37 PM Yifei Jiang wrote: > > Add kvm_riscv_get/put_regs_timer to synchronize virtual time context > from KVM. > > To set register of RISCV_TIMER_REG(state) will occur a error from KVM > on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter > that ada

[PATCH v2 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-10 Thread Yifei Jiang via
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context from KVM. To set register of RISCV_TIMER_REG(state) will occur a error from KVM on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter that adaping in QEMU. Signed-off-by: Yifei Jiang Signed-off-by: Mingwan