From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZHL-0007VB-Lt for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeZHG-0000zb-Vb for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:27 -0400 From: David Gibson Date: Wed, 23 Sep 2015 11:55:07 +1000 Message-Id: <1442973338-17771-6-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> References: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PULL 05/36] spapr: Make ibm, change-msi respect 3 return values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, Sam Bobroff , David Gibson From: Sam Bobroff 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 Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index a2feb4c..6782fd0 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); } -- 2.4.3