base-hw: do direct syscall when run/pause a VCPU

Instead of calling core to run/pause a VCPU, go directly to the kernel.
Apart from the performance win, it would otherwise involve a more complex
protocol, when a VCPU on another core has to be removed from the scheduler.
Core's entrypoint handling those request runs on the boot-cpu only.

Ref #3926
This commit is contained in:
Stefan Kalkowski
2020-10-09 10:33:44 +02:00
committed by Christian Helmuth
parent 40445d7011
commit 1d826a2c48
11 changed files with 130 additions and 42 deletions

View File

@@ -42,6 +42,8 @@ namespace Kernel
constexpr Call_arg call_id_timeout() { return 16; }
constexpr Call_arg call_id_timeout_max_us() { return 17; }
constexpr Call_arg call_id_time() { return 18; }
constexpr Call_arg call_id_run_vm() { return 19; }
constexpr Call_arg call_id_pause_vm() { return 20; }
/*****************************************************************
@@ -369,6 +371,28 @@ namespace Kernel
{
call(call_id_delete_cap(), cap);
}
/**
* Execute a virtual-machine (again)
*
* \param vm pointer to vm kernel object
*/
inline void run_vm(capid_t const cap)
{
call(call_id_run_vm(), cap);
}
/**
* Stop execution of a virtual-machine
*
* \param vm pointer to vm kernel object
*/
inline void pause_vm(capid_t const cap)
{
call(call_id_pause_vm(), cap);
}
}
#endif /* _INCLUDE__KERNEL__INTERFACE_H_ */