acrn-hypervisor/hypervisor/arch/x86
Yin Fengwei bca43b5324 hv: avoid memory leak in trampoline code preparing
In function start_cpus, we allocated memory under 1M when
preparing AP trampoline code.

With S3 feature enabled, start_cpus is called every time after
ACRN resume from S3 which leaks the allocated memory for AP
trampoline code.

To avoid memory leak, move the AP trampoline preparing function
out of start_cpus to make sure the memory for AP trampoline is
only allocated one time when system boot.

Tracked-On: #1156
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Zide Chen <zide.chen@intel.com>
2018-09-11 13:00:54 +08:00
..
configs HV: config: add Kconfig and defconfigs for sbl & uefi 2018-06-08 17:21:13 +08:00
guest hv: treewide: fix 'Use of function like macro' 2018-09-11 10:49:48 +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: vcpuid: disable some features in cpuid 2018-08-23 08:54:27 +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 io: tiny fix for error message 2018-09-11 10:47:34 +08:00
ioapic.c hv: pgtable: fix 'Use of function like macro' 2018-09-07 11:11:06 +08:00
irq.c hv: pirq: use a bitmap to maintain irq use status 2018-08-22 12:52:43 +08:00
Kconfig security: Enable '-fpie, -pie' options 2018-08-31 11:18:26 +08:00
lapic.c hv: pgtable: fix 'Use of function like macro' 2018-09-07 11:11:06 +08:00
mmu.c hv: pgtable: fix 'Use of function like macro' 2018-09-07 11:11:06 +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:Changed several APIs to void type 2018-08-23 08:54:54 +08:00
trampoline.S hv: mmu: cleanup mmu.h 2018-09-03 09:32:49 +08:00
trusty.c trusty: do not destroy secure world if it's not created 2018-09-11 10:47:34 +08:00
virq.c hv: virq: make irq_window_enabled useful 2018-09-10 10:12:18 +08:00
vmexit.c hv: treewide: convert some MACROs to inline functions 2018-09-04 12:27:18 +08:00
vmx_asm.S fix spec_ctrl msr save/restore 2018-08-16 16:24:13 +08:00
vmx.c hv: treewide: fix 'Use of function like macro' 2018-09-11 10:49:48 +08:00
vtd.c hv: treewide: fix 'Use of function like macro' 2018-09-11 10:49:48 +08:00
wakeup.S pm: use cpu_context for s3 save/restore 2018-08-07 09:55:13 +08:00