mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Report no error when resizing to current memory size with ACPI
We now try to create a ram region of size 0 when the requested memory
size is the same as current memory size. It results in an error of
`GuestMemoryRegion(Mmap(Os { code: 22, kind: InvalidInput, message:
"Invalid argument" }))`. This error is not meaningful to users and we
should not report it.
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -1265,7 +1265,7 @@ impl MemoryManager {
|
||||
}
|
||||
}
|
||||
HotplugMethod::Acpi => {
|
||||
if desired_ram >= self.current_ram {
|
||||
if desired_ram > self.current_ram {
|
||||
region =
|
||||
Some(self.hotplug_ram_region((desired_ram - self.current_ram) as usize)?);
|
||||
self.current_ram = desired_ram;
|
||||
|
||||
Reference in New Issue
Block a user