[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 1/5] hw, spapr: add 6.2 compat pseries machine
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v4 1/5] hw, spapr: add 6.2 compat pseries machine |
Date: |
Fri, 27 Aug 2021 06:24:51 -0300 |
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/core/machine.c | 3 +++
hw/ppc/spapr.c | 15 +++++++++++++--
include/hw/boards.h | 3 +++
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 54e040587d..067f42b528 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -37,6 +37,9 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-pci.h"
+GlobalProperty hw_compat_6_1[] = {};
+const size_t hw_compat_6_1_len = G_N_ELEMENTS(hw_compat_6_1);
+
GlobalProperty hw_compat_6_0[] = {
{ "gpex-pcihost", "allow-unmapped-accesses", "false" },
{ "i8042", "extended-state", "false"},
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 81699d4f8b..d39fd4e644 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4685,15 +4685,26 @@ static void
spapr_machine_latest_class_options(MachineClass *mc)
} \
type_init(spapr_machine_register_##suffix)
+/*
+ * pseries-6.2
+ */
+static void spapr_machine_6_2_class_options(MachineClass *mc)
+{
+ /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(6_2, "6.2", true);
+
/*
* pseries-6.1
*/
static void spapr_machine_6_1_class_options(MachineClass *mc)
{
- /* Defaults for the latest behaviour inherited from the base class */
+ spapr_machine_6_2_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
}
-DEFINE_SPAPR_MACHINE(6_1, "6.1", true);
+DEFINE_SPAPR_MACHINE(6_1, "6.1", false);
/*
* pseries-6.0
diff --git a/include/hw/boards.h b/include/hw/boards.h
index accd6eff35..463a5514f9 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -353,6 +353,9 @@ struct MachineState {
} \
type_init(machine_initfn##_register_types)
+extern GlobalProperty hw_compat_6_1[];
+extern const size_t hw_compat_6_1_len;
+
extern GlobalProperty hw_compat_6_0[];
extern const size_t hw_compat_6_0_len;
--
2.31.1
- [PATCH v4 0/5] pSeries FORM2 affinity support, Daniel Henrique Barboza, 2021/08/27
- [PATCH v4 1/5] hw, spapr: add 6.2 compat pseries machine,
Daniel Henrique Barboza <=
- [PATCH v4 4/5] spapr: simplify spapr_numa_associativity_init params, Daniel Henrique Barboza, 2021/08/27
- [PATCH v4 2/5] spapr_numa.c: split FORM1 code into helpers, Daniel Henrique Barboza, 2021/08/27
- [PATCH v4 3/5] spapr_numa.c: base FORM2 NUMA affinity support, Daniel Henrique Barboza, 2021/08/27