RISC-V: KVM: Add timer functionality
euleros inclusion category: feature feature: initial KVM RISC-V support bugzilla: 46845 CVE: NA The RISC-V hypervisor specification doesn't have any virtual timer feature. Due to this, the guest VCPU timer will be programmed via SBI calls. The host will use a separate hrtimer event for each guest VCPU to provide timer functionality. We inject a virtual timer interrupt to the guest VCPU whenever the guest VCPU hrtimer event expires. This patch adds guest VCPU timer implementation along with ONE_REG interface to access VCPU timer state from user space. Reference: https://gitee.com/openeuler/kernel/issues/I26X9VSigned-off-by: NAtish Patra <atish.patra@wdc.com> Signed-off-by: NAnup Patel <anup.patel@wdc.com> Signed-off-by: NMingwang Li <limingwang@huawei.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NYifei Jiang <jiangyifei@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
Showing
arch/riscv/kvm/vcpu_timer.c
0 → 100644
include/clocksource/timer-riscv.h
0 → 100644
想要评论请 注册 或 登录