mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
KVM: riscv: selftests: Add sstc timer test
Add a KVM selftests to validate the Sstc timer functionality. The test was ported from arm64 arch timer test. Signed-off-by: Haibo Xu <haibo1.xu@intel.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -193,4 +193,14 @@ struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
|
||||
|
||||
bool guest_sbi_probe_extension(int extid, long *out_val);
|
||||
|
||||
static inline void local_irq_enable(void)
|
||||
{
|
||||
csr_set(CSR_SSTATUS, SR_SIE);
|
||||
}
|
||||
|
||||
static inline void local_irq_disable(void)
|
||||
{
|
||||
csr_clear(CSR_SSTATUS, SR_SIE);
|
||||
}
|
||||
|
||||
#endif /* SELFTEST_KVM_PROCESSOR_H */
|
||||
|
||||
Reference in New Issue
Block a user