mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
hypercall: only allow hypercall from RING-0
only allow hypercall from RING-0 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -52,6 +52,11 @@ int vmcall_vmexit_handler(struct vcpu *vcpu)
|
||||
/* hypercall param4 from guest, reserved*/
|
||||
/* uint64_t param4 = cur_context->guest_cpu_regs.regs.rcx; */
|
||||
|
||||
if (!is_hypercall_from_ring0()) {
|
||||
pr_err("hypercall is only allowed from RING-0!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Dispatch the hypercall handler */
|
||||
switch (hypcall_id) {
|
||||
case HC_GET_API_VERSION:
|
||||
|
Reference in New Issue
Block a user