mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-30 16:35:31 +00:00
709148803e
This patch fixes the function first_available_range() responsible for finding the first range that could fit the requested size. The algorithm was working, that is allocating ranges from the end of the address space because we created an empty region right at the end. But the problem is, the VMM might request for some specific allocations at fixed address to allocate the RAM for example. In this case, the RAM range could be 0-1GiB, which means with the previous algorithm, the new available range would have been found right after 1GiB. This is not the intended behavior, and that's why the algorithm has been fixed by this patch, making sure to walk down existing ranges starting from the end. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>