mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-08 22:05:20 +00:00
vmm: Support resizing memory up to and including hotplug size
The start address after the hottplugged memory can be the start address of device area. Fixes: #1803 Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
f639a8a0fd
commit
789ee7b3e4
@ -1015,8 +1015,7 @@ impl MemoryManager {
|
||||
|
||||
let start_addr = MemoryManager::start_addr(self.guest_memory.memory().last_addr(), true);
|
||||
|
||||
if start_addr.checked_add(size.try_into().unwrap()).unwrap() >= self.start_of_device_area()
|
||||
{
|
||||
if start_addr.checked_add(size.try_into().unwrap()).unwrap() > self.start_of_device_area() {
|
||||
return Err(Error::InsufficientHotplugRAM);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user