diff options
author | Igor Mammedov <imammedo@redhat.com> | 2020-02-19 11:08:37 -0500 |
---|---|---|
committer | Patchew Importer <importer@patchew.org> | 2020-02-19 16:49:53 +0000 |
commit | 900c0ba373aada4c13d47d95330aa72ec4067ba5 (patch) | |
tree | 33a2a784e058d805440f8e2c8f7dac7ba6f4a1a5 /include/hw/boards.h | |
parent | aa8b183974b27d4dc025905eb869a1941e85e17d (diff) | |
download | qemu-900c0ba373aada4c13d47d95330aa72ec4067ba5.zip |
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>
Diffstat (limited to 'include/hw/boards.h')
-rw-r--r-- | include/hw/boards.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 7b4b6b79d7..8e536cafb2 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -170,6 +170,13 @@ typedef struct { * false is returned, an error must be set to show the reason of * the rejection. If the hook is not provided, all hotplug will be * allowed. + * @default_ram_id: + * Specifies inital RAM MemoryRegion name to be used for default backend + * creation if user explicitly hasn't specified backend with "memory-backend" + * property. + * It also will be used as a way to optin into "-m" option support. + * If it's not set by board, '-m' will be ignored and generic code will + * not create default RAM MemoryRegion. */ struct MachineClass { /*< private >*/ @@ -226,6 +233,7 @@ struct MachineClass { bool nvdimm_supported; bool numa_mem_supported; bool auto_enable_numa; + const char *default_ram_id; HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev); |