From f6a0d06ba72a0c493e1e05872caf2f3781af316d Mon Sep 17 00:00:00 2001 From: Eric Auger Date: Fri, 8 Mar 2019 19:20:53 +0100 Subject: 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 Suggested-by: Igor Mammedov Message-Id: <20190308182053.5487-3-eric.auger@redhat.com> Reviewed-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/i386/pc_piix.c') diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 8770eca..8ad8e88 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -297,8 +297,8 @@ static void pc_init1(MachineState *machine, PC_MACHINE_ACPI_DEVICE_PROP, &error_abort); } - if (pcms->acpi_nvdimm_state.is_enabled) { - nvdimm_init_acpi_state(&pcms->acpi_nvdimm_state, system_io, + if (machine->nvdimms_state->is_enabled) { + nvdimm_init_acpi_state(machine->nvdimms_state, system_io, pcms->fw_cfg, OBJECT(pcms)); } } -- cgit v1.1