mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
machine: alias -mem-path and -mem-prealloc into memory-foo backend
Allow machine to opt in for hostmem backend based initial RAM even if user uses old -mem-path/prealloc options by providing MachineClass::default_ram_id Follow up patches will incrementally convert machines to new API, by dropping memory_region_allocate_system_memory() and setting default_ram_id that board used to use before conversion to keep migration stream the same. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20200219160953.13771-4-imammedo@redhat.com>
This commit is contained in:
parent
aa8b183974
commit
900c0ba373
5 changed files with 49 additions and 9 deletions
|
@ -27,6 +27,22 @@
|
|||
#define MEMORY_BACKEND_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(HostMemoryBackendClass, (klass), TYPE_MEMORY_BACKEND)
|
||||
|
||||
/* hostmem-ram.c */
|
||||
/**
|
||||
* @TYPE_MEMORY_BACKEND_RAM:
|
||||
* name of backend that uses mmap on the anonymous RAM
|
||||
*/
|
||||
|
||||
#define TYPE_MEMORY_BACKEND_RAM "memory-backend-ram"
|
||||
|
||||
/* hostmem-file.c */
|
||||
/**
|
||||
* @TYPE_MEMORY_BACKEND_FILE:
|
||||
* name of backend that uses mmap on a file descriptor
|
||||
*/
|
||||
#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file"
|
||||
|
||||
typedef struct HostMemoryBackend HostMemoryBackend;
|
||||
typedef struct HostMemoryBackendClass HostMemoryBackendClass;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue