-
- Downloads
RISC-V: KVM: Add timer functionality
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. Signed-off-by:Atish Patra <atish.patra@wdc.com> Signed-off-by:
Anup Patel <anup.patel@wdc.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Acked-by:
Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by:
Palmer Dabbelt <palmerdabbelt@google.com>
Showing
- arch/riscv/include/asm/kvm_host.h 7 additions, 0 deletionsarch/riscv/include/asm/kvm_host.h
- arch/riscv/include/asm/kvm_vcpu_timer.h 44 additions, 0 deletionsarch/riscv/include/asm/kvm_vcpu_timer.h
- arch/riscv/include/uapi/asm/kvm.h 17 additions, 0 deletionsarch/riscv/include/uapi/asm/kvm.h
- arch/riscv/kvm/Makefile 1 addition, 0 deletionsarch/riscv/kvm/Makefile
- arch/riscv/kvm/vcpu.c 14 additions, 0 deletionsarch/riscv/kvm/vcpu.c
- arch/riscv/kvm/vcpu_timer.c 225 additions, 0 deletionsarch/riscv/kvm/vcpu_timer.c
- arch/riscv/kvm/vm.c 1 addition, 1 deletionarch/riscv/kvm/vm.c
- drivers/clocksource/timer-riscv.c 9 additions, 0 deletionsdrivers/clocksource/timer-riscv.c
- include/clocksource/timer-riscv.h 16 additions, 0 deletionsinclude/clocksource/timer-riscv.h
Loading
Please register or sign in to comment