diff options
author | Eric Auger <eric.auger@redhat.com> | 2019-03-08 19:20:53 +0100 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2019-03-11 10:44:25 -0300 |
commit | f6a0d06ba72a0c493e1e05872caf2f3781af316d (patch) | |
tree | 19fd6ed21c17ef6bfe53733bbc4bdeb5169f23b4 /include/hw | |
parent | c1404bde9cb326a42327c892e25ecbfcce806a3d (diff) | |
download | qemu-f6a0d06ba72a0c493e1e05872caf2f3781af316d.zip |
machine: Move nvdimms state into struct MachineState
As NVDIMM support is looming for ARM and SPAPR, let's
move the acpi_nvdimm_state to the generic machine struct
instead of duplicating the same code in several machines.
It is also renamed into nvdimms_state and becomes a pointer.
nvdimm and nvdimm-persistence become generic machine options.
They become guarded by a nvdimm_supported machine class member.
We also add a description for those options.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20190308182053.5487-3-eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/boards.h | 2 | ||||
-rw-r--r-- | include/hw/i386/pc.h | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 9690c71a6d..e231860666 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -210,6 +210,7 @@ struct MachineClass { int nb_nodes, ram_addr_t size); bool ignore_boot_device_suffixes; bool smbus_no_migration_support; + bool nvdimm_supported; HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev); @@ -272,6 +273,7 @@ struct MachineState { const char *cpu_type; AccelState *accelerator; CPUArchIdList *possible_cpus; + struct NVDIMMState *nvdimms_state; }; #define DEFINE_MACHINE(namestr, machine_initfn) \ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 94fb620d65..263a6343ff 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -45,8 +45,6 @@ struct PCMachineState { OnOffAuto vmport; OnOffAuto smm; - NVDIMMState acpi_nvdimm_state; - bool acpi_build_enabled; bool smbus_enabled; bool sata_enabled; @@ -74,8 +72,6 @@ struct PCMachineState { #define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g" #define PC_MACHINE_VMPORT "vmport" #define PC_MACHINE_SMM "smm" -#define PC_MACHINE_NVDIMM "nvdimm" -#define PC_MACHINE_NVDIMM_PERSIST "nvdimm-persistence" #define PC_MACHINE_SMBUS "smbus" #define PC_MACHINE_SATA "sata" #define PC_MACHINE_PIT "pit" |