diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-06-20 21:57:48 +0800 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-07-17 15:07:05 +1000 |
commit | 9d4c0f4f0a71e74fd7e04d73620268484d693adf (patch) | |
tree | e90c8b8d7f9b83f892f864ebb4505262e01ea7b0 /hw/ppc/trace-events | |
parent | f1c52354e5bdab6983d13a4c174759c585e834b3 (diff) |
spapr: Consolidate DRC state variables
Each DRC has three fields describing its state: isolation_state,
allocation_state and configured. At first this seems like a reasonable
representation, since its based directly on the PAPR defined
isolation-state and allocation-state indicators. However:
* Only a few combinations of the two fields' values are permitted
* allocation_state isn't used at all for physical DRCs
* The indicators are write only so they don't really have a well
defined current value independent of each other
This replaces these variables with a single state variable, whose names
and numbers are based on the diagram in LoPAPR section 13.4. Along with
this we add code to check the current state on various operations and make
sure the requested transition is permitted.
Strictly speaking, this makes guest visible changes to behaviour (since we
probably allowed some transitions we shouldn't have before). However, a
hypothetical guest broken by that wasn't PAPR compliant, and probably
wouldn't have worked under PowerVM.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ppc/trace-events')
-rw-r--r-- | hw/ppc/trace-events | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/trace-events b/hw/ppc/trace-events index 3e8e3cffde..8e79f7eaf6 100644 --- a/hw/ppc/trace-events +++ b/hw/ppc/trace-events @@ -46,8 +46,7 @@ spapr_drc_set_configured(uint32_t index) "drc: 0x%"PRIx32 spapr_drc_set_configured_skipping(uint32_t index) "drc: 0x%"PRIx32", isolated device" spapr_drc_attach(uint32_t index) "drc: 0x%"PRIx32 spapr_drc_detach(uint32_t index) "drc: 0x%"PRIx32 -spapr_drc_awaiting_isolated(uint32_t index) "drc: 0x%"PRIx32 -spapr_drc_awaiting_unusable(uint32_t index) "drc: 0x%"PRIx32 +spapr_drc_awaiting_quiesce(uint32_t index) "drc: 0x%"PRIx32 spapr_drc_awaiting_allocation(uint32_t index) "drc: 0x%"PRIx32 spapr_drc_reset(uint32_t index) "drc: 0x%"PRIx32 spapr_drc_realize(uint32_t index) "drc: 0x%"PRIx32 |