mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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 <[email protected]> Signed-off-by: Anup Patel <[email protected]> Acked-by: Paolo Bonzini <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Acked-by: Palmer Dabbelt <[email protected]>
17 lines
316 B
C
17 lines
316 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
|
|
*
|
|
* Authors:
|
|
* Atish Patra <[email protected]>
|
|
*/
|
|
|
|
#ifndef __TIMER_RISCV_H
|
|
#define __TIMER_RISCV_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
extern void riscv_cs_get_mult_shift(u32 *mult, u32 *shift);
|
|
|
|
#endif
|