From nobody Thu Nov 6 19:45:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1542824325895328.8834947154793; Wed, 21 Nov 2018 10:18:45 -0800 (PST) Received: from localhost ([::1]:41061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPX58-0001PL-Mn for importer@patchew.org; Wed, 21 Nov 2018 13:18:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPX37-0008W2-SZ for qemu-devel@nongnu.org; Wed, 21 Nov 2018 13:16:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPX0p-0006d9-9W for qemu-devel@nongnu.org; Wed, 21 Nov 2018 13:14:11 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57770 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gPX0o-0006ab-2W for qemu-devel@nongnu.org; Wed, 21 Nov 2018 13:14:06 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wALI4KNU131771 for ; Wed, 21 Nov 2018 13:14:04 -0500 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nwae2ddu0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Nov 2018 13:14:03 -0500 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Nov 2018 18:14:03 -0000 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 21 Nov 2018 18:13:57 -0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wALIDuwA62259264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Nov 2018 18:13:56 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BC61EAC05B; Wed, 21 Nov 2018 18:13:56 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8AB2EAC060; Wed, 21 Nov 2018 18:13:53 +0000 (GMT) Received: from farosas.linux.ibm.com.br.ibm.com (unknown [9.86.27.87]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 21 Nov 2018 18:13:53 +0000 (GMT) From: Fabiano Rosas To: qemu-devel@nongnu.org Date: Wed, 21 Nov 2018 16:13:45 -0200 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181121181347.24035-1-farosas@linux.ibm.com> References: <20181121181347.24035-1-farosas@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18112118-0060-0000-0000-000002D69C0D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010095; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01120765; UDB=6.00581594; IPR=6.00900886; MB=3.00024266; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-21 18:14:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112118-0061-0000-0000-000047458FD9 Message-Id: <20181121181347.24035-2-farosas@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-21_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=684 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811210157 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [RFC PATCH v2 1/3] target/ppc: Add macro definitions for relocated interrupt vectors offsets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , Eduardo Habkost , Peter Crosthwaite , James Hogan , Marcelo Tosatti , David Hildenbrand , Christian Borntraeger , Aleksandar Markovic , Paolo Bonzini , David Gibson , philmd@redhat.com, Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The PowerISA prescribes that depending on the values of MSR_IR, MSR_DR, MSR_HV and LPCR_AIL, the interrupt vectors might be relocated by specific offsets. This patch defines macros for these offsets so that they can be used by another part of the code in a future patch. Signed-off-by: Fabiano Rosas --- target/ppc/cpu.h | 3 +++ target/ppc/excp_helper.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index ab68abe8a2..5147db4460 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -2390,6 +2390,9 @@ enum { AIL_C000_0000_0000_4000 =3D 3, }; =20 +#define AIL_0001_8000_OFFSET 0x18000 +#define AIL_C000_0000_0000_4000_OFFSET 0xc000000000004000ull + /*************************************************************************= ****/ =20 #define is_isa300(ctx) (!!(ctx->insns_flags2 & PPC2_ISA300)) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 0ec7ae1ad4..49bdf7dd54 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -687,10 +687,10 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int = excp_model, int excp) new_msr |=3D (1 << MSR_IR) | (1 << MSR_DR); switch(ail) { case AIL_0001_8000: - vector |=3D 0x18000; + vector |=3D AIL_0001_8000_OFFSET; break; case AIL_C000_0000_0000_4000: - vector |=3D 0xc000000000004000ull; + vector |=3D AIL_C000_0000_0000_4000_OFFSET; break; default: cpu_abort(cs, "Invalid AIL combination %d\n", ail); --=20 2.17.1