mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: config: add memory_restore_mode to RestoreConfig
Add a MemoryRestoreMode enum (Copy | OnDemand) to RestoreConfig so the restore path can be selected at restore time. Copy preserves the existing eager read-copy behavior. OnDemand enables userfaultfd-based demand paging and fails restore if the kernel does not support it. Validate that prefault=on is not combined with OnDemand mode. Update the OpenAPI spec with the new enum field. Signed-off-by: Shayon Mukherjee <shayonj@gmail.com>
This commit is contained in:
committed by
Rob Bradford
parent
8340307ace
commit
bf85af907e
@@ -1342,6 +1342,11 @@ components:
|
||||
destination_url:
|
||||
type: string
|
||||
|
||||
MemoryRestoreMode:
|
||||
type: string
|
||||
enum: [Copy, OnDemand]
|
||||
default: Copy
|
||||
|
||||
RestoreConfig:
|
||||
required:
|
||||
- source_url
|
||||
@@ -1351,6 +1356,8 @@ components:
|
||||
type: string
|
||||
prefault:
|
||||
type: boolean
|
||||
memory_restore_mode:
|
||||
$ref: "#/components/schemas/MemoryRestoreMode"
|
||||
|
||||
ReceiveMigrationData:
|
||||
required:
|
||||
|
||||
Reference in New Issue
Block a user