acrn-hypervisor/hypervisor/arch/x86/guest
Xiangyang Wu bb0a2bc2ab HV:Hypercall:Remove redundant error checking
In the current hypervisor hypercall, first all vcpu is
allocated to SOS, vcpu's vm field is initialized to vm0.
When the vcpu is offlined, vcpu will be paused and vcpu's
vm field is set as NULL by DM. When UOS is created, vcpu's
vm field is set as UOS's vm. So when vmcall_vmexit_handler
is invoked, vcpu's vm filed is always non-NULL.
error checking for vm pointer is done in the function
"vmcall_vmexit_handler", vmcall_vmexit_handler will
guarantee that vm is vm0.

So all hypercall functions (these functions is just for handler
hypercall, except vmcall_vmexit_handler) don't need to check
whether invoking vm is NULL and don't need to check whether
invoking vm is vm0 or not.

Remove related invoking vm error checking for hypercall handling.

V1 --> V2:
	Add pre-condition for hypercall in the head file.
V2 --> V3:
	Add pre-condition for copy_from_gpa and copy_to_gpa.
V3 --> V4:
	Add pre-condition both in the head file and source file.

Tracked-On:#1258

Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-09-18 09:43:24 +08:00
..
guest.c HV:Hypercall:Remove redundant error checking 2018-09-18 09:43:24 +08:00
instr_emul.c HV: update opcode when decode_two_byte_opcode() 2018-09-14 09:26:48 +08:00
instr_emul.h hv: fix the issue of movs emulation 2018-09-13 09:21:59 +08:00
mptable.c hv: pgtable: fix 'Use of function like macro' 2018-09-07 11:11:06 +08:00
pm.c hv: Replace dynamic memory allocation for I/O bitmaps 2018-09-12 09:20:07 +08:00
ucode.c hv: treewide: convert some MACROs to inline functions 2018-09-04 12:27:18 +08:00
vcpu.c hv:Replace vlapic pointer with instance in vcpu_arch 2018-09-12 09:20:07 +08:00
vlapic_priv.h hv:Move vlapic structure to vlapic.h 2018-09-12 09:20:07 +08:00
vlapic.c HV: refine 'struct lapic_regs' definition. 2018-09-18 09:09:44 +08:00
vm.c hv: Replace dynamic memory allocation for MSR bitmap 2018-09-12 09:20:07 +08:00
vmcall.c hv: add a hypercall for the hypervisor NPK log 2018-08-23 11:09:25 +08:00
vmsr.c hv: Replace dynamic memory allocation for MSR bitmap 2018-09-12 09:20:07 +08:00