mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Improve handling of shared memory backing
As huge pages are always MAP_SHARED then where the shared memory would be checked (for vhost-user and local migration) we can also check instead for huge pages. The checking is also extended to cover the memory zones based configuration as well. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
+2
-3
@@ -1606,12 +1606,11 @@ impl Vmm {
|
||||
.unwrap()
|
||||
.lock()
|
||||
.unwrap()
|
||||
.memory
|
||||
.shared
|
||||
.backed_by_shared_memory()
|
||||
&& send_data_migration.local
|
||||
{
|
||||
return Err(MigratableError::MigrateSend(anyhow!(
|
||||
"Local migration requires shared memory enabled"
|
||||
"Local migration requires shared memory or hugepages enabled"
|
||||
)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user