[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 24/44] spapr: Fix phb_placement backwards compatibility
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 24/44] spapr: Fix phb_placement backwards compatibility |
Date: |
Wed, 29 May 2019 16:49:57 +1000 |
When we added support for NVLink2 passthrough devices, we changed the
phb_placement hook to handle the placement of NVLink2 bridges' specific
resources. For compatibility we use a version that doesn't do this
allocation for old machine types.
However, because of the delay between when the patch was posted and when
it was merged, we ended up with that compatibility hook applying for
machine versions 3.1 and earlier whereas it should apply for 4.0 and
earlier (since the patch was applied early in the 4.1 tree).
Fixes: ec132efaa81 "spapr: Support NVIDIA V100 GPU with NVLink2"
Reported-by: Laurent Vivier <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
---
hw/ppc/spapr.c | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index bcae30ad26..39e698e9b0 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4411,18 +4411,7 @@ DEFINE_SPAPR_MACHINE(4_1, "4.1", true);
/*
* pseries-4.0
*/
-static void spapr_machine_4_0_class_options(MachineClass *mc)
-{
- spapr_machine_4_1_class_options(mc);
- compat_props_add(mc->compat_props, hw_compat_4_0, hw_compat_4_0_len);
-}
-
-DEFINE_SPAPR_MACHINE(4_0, "4.0", false);
-
-/*
- * pseries-3.1
- */
-static void phb_placement_3_1(SpaprMachineState *spapr, uint32_t index,
+static void phb_placement_4_0(SpaprMachineState *spapr, uint32_t index,
uint64_t *buid, hwaddr *pio,
hwaddr *mmio32, hwaddr *mmio64,
unsigned n_dma, uint32_t *liobns,
@@ -4434,6 +4423,20 @@ static void phb_placement_3_1(SpaprMachineState *spapr,
uint32_t index,
*nv2atsd = 0;
}
+static void spapr_machine_4_0_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+ spapr_machine_4_1_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_4_0, hw_compat_4_0_len);
+ smc->phb_placement = phb_placement_4_0;
+}
+
+DEFINE_SPAPR_MACHINE(4_0, "4.0", false);
+
+/*
+ * pseries-3.1
+ */
static void spapr_machine_3_1_class_options(MachineClass *mc)
{
SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
@@ -4449,7 +4452,6 @@ static void spapr_machine_3_1_class_options(MachineClass
*mc)
smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN;
smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN;
smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF;
- smc->phb_placement = phb_placement_3_1;
}
DEFINE_SPAPR_MACHINE(3_1, "3.1", false);
--
2.21.0
- [Qemu-ppc] [PULL 13/44] target/ppc: Fix xxspltib, (continued)
- [Qemu-ppc] [PULL 13/44] target/ppc: Fix xxspltib, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 15/44] spapr/xive: fix EQ page addresses above 64GB, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 07/44] hw/ppc/40p: use 1900 as a base year, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 06/44] hw/ppc/40p: Move the MC146818 RTC to the board where it belongs, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 12/44] target/ppc: Fix vsum2sws, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 09/44] target/ppc: Fix xvxsigdp, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 11/44] target/ppc: Fix vslv and vsrv, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 16/44] spapr/xive: print out the EQ page address in the monitor, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 26/44] spapr/xive: add KVM support, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 17/44] Fix typo on "info pic" monitor cmd output for xive, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 24/44] spapr: Fix phb_placement backwards compatibility,
David Gibson <=
- [Qemu-ppc] [PULL 20/44] spapr/xive: Sanity checks of OV5 during CAS, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 28/44] spapr/xive: add state synchronization with KVM, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 18/44] target/ppc: Optimise VSX_LOAD_SCALAR_DS and VSX_VECTOR_LOAD_STORE, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 25/44] spapr: Print out extra hints when CAS negotiation of interrupt mode fails, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 23/44] target/ppc: Use vector variable shifts for VSL, VSR, VSRA, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 34/44] spapr: check for the activation of the KVM IRQ device, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 29/44] spapr/xive: introduce a VM state change handler, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 19/44] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 22/44] spapr: Add forgotten capability to migration stream, David Gibson, 2019/05/29
- [Qemu-ppc] [PULL 31/44] spapr/xive: activate KVM support, David Gibson, 2019/05/29