acrn-hypervisor/hypervisor/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
..
configs HV: config: add Kconfig and defconfigs for sbl & uefi 2018-06-08 17:21:13 +08:00
guest HV:Hypercall:Remove redundant error checking 2018-09-18 09:43:24 +08:00
assign.c HV: improve pass-thru device interrupt process 2018-09-10 10:12:45 +08:00
cpu_primary.S hv: mmu: cleanup mmu.h 2018-09-03 09:32:49 +08:00
cpu_save_boot_ctx.S hv: move boot_ctx offset definitions 2018-08-14 13:05:06 +08:00
cpu_state_tbl.c HV: Add const qualifiers where required 2018-08-17 10:02:12 +08:00
cpu.c hv: avoid memory leak in trampoline code preparing 2018-09-11 13:00:54 +08:00
cpuid.c hv:Replace vlapic pointer with instance in vcpu_arch 2018-09-12 09:20:07 +08:00
ept.c hv: ept: remove find_next_table 2018-09-03 09:32:49 +08:00
gdt.c HV: Removed the unused parameters and union from gdt 2018-08-27 09:40:25 +08:00
idt.S hv: Leave interrupts disabled during vmexit - ACRN partition mode 2018-08-31 08:48:47 +08:00
io.c hv: Replace dynamic memory allocation for I/O bitmaps 2018-09-12 09:20:07 +08:00
ioapic.c hv: pgtable: fix 'Use of function like macro' 2018-09-07 11:11:06 +08:00
irq.c hv:irq: correct the size of irq_alloc_bitmap 2018-09-13 13:11:31 +08:00
Kconfig security: Enable '-fpie, -pie' options 2018-08-31 11:18:26 +08:00
lapic.c HV: refine 'struct lapic_regs' definition. 2018-09-18 09:09:44 +08:00
mmu.c hv:treewide:fix multiple MISRAC violations 2018-09-13 11:12:29 +08:00
mtrr.c hv: treewide: fix 'Expression is not Boolean' 2018-09-03 11:23:53 +08:00
notify.c hv: treewide: fix 'Expression is not Boolean' 2018-09-03 11:23:53 +08:00
pagetable.c hv: treewide: fix 'Use of function like macro' 2018-09-11 10:49:48 +08:00
pm.c hv: pgtable: fix 'Use of function like macro' 2018-09-07 11:11:06 +08:00
retpoline-thunk.S license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
static_checks.c hv: add compile time assert for static checks 2018-08-14 13:05:06 +08:00
timer.c hv:treewide:fix multiple MISRAC violations 2018-09-13 11:12:29 +08:00
trampoline.S hv: mmu: cleanup mmu.h 2018-09-03 09:32:49 +08:00
trusty.c hv:treewide:fix multiple MISRAC violations 2018-09-13 11:12:29 +08:00
virq.c hv:Replace vlapic pointer with instance in vcpu_arch 2018-09-12 09:20:07 +08:00
vmexit.c hv:Replace vlapic pointer with instance in vcpu_arch 2018-09-12 09:20:07 +08:00
vmx_asm.S fix spec_ctrl msr save/restore 2018-08-16 16:24:13 +08:00
vmx.c hv:treewide:fix multiple MISRAC violations 2018-09-13 11:12:29 +08:00
vtd.c hv: init_iommu rework to enable IOMMU for partition mode ACRN 2018-09-18 09:21:31 +08:00
wakeup.S pm: use cpu_context for s3 save/restore 2018-08-07 09:55:13 +08:00