mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +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:
parent
299e83bf43
commit
10f380f95b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user