[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/26] hw: i386: Make the hotpluggable memory size p
From: |
Samuel Ortiz |
Subject: |
[Qemu-devel] [PATCH 11/26] hw: i386: Make the hotpluggable memory size property more generic |
Date: |
Mon, 22 Oct 2018 20:36:41 +0200 |
This property is currently defined under i386/pc while it only describes
a region size that's eventually fetched from the AML ACPI code.
We can make it more generic and shareable across machine types by moving
it to memory-device.h instead.
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Signed-off-by: Samuel Ortiz <address@hidden>
---
hw/i386/acpi-build.c | 2 +-
hw/i386/pc.c | 3 ++-
include/hw/i386/pc.h | 1 -
include/hw/mem/memory-device.h | 2 ++
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 414a6c4c4e..dfc02a8a85 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1630,7 +1630,7 @@ build_srat(GArray *table_data, BIOSLinker *linker,
MachineClass *mc = MACHINE_GET_CLASS(machine);
const CPUArchIdList *apic_ids = mc->possible_cpu_arch_ids(machine);
ram_addr_t hotplugabble_address_space_size =
- object_property_get_int(OBJECT(machine), PC_MACHINE_DEVMEM_REGION_SIZE,
+ object_property_get_int(OBJECT(machine), MEMORY_DEVICE_REGION_SIZE,
NULL);
srat_start = table_data->len;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 940485a728..fa12583096 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -67,6 +67,7 @@
#include "hw/boards.h"
#include "acpi-build.h"
#include "hw/mem/pc-dimm.h"
+#include "hw/mem/memory-device.h"
#include "qapi/error.h"
#include "qapi/qapi-visit-common.h"
#include "qapi/visitor.h"
@@ -2442,7 +2443,7 @@ static void pc_machine_class_init(ObjectClass *oc, void
*data)
nc->nmi_monitor_handler = x86_nmi;
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
- object_class_property_add(oc, PC_MACHINE_DEVMEM_REGION_SIZE, "int",
+ object_class_property_add(oc, MEMORY_DEVICE_REGION_SIZE, "int",
pc_machine_get_device_memory_region_size, NULL,
NULL, NULL, &error_abort);
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index da0bd39741..7d177cd207 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -62,7 +62,6 @@ struct PCMachineState {
};
#define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device"
-#define PC_MACHINE_DEVMEM_REGION_SIZE "device-memory-region-size"
#define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g"
#define PC_MACHINE_VMPORT "vmport"
#define PC_MACHINE_SMM "smm"
diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h
index 2853b084b5..fc39fbe38f 100644
--- a/include/hw/mem/memory-device.h
+++ b/include/hw/mem/memory-device.h
@@ -39,6 +39,8 @@ typedef struct MemoryDeviceClass {
MemoryDeviceInfo *info);
} MemoryDeviceClass;
+#define MEMORY_DEVICE_REGION_SIZE "memory-device-region-size"
+
MemoryDeviceInfoList *qmp_memory_device_list(void);
uint64_t get_plugged_memory_size(void);
uint64_t memory_device_get_free_addr(MachineState *ms, const uint64_t *hint,
--
2.17.2
- [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 02/26] hw: acpi: Export ACPI build alignment API, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 01/26] hw: i386: Decouple the ACPI build from the PC machine type, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 03/26] hw: acpi: Export the RSDP build API, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 04/26] hw: arm: Switch to the AML build RSDP building routine, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 06/26] hw: acpi: Factorize _OSC AML across architectures, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 05/26] hw: acpi: Generalize AML build routines, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 07/26] hw: i386: Refactor PCI host getter, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 11/26] hw: i386: Make the hotpluggable memory size property more generic,
Samuel Ortiz <=
- [Qemu-devel] [PATCH 13/26] hw: acpi: Fix memory hotplug AML generation error, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 10/26] hw: acpi: Do not create hotplug method when handler is not defined, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 12/26] hw: acpi: Export the SRAT AML build API, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 09/26] hw: acpi: Export the MCFG getter, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 08/26] hw: acpi: Export and generalize the PCI host AML API, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 14/26] hw: acpi: Export the PCI hotplug API, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 15/26] hw: acpi: Retrieve the PCI bus from AcpiPciHpState, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 16/26] hw: fw-build: Add firmware build methods and state, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 17/26] hw: i386: Convert PC machine type to firmware build methods, Samuel Ortiz, 2018/10/22