summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2015-09-10 16:11:03 -0500
committerDavid Gibson <david@gibson.dropbear.id.au>2015-09-23 10:51:10 +1000
commit9d1852ce11c888e3ad5096be505d14045d8b49ae (patch)
tree6d2c9c1255bf04b8f1cd8eaeb722632ad4936420 /include
parenta8ad731a001d41582c9cec4015f73ab3bc11a28d (diff)
downloadqemu-9d1852ce11c888e3ad5096be505d14045d8b49ae.tar.gz
qemu-9d1852ce11c888e3ad5096be505d14045d8b49ae.tar.bz2
qemu-9d1852ce11c888e3ad5096be505d14045d8b49ae.zip
spapr_drc: don't allow 'empty' DRCs to be unisolated or allocated
Logical resources start with allocation-state:UNUSABLE / isolation-state:ISOLATED. During hotplug, guests will transition them to allocation-state:USABLE, and then to isolation-state:UNISOLATED. For cases where we cannot transition to allocation-state:USABLE, in this case due to no device/resource being association with the logical DRC, we should return an error -3. For physical DRCs, we default to allocation-state:USABLE and stay there, so in this case we should report an error -3 when the guest attempts to make the isolation-state:ISOLATED transition for a DRC with no device associated. These are as documented in PAPR 2.7, 13.5.3.4. We also ensure allocation-state:USABLE when the guest attempts transition to isolation-state:UNISOLATED to deal with misbehaving guests attempting to bring online an unallocated logical resource. This is as documented in PAPR 2.7, 13.7. Currently we implement no such error logic. Fix this by handling these error cases as PAPR defines. Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include')
-rw-r--r--include/hw/ppc/spapr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index cbe3463e32..8a0a74d5d9 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -409,6 +409,7 @@ int spapr_allocate_irq_block(int num, bool lsi, bool msi);
#define RTAS_OUT_BUSY -2
#define RTAS_OUT_PARAM_ERROR -3
#define RTAS_OUT_NOT_SUPPORTED -3
+#define RTAS_OUT_NO_SUCH_INDICATOR -3
#define RTAS_OUT_NOT_AUTHORIZED -9002
/* RTAS tokens */