acrn-hypervisor/hypervisor/include/arch/x86
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 HV:Hypercall:Remove redundant error checking 2018-09-18 09:43:24 +08:00
apicreg.h HV: refine 'struct lapic_regs' definition. 2018-09-18 09:09:44 +08:00
assign.h hv: ptdev: remove vector index from structure ptdev_msi_info 2018-08-23 11:10:04 +08:00
cpu.h hv: treewide: fix 'Use of function like macro' 2018-09-11 10:49:48 +08:00
cpufeatures.h HV:CPU: Add 'U/UL' for unsigned const value 2018-07-09 10:27:21 +08:00
cpuid.h hv:Replace vlapic pointer with instance in vcpu_arch 2018-09-12 09:20:07 +08:00
gdt.h HV: Removed the unused parameters and union from gdt 2018-08-27 09:40:25 +08:00
hob_parse.h HV: handle integral issues as MISRA-C report 2018-07-20 10:39:46 +08:00
host_pm.h hv: trap vm0 write/read pm1a/pm1b registers 2018-06-29 00:50:01 +08:00
hv_arch.h hv: merge pgtable_types.h and pgtable.h 2018-09-13 16:17:48 +08:00
idt.h HV:treewide:transfer the struct member types to non-basic types 2018-06-29 15:48:19 +08:00
io.h hv: add mmio functions for 64bit values 2018-08-23 11:09:25 +08:00
ioapic.h hv: fix 'Procedure is not called or referenced in code analysed' 2018-09-06 12:01:30 +08:00
ioreq.h hv: Replace dynamic memory allocation for I/O bitmaps 2018-09-12 09:20:07 +08:00
irq.h hv: pirq: use a bitmap to maintain irq use status 2018-08-22 12:52:43 +08:00
lapic.h hv:fixed MISRA-C return value violations 2018-08-21 09:54:45 +08:00
mmu.h hv: treewide: fix 'Use of function like macro' 2018-09-11 10:49:48 +08:00
msr.h hv: treewide: fix 'Use of function like macro' 2018-09-11 10:49:48 +08:00
mtrr.h HV: remove 'warm_reboot()'function and other minor cleanup 2018-08-14 09:54:48 +08:00
multiboot.h hv: Partition mode ACRN -kernel load and bootargs load address 2018-08-13 09:34:02 +08:00
per_cpu.h hv: Replace dynamic allocation with static memory for vmxon_region 2018-09-07 10:23:04 +08:00
pgtable.h hv: merge pgtable_types.h and pgtable.h 2018-09-13 16:17:48 +08:00
timer.h hv:fixed several return value violations 2018-08-20 09:51:07 +08:00
trusty.h hv: Fix comments referring to wrong hypervisor name 2018-08-17 10:03:32 +08:00
vmexit.h hv: treewide: convert some MACROs to inline functions 2018-09-04 12:27:18 +08:00
vmx.h hv: add SMAP/SMEP check during guest page walking 2018-09-13 09:21:59 +08:00
vtd.h hv: vtd: use EPT as translation table for PTDev in SOS 2018-08-23 11:46:57 +08:00
zeropage.h license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00