mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-30 06:01:28 +00:00
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>
ACRN Device Model ################# Introduction ============ The ACRN Device Model provides **device sharing** capabilities between the Service OS and Guest OSs. It is a component that is used in conjunction with the `ACRN Hypervisor`_ and this is installed within the Service OS. You can find out more about Project ACRN on the `Project ACRN documentation`_ website. .. _`ACRN Hypervisor`: https://github.com/projectacrn/acrn-hypervisor .. _`Project ACRN documentation`: https://projectacrn.github.io/