]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr_drc.c
spapr: Clean up DRC set_isolation_state() path
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 7 Jun 2017 14:58:32 +0000 (00:58 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 30 Jun 2017 04:03:32 +0000 (14:03 +1000)
commit0dfabd39d523fc3f6f0f8c441f41c013cc429b52
treeac88202439e0536371e015f72bd01a1692dde701
parent617367321ed6c66118fa981cf61c897f679ab021
spapr: Clean up DRC set_isolation_state() path

There are substantial differences in the various paths through
set_isolation_state(), both for setting to ISOLATED versus UNISOLATED
state and for logical versus physical DRCs.

So, split the set_isolation_state() method into isolate() and unisolate()
methods, and give it different implementations for the two DRC types.

Factor some minimal common checks, including for valid indicator values
(which we weren't previously checking) into rtas_set_isolation_state().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr_drc.c
include/hw/ppc/spapr_drc.h