mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/riscv: implement SBI legacy SET_TIMER support for guests
Add handling of the SBI_EXT_0_1_SET_TIMER function ID to the legacy extension ecall handler. The handler now programs the vCPU’s virtual timer via vtimer_set_timer() and returns SBI_SUCCESS. This enables guests using the legacy SBI timer interface to schedule timer events correctly. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
4313feae90
commit
647542cdf1
1 file changed
+6
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/vsbi.h>
|
||||
#include <asm/vtimer.h>
|
||||
|
||||
static void vsbi_print_char(char c)
|
||||
{
|
||||
@@ -44,6 +45,11 @@ static int vsbi_legacy_ecall_handler(unsigned long eid, unsigned long fid,
|
||||
ret = SBI_ERR_NOT_SUPPORTED;
|
||||
break;
|
||||
|
||||
case SBI_EXT_0_1_SET_TIMER:
|
||||
vtimer_set_timer(¤t->arch.vtimer, regs->a0);
|
||||
regs->a0 = SBI_SUCCESS;
|
||||
break;
|
||||
|
||||
default:
|
||||
/*
|
||||
* TODO: domain_crash() is acceptable here while things are still under
|
||||
|
||||