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
1 changed files with 1 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue