acrn-hypervisor/devicemodel/core
Jian Jun Chen 46b157008c dm: file lock should be held till all mmap is done
Lock should be held till all the mmap operations are done. This is to
avoid the mmap failure when multiple guests are created concurrently.
For example consider the following case in which vm1 and vm2 are
created by acrnd concurrently:
- vm1 is created with 4G+2M memory.
- 4G+2M memory is reserved in hugetlb now and vm1 continues to
  allocate memory for the lowmem without lock held.
- 2G memory is allocated by vm1 for its lowmem, and 2G+2M memory
  is available in hugetlb.
- At this time vm2 is created with 1G+2M memory. It finds that enough
  memory is reserved (2G+2M), so it does not try to reserve more
  memory.
- vm2 allocates some memory for its lowmem/highmem/ovmf.
- vm1 tries to allocate memory for its highmem/ovmf, the allocation
  will fail. vm1 creation failed in this case.

Tracked-On: #3947
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-10-30 11:37:44 +08:00
..
console.c DM: remove unused function console_ptr_event 2019-05-24 11:51:00 +08:00
gc.c dm: gc: clean up assert 2019-07-03 09:40:15 +08:00
hugetlb.c dm: file lock should be held till all mmap is done 2019-10-30 11:37:44 +08:00
inout.c dm: refine 'assert' in inout.c and post.c 2019-06-20 08:55:44 +08:00
main.c dm: Add Oracle subsystem vendor ID 2019-10-11 13:20:19 +08:00
mem.c dm: refine 'assert' in hugetlb.c and mem.c 2019-06-20 08:55:44 +08:00
mevent.c dm: refine assert usage 2019-06-24 11:57:05 +08:00
monitor.c DM: to avoid RTVM shutdown forcely by acrn-dm 2019-09-11 16:43:22 +08:00
mptbl.c DM: remove unused function mptable_add_oemtbl 2019-05-24 11:51:00 +08:00
pm.c DM: register pm ops to monitor 2018-08-02 13:14:03 +08:00
pm_vuart.c DM: add guest vm power manager by vuart 2019-09-11 16:43:22 +08:00
post.c dm: refine 'assert' in inout.c and post.c 2019-06-20 08:55:44 +08:00
sw_load_bzimage.c dm: bzimage loader: get linux bzimage setup_sects from header 2019-08-27 09:46:23 +08:00
sw_load_common.c dm: reserve 16M hole for gvt in e820 table 2019-09-10 09:50:39 +08:00
sw_load_elf.c dm: close filepointer before exiting acrn_load_elf() 2019-10-17 13:13:06 +08:00
sw_load_ovmf.c DM: ovmf NV storage writeback support 2019-07-22 11:18:47 +08:00
sw_load_vsbl.c dm: cleanup 'assert' for guest software loading module 2019-06-20 08:55:44 +08:00
timer.c dm: vhpet: clean up asserts 2019-07-03 13:19:43 +08:00
vmmapi.c dm: get vcpu num from hypervisor when create VM 2019-09-24 11:58:45 +08:00
vrpmb.c dm: cleanup assert in core.c 2019-07-05 09:36:02 +08:00