summaryrefslogtreecommitdiffstats
path: root/hw/ppc
diff options
context:
space:
mode:
authorSam Bobroff2015-09-01 03:23:47 +0200
committerDavid Gibson2015-09-23 02:51:09 +0200
commitb359bd6a424b8de7db994d7120e87a7465b69337 (patch)
tree3c5a1f5eb85862c7db9566148611e83c293c3422 /hw/ppc
parentspapr: Add /rtas/ibm,change-msix-capable (diff)
downloadqemu-b359bd6a424b8de7db994d7120e87a7465b69337.tar.gz
qemu-b359bd6a424b8de7db994d7120e87a7465b69337.tar.xz
qemu-b359bd6a424b8de7db994d7120e87a7465b69337.zip
spapr: Make ibm, change-msi respect 3 return values
Currently, rtas_ibm_change_msi() always returns four values even if less are specified. Correct this by only returning the fourth parameter if it was requested. This is specified by PAPR. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr_pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index a2feb4c985..6782fd0b4d 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -375,7 +375,9 @@ out:
rtas_st(rets, 0, RTAS_OUT_SUCCESS);
rtas_st(rets, 1, req_num);
rtas_st(rets, 2, ++seq_num);
- rtas_st(rets, 3, ret_intr_type);
+ if (nret > 3) {
+ rtas_st(rets, 3, ret_intr_type);
+ }
trace_spapr_pci_rtas_ibm_change_msi(config_addr, func, req_num, irq);
}