From patchwork Thu Sep 5 05:58:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 272793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E55A82C00E7 for ; Thu, 5 Sep 2013 15:59:33 +1000 (EST) Received: from localhost ([::1]:57030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHSbC-0001gn-19 for incoming@patchwork.ozlabs.org; Thu, 05 Sep 2013 01:59:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHSal-0001dz-JW for qemu-devel@nongnu.org; Thu, 05 Sep 2013 01:59:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHSaU-0002oR-Rp for qemu-devel@nongnu.org; Thu, 05 Sep 2013 01:58:55 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:60257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHSaU-0002o2-8J for qemu-devel@nongnu.org; Thu, 05 Sep 2013 01:58:38 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Sep 2013 15:49:50 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 5 Sep 2013 15:49:47 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id BBC433578051; Thu, 5 Sep 2013 15:58:31 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r855gAf67340394; Thu, 5 Sep 2013 15:42:16 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r855wPwo016411; Thu, 5 Sep 2013 15:58:25 +1000 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.190.163.12]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r855wP8o016408; Thu, 5 Sep 2013 15:58:25 +1000 Received: from bran.ozlabs.ibm.com (haven.au.ibm.com [9.190.164.82]) by ozlabs.au.ibm.com (Postfix) with ESMTP id C5355A01FC; Thu, 5 Sep 2013 15:58:24 +1000 (EST) Received: from ka1.ozlabs.ibm.com (ka1.ozlabs.ibm.com [10.61.145.11]) by bran.ozlabs.ibm.com (Postfix) with ESMTP id 6F87B16AB01; Thu, 5 Sep 2013 15:58:24 +1000 (EST) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Thu, 5 Sep 2013 15:58:20 +1000 Message-Id: <1378360700-4300-1-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 1.8.4.rc4 X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13090505-7014-0000-0000-00000390C5EC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 202.81.31.148 Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Paul Mackerras , Alexander Graf Subject: [Qemu-devel] [PATCH] spapr-rtas: reset top 4 bits in parameters address X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On the real hardware, RTAS is called in real mode and therefore ignores top 4 bits of the address passed in the call. This fixes QEMU to do the same thing. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_rtas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index eb542f2..ab03d67 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -240,7 +240,8 @@ target_ulong spapr_rtas_call(PowerPCCPU *cpu, sPAPREnvironment *spapr, struct rtas_call *call = rtas_table + (token - TOKEN_BASE); if (call->fn) { - call->fn(cpu, spapr, token, nargs, args, nret, rets); + call->fn(cpu, spapr, token, nargs, args & 0x0FFFFFFFFFFFFFFFUL, + nret, rets); return H_SUCCESS; } }