mirror of https://github.com/xqemu/xqemu.git
spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs
As explained in commit 5c0139a8c2
("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 <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
c4e13492af
commit
a32e900b8a
|
@ -546,20 +546,16 @@ static bool spapr_drc_needed(void *opaque)
|
||||||
*/
|
*/
|
||||||
switch (drc->type) {
|
switch (drc->type) {
|
||||||
case SPAPR_DR_CONNECTOR_TYPE_PCI:
|
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_CPU:
|
||||||
case SPAPR_DR_CONNECTOR_TYPE_LMB:
|
case SPAPR_DR_CONNECTOR_TYPE_LMB:
|
||||||
rc = !((drc->isolation_state == SPAPR_DR_ISOLATION_STATE_ISOLATED) &&
|
rc = !((drc->isolation_state == SPAPR_DR_ISOLATION_STATE_UNISOLATED) &&
|
||||||
(drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_UNUSABLE) &&
|
(drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_USABLE) &&
|
||||||
drc->configured && drc->signalled && !drc->awaiting_release);
|
drc->configured && drc->signalled && !drc->awaiting_release);
|
||||||
break;
|
break;
|
||||||
case SPAPR_DR_CONNECTOR_TYPE_PHB:
|
case SPAPR_DR_CONNECTOR_TYPE_PHB:
|
||||||
case SPAPR_DR_CONNECTOR_TYPE_VIO:
|
case SPAPR_DR_CONNECTOR_TYPE_VIO:
|
||||||
default:
|
default:
|
||||||
g_assert(false);
|
g_assert_not_reached();
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue