[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 12/17] spapr/drc: don't migrate DRC of cold-plugged CPU
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 12/17] spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs |
Date: |
Tue, 6 Jun 2017 12:51:30 +1000 |
From: Greg Kurz <address@hidden>
As explained in commit 5c0139a8c2f0 ("spapr: fix default DRC state for
coldplugged LMBs"), guests expect cold-plugged LMBs to be pre-allocated
and unisolated. The same goes for cold-plugged CPUs.
While here, let's convert g_assert(false) to the better self documenting
g_assert_not_reached().
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_drc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index a35314e..c1d4b10 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -546,20 +546,16 @@ static bool spapr_drc_needed(void *opaque)
*/
switch (drc->type) {
case SPAPR_DR_CONNECTOR_TYPE_PCI:
- rc = !((drc->isolation_state == SPAPR_DR_ISOLATION_STATE_UNISOLATED) &&
- (drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_USABLE) &&
- drc->configured && drc->signalled && !drc->awaiting_release);
- break;
case SPAPR_DR_CONNECTOR_TYPE_CPU:
case SPAPR_DR_CONNECTOR_TYPE_LMB:
- rc = !((drc->isolation_state == SPAPR_DR_ISOLATION_STATE_ISOLATED) &&
- (drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_UNUSABLE) &&
+ rc = !((drc->isolation_state == SPAPR_DR_ISOLATION_STATE_UNISOLATED) &&
+ (drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_USABLE) &&
drc->configured && drc->signalled && !drc->awaiting_release);
break;
case SPAPR_DR_CONNECTOR_TYPE_PHB:
case SPAPR_DR_CONNECTOR_TYPE_VIO:
default:
- g_assert(false);
+ g_assert_not_reached();
}
return rc;
}
--
2.9.4
- [Qemu-ppc] [PULL 00/17] ppc-for-2.10 queue 20170606, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 01/17] migration: remove register_savevm(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 07/17] target-ppc: Fix openpic timer read register offset, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 12/17] spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs,
David Gibson <=
- [Qemu-ppc] [PULL 02/17] migration: Mark CPU states dirty before incoming migration/loadvm, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 10/17] ppc/pnv: check the return value of fdt_setprop(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 09/17] spapr_nvram: Check return value from blk_getlength(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 04/17] spapr: Abolish DRC get_fdt method, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 17/17] spapr: Remove some non-useful properties on DRC objects, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 05/17] spapr: Abolish DRC set_configured method, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 03/17] spapr: Move DRC RTAS calls into spapr_drc.c, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 08/17] target/ppc: Fixup set_spr error in h_register_process_table, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 16/17] spapr: Eliminate spapr_drc_get_type_str(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 06/17] spapr: Make DRC get_index and get_type methods into plain functions, David Gibson, 2017/06/05