acrn-hypervisor/hypervisor/common
Victor Sun 9673f3dad4 HV: validate target vm in hypercall
- The target vm in most of hypercalls should be a NORMAL_VM, in some
exceptions it might be a SOS_VM, we should validate them.

- Please be aware that some hypercall might have limitation on specific
target vm like RT or SAFETY VMs, this leaves "TODO" in future;

- Unify the coding style:

	int32_t hcall_foo(vm, target_vm_id, ...)
	{
		int32_t ret = -1;
		...

		if ((is_valid_vm(target_vm) && is_normal_vm(target_vm)) {
			ret = ....
		}

		return ret;
	}

Tracked-On: #2978

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-04-22 19:57:03 +08:00
..
hv_main.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
hypercall.c HV: validate target vm in hypercall 2019-04-22 19:57:03 +08:00
ptdev.c hv: free ptdev device IRQs when shutting down VM 2019-04-22 19:56:39 +08:00
schedule.c HV: Add one delmode parameter to make_reschedule_request 2019-03-29 16:17:44 +08:00
softirq.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
stack_protector.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
static_checks.c hv: use int32_t replace int 2018-12-12 13:08:10 +08:00
trusty_hypercall.c HV: cleanup header files under hypervisor/common 2019-02-28 14:59:22 +08:00
vm_load.c hv: replace MEM_2K with a new macro MAX_BOOTARGS_SIZE for bootargs size 2019-03-21 13:08:15 +08:00