[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 12/17] spapr_pci: add dynamic-reconfiguration opt
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH v4 12/17] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge |
Date: |
Tue, 23 Dec 2014 06:30:26 -0600 |
This option enables/disables PCI hotplug for a particular PHB.
Also add machine compatibility code to disable it by default for machine
types prior to pseries-2.3.
Signed-off-by: Michael Roth <address@hidden>
---
hw/ppc/spapr.c | 21 +++++++++++++++++++++
hw/ppc/spapr_pci.c | 2 ++
include/hw/pci-host/spapr.h | 1 +
3 files changed, 24 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 9eb0a94..4478fa7 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1752,11 +1752,27 @@ static const TypeInfo spapr_machine_info = {
},
};
+/* pSeries-specific hardware compatibility properties
+ *
+ * As with PC machines and general hardware properties, older
+ * machine types inherit backward-compability properties needed
+ * for subsequent machine types.
+ */
+#define PPC_HW_COMPAT_2_2 \
+ {\
+ .driver = "spapr-pci-host-bridge",\
+ .property = "dynamic-reconfiguration",\
+ .value = "off",\
+ }
+
+#define PPC_HW_COMPAT_2_1 PPC_HW_COMPAT_2_2
+
static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
static GlobalProperty compat_props[] = {
HW_COMPAT_2_1,
+ PPC_HW_COMPAT_2_1,
{ /* end of list */ }
};
@@ -1774,9 +1790,14 @@ static const TypeInfo spapr_machine_2_1_info = {
static void spapr_machine_2_2_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
+ static GlobalProperty compat_props[] = {
+ PPC_HW_COMPAT_2_2,
+ { /* end of list */ }
+ };
mc->name = "pseries-2.2";
mc->desc = "pSeries Logical Partition (PAPR compliant) v2.2";
+ mc->compat_props = compat_props;
}
static const TypeInfo spapr_machine_2_2_info = {
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 21b95b3..4850f9a 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -678,6 +678,8 @@ static Property spapr_phb_properties[] = {
DEFINE_PROP_UINT64("io_win_addr", sPAPRPHBState, io_win_addr, -1),
DEFINE_PROP_UINT64("io_win_size", sPAPRPHBState, io_win_size,
SPAPR_PCI_IO_WIN_SIZE),
+ DEFINE_PROP_BOOL("dynamic-reconfiguration", sPAPRPHBState, dr_enabled,
+ true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 4ea2a0d..ba0f3cc 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -67,6 +67,7 @@ struct sPAPRPHBState {
int32_t index;
uint64_t buid;
char *dtbusname;
+ bool dr_enabled;
MemoryRegion memspace, iospace;
hwaddr mem_win_addr, mem_win_size, io_win_addr, io_win_size;
--
1.9.1
- [Qemu-devel] [PATCH v4 04/17] spapr_rtas: add set-indicator RTAS interface, (continued)
- [Qemu-devel] [PATCH v4 04/17] spapr_rtas: add set-indicator RTAS interface, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 05/17] spapr_rtas: add get-sensor-state RTAS interface, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 02/17] spapr_drc: initial implementation of sPAPRDRConnector device, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 06/17] spapr: add rtas_st_buffer_direct() helper, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 03/17] spapr_rtas: add get/set-power-level RTAS interfaces, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 07/17] spapr_rtas: add ibm, configure-connector RTAS interface, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 09/17] spapr_events: event-scan RTAS interface, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 08/17] spapr_events: re-use EPOW event infrastructure for hotplug events, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 10/17] spapr_drc: add spapr_drc_populate_dt(), Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 11/17] spapr: introduce pseries-2.3 machine type, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 12/17] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge,
Michael Roth <=
- [Qemu-devel] [PATCH v4 15/17] pci: make pci_bar useable outside pci.c, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 13/17] spapr_pci: create DRConnectors for each PCI slot during PHB realize, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 14/17] spapr_pci: populate DRC dt entries for PHBs, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 16/17] spapr_pci: enable basic hotplug operations, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 17/17] spapr_pci: emit hotplug add/remove events during hotplug, Michael Roth, 2014/12/23