From nobody Mon May 20 14:32:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1685463178; cv=none; d=zohomail.com; s=zohoarc; b=l9wE/kYi3ryCxRgELPDmebOM0QG6hvJkmYuq1MZZK7iMiTh3tIdToKRFwEjuV0NSoUo7wC898iofh6NuDr0PGUE9Kku6x3ZJfcJRxwAHpng346R+dfV1Oxf8Iuxw51EI/5Bm6RuB/rgk4J9NM0/ulH6wZNBrsuIanpUmCMPcqkM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685463178; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YQmdFwqC04a+YZmzOgoxNczpbPnfHmYCKgaWKlCAsR0=; b=XgFK5OPxptQbX2fp8RTnx6Fz5j+GcjqSlBk4H0Yg3fSul9EPfM3yJuRMxOz1dgDVdW0AYzyNX9/1oKlxF74/IfL2UKNw4C5QervSygdpGUWxiVof3fQ0HaQYsjBeQaiVKykyMcLeWzHGxAEA4HJfWrBea2p+CBfNoGYvHkPVlvo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685463178662438.27608625570747; Tue, 30 May 2023 09:12:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q41ww-0004lY-Bd; Tue, 30 May 2023 12:11:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wr-0004kE-SS; Tue, 30 May 2023 12:11:50 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wk-00032c-1X; Tue, 30 May 2023 12:11:49 -0400 Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34UFtKQ3008005; Tue, 30 May 2023 16:11:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwm6x0qvd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:35 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34UFuxlc011811; Tue, 30 May 2023 16:11:35 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwm6x0qtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:35 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34UBLKde007004; Tue, 30 May 2023 16:11:33 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3qu9g59axp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:32 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34UGBUS343713246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 May 2023 16:11:30 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6FCCE20040; Tue, 30 May 2023 16:11:30 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2C3F32004B; Tue, 30 May 2023 16:11:30 +0000 (GMT) Received: from borneo.ibmuc.com (unknown [9.171.3.249]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 30 May 2023 16:11:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=YQmdFwqC04a+YZmzOgoxNczpbPnfHmYCKgaWKlCAsR0=; b=aU/hdk0MEi6vy2dkU0UVrI+Vr4RJd5Cc4tFIXwhVLX6J4BivZEDrQHVfMmPbvydXC4Dt wgMRCGnq16/V7W/ND0OHgY55FlAyvbUhvOBKo0rPOdfSLHGCpyIwxY/2qeFsOO8S2ENH 0CSA8k6JX+fgux3XdmU89+j9BG7oUuTs0V91TF2l91NVFGK7o0eIVkEQNxxOOO4Vn93S Px7aGY3q/Mv+LQXEFjPtnQVbixtVpIGDo93rh+ANHr5vKZTPMMqEO25TxG+pQ3R3XnsS RPaI7rVTTOp2DR8SMSl+o2kF8d8xXKU9voX0WkC0Y9YMC96UTzTFeAtc6pDFCLFKBjSZ 1Q== From: Frederic Barrat To: clg@kaod.org, danielhb413@gmail.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/4] pnv/xive2: Add definition for TCTXT Config register Date: Tue, 30 May 2023 18:11:26 +0200 Message-Id: <20230530161129.313258-2-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530161129.313258-1-fbarrat@linux.ibm.com> References: <20230530161129.313258-1-fbarrat@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: xBPAuJuobYAWv2kxrR2vH0krc73kWrHN X-Proofpoint-GUID: 9mquZvIHkG35YiWNTJ2ezhrbPqR--uuc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-30_12,2023-05-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 impostorscore=0 suspectscore=0 bulkscore=0 phishscore=0 adultscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305300127 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=fbarrat@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1685463178991100001 Content-Type: text/plain; charset="utf-8" Add basic read/write support for the TCTXT Config register on P10. qemu doesn't do anything with it yet, but it avoids logging a guest error when skiboot configures the fused-core state: qemu-system-ppc64 -machine powernv10 ... -d guest_errors ... [ 0.131670000,5] XIVE: [ IC 00 ] Initializing XIVE block ID 0... XIVE[0] - TCTXT: invalid read @140 XIVE[0] - TCTXT: invalid write @140 Signed-off-by: Frederic Barrat Reviewed-by: C=C3=A9dric Le Goater --- hw/intc/pnv_xive2.c | 8 +++++++- hw/intc/pnv_xive2_regs.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 7176d70234..889e409929 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -1265,6 +1265,9 @@ static uint64_t pnv_xive2_ic_tctxt_read(void *opaque,= hwaddr offset, case TCTXT_EN1_RESET: val =3D xive->tctxt_regs[TCTXT_EN1 >> 3]; break; + case TCTXT_CFG: + val =3D xive->tctxt_regs[reg]; + break; default: xive2_error(xive, "TCTXT: invalid read @%"HWADDR_PRIx, offset); } @@ -1276,6 +1279,7 @@ static void pnv_xive2_ic_tctxt_write(void *opaque, hw= addr offset, uint64_t val, unsigned size) { PnvXive2 *xive =3D PNV_XIVE2(opaque); + uint32_t reg =3D offset >> 3; =20 switch (offset) { /* @@ -1297,7 +1301,9 @@ static void pnv_xive2_ic_tctxt_write(void *opaque, hw= addr offset, case TCTXT_EN1_RESET: xive->tctxt_regs[TCTXT_EN1 >> 3] &=3D ~val; break; - + case TCTXT_CFG: + xive->tctxt_regs[reg] =3D val; + break; default: xive2_error(xive, "TCTXT: invalid write @%"HWADDR_PRIx, offset); return; diff --git a/hw/intc/pnv_xive2_regs.h b/hw/intc/pnv_xive2_regs.h index 0c096e4adb..8f1e0a1fde 100644 --- a/hw/intc/pnv_xive2_regs.h +++ b/hw/intc/pnv_xive2_regs.h @@ -405,6 +405,10 @@ #define X_TCTXT_EN1_RESET 0x307 #define TCTXT_EN1_RESET 0x038 =20 +/* TCTXT Config register */ +#define X_TCTXT_CFG 0x328 +#define TCTXT_CFG 0x140 + /* * VSD Tables */ --=20 2.40.1 From nobody Mon May 20 14:32:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1685463198; cv=none; d=zohomail.com; s=zohoarc; b=TlNVu3dMt+dlviPgu5ogz5Dee1i9VD1LCRjnEmaeNr+q+ia2xfketgFKxxbYS7MZPAEaetkJPg8zOO+YK9pjPr5jHRq+l3yMaa/n3Py1aB3+FxWmkBq2VoKS2Tz5Os8g5c5U932y0zh1Y3howqS1qT6bUmBTNtbVKtg5Y/YbKKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685463198; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nprdm7Y9yY0dNMUvaRmJmg7K+lfnY6B6un8ZVh3ztNQ=; b=CLh8ycf+TqhU75ThTtJJfCRrNux8QYJZGBT7xsJ2GKAWaOapwCPCqF/0L9Lo7KJjPdJJJwFu+KRqoh+itgbVNqxv6cdqlbmbvpJNM4Wumnl55wu3//zRqyHz6aySTpAHCRIIQRqpBZQ4pYFUCwo/I7c9ULq71uF3SOzrlathhgY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685463198248117.81689590059761; Tue, 30 May 2023 09:13:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q41x1-0004n1-9t; Tue, 30 May 2023 12:11:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wo-0004jP-Rr; Tue, 30 May 2023 12:11:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wm-00034m-MJ; Tue, 30 May 2023 12:11:46 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34UG8lN2016708; Tue, 30 May 2023 16:11:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwh1deryc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:35 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34UG8uLT017655; Tue, 30 May 2023 16:11:35 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwh1derxm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:35 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34U7knAl001794; Tue, 30 May 2023 16:11:33 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma03fra.de.ibm.com (PPS) with ESMTPS id 3qu9g59agw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:33 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34UGBUFa43713248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 May 2023 16:11:30 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C72922004B; Tue, 30 May 2023 16:11:30 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8371820043; Tue, 30 May 2023 16:11:30 +0000 (GMT) Received: from borneo.ibmuc.com (unknown [9.171.3.249]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 30 May 2023 16:11:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=nprdm7Y9yY0dNMUvaRmJmg7K+lfnY6B6un8ZVh3ztNQ=; b=BYgoTLDtL6ZANXaoj9i4Rz6SDSYHB+AldRb0dRW1ljh8GNPHLceaFS45VK0SNql3HRWY PuV4yNIfQU16vCrsb9bD+9LbFRUjPIB9t1GEXHMq3ZUL4m8WYQ8nThp+dY8lw4WrifYQ ySBbElyNjYunOgg2J8zkBJ5vykiFDOc1jK4RWnwpXOZUT6Qbis7vFVM9PcLgU38OUN+X iAs3MlRuEGqm5pNM4DV339EdnsbNSbB/NoYFlZu685K+A+ghEz2Vystj7sxTSLRCzyJH kCKY+AdIHhP7w0mLuJDgx/LR9dUqzvz2pJM5GzwJMlxH042Ab5uWytScrRHUxR4TV+Us ww== From: Frederic Barrat To: clg@kaod.org, danielhb413@gmail.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/4] pnv/xive2: Add definition for the ESB cache configuration register Date: Tue, 30 May 2023 18:11:27 +0200 Message-Id: <20230530161129.313258-3-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530161129.313258-1-fbarrat@linux.ibm.com> References: <20230530161129.313258-1-fbarrat@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 5042lEgG91m-Q4LDKUIVN4P4QbUwGxsP X-Proofpoint-ORIG-GUID: VaQ1Hn3hdcQE_iikH8R9-BFJHORgXBMV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-30_12,2023-05-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=881 priorityscore=1501 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305300127 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=fbarrat@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1685463199910100001 Content-Type: text/plain; charset="utf-8" Add basic read/write support for the ESB cache configuration register on P10. We don't model the ESB cache in qemu so reading/writing the register won't do anything, but it avoids logging a guest error when skiboot configures it: qemu-system-ppc64 -machine powernv10 ... -d guest_errors ... XIVE[0] - VC: invalid read @240 XIVE[0] - VC: invalid write @240 Signed-off-by: Frederic Barrat Reviewed-by: C=C3=A9dric Le Goater --- hw/intc/pnv_xive2.c | 7 +++++++ hw/intc/pnv_xive2_regs.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 889e409929..a75ff270ac 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -955,6 +955,10 @@ static uint64_t pnv_xive2_ic_vc_read(void *opaque, hwa= ddr offset, val =3D xive->vc_regs[reg]; break; =20 + case VC_ESBC_CFG: + val =3D xive->vc_regs[reg]; + break; + /* * EAS cache updates (not modeled) */ @@ -1046,6 +1050,9 @@ static void pnv_xive2_ic_vc_write(void *opaque, hwadd= r offset, /* ESB update */ break; =20 + case VC_ESBC_CFG: + break; + /* * EAS cache updates (not modeled) */ diff --git a/hw/intc/pnv_xive2_regs.h b/hw/intc/pnv_xive2_regs.h index 8f1e0a1fde..7165dc8704 100644 --- a/hw/intc/pnv_xive2_regs.h +++ b/hw/intc/pnv_xive2_regs.h @@ -232,6 +232,10 @@ #define VC_ESBC_FLUSH_POLL_BLOCK_ID_MASK PPC_BITMASK(32, 35) #define VC_ESBC_FLUSH_POLL_OFFSET_MASK PPC_BITMASK(36, 63) /* 28-= bit */ =20 +/* ESBC configuration */ +#define X_VC_ESBC_CFG 0x148 +#define VC_ESBC_CFG 0x240 + /* EASC flush control register */ #define X_VC_EASC_FLUSH_CTRL 0x160 #define VC_EASC_FLUSH_CTRL 0x300 --=20 2.40.1 From nobody Mon May 20 14:32:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1685463150; cv=none; d=zohomail.com; s=zohoarc; b=FAfOm0gQm5wG6bjJUKf+/ZlcZPXv8JhmAbQ8ArS7JMKZvwOpdktRkRsmnSF+m8zbtUwBGxub8SvOubIg+NPW7y9tSuPSgjSyi64HbccUV9aSkJq3qcYrdE8kXQMqYSf/MsA1yWMHwFKVFLzqKOYwcrD6nECIIRbo7q4+PzsHXCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685463150; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=A5GknR4Y9CemSz0i4kEhP6YzBXFuyd+SKir2doOUTcA=; b=C1uH3XS1+AIokXUFpUE2TKwA7Qom7KcIanyRVge92pMhv9iK7Buqhwdgrp8hTCkcAE8oB+yRqQymF2GAh9pDwhreiyELMZdZwMbYcRI4wuUjgN9P8DC3ohKAFp4H9dyaopODmO7UKzHi01U4C7uLi7KiL3+r6Wd/AxlTomF+4RY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685463150807819.3290828351807; Tue, 30 May 2023 09:12:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q41wu-0004ku-Bg; Tue, 30 May 2023 12:11:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wq-0004jh-Bi; Tue, 30 May 2023 12:11:48 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wo-000350-RL; Tue, 30 May 2023 12:11:48 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34UG6SGJ021060; Tue, 30 May 2023 16:11:37 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwjej3m45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:36 +0000 Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34UG7RNH026762; Tue, 30 May 2023 16:11:36 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwjej3m2f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:36 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34U3Gwvg004348; Tue, 30 May 2023 16:11:33 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma01fra.de.ibm.com (PPS) with ESMTPS id 3qu9g51b27-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:33 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34UGBVFX8848116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 May 2023 16:11:31 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 321A02004B; Tue, 30 May 2023 16:11:31 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D9D3120043; Tue, 30 May 2023 16:11:30 +0000 (GMT) Received: from borneo.ibmuc.com (unknown [9.171.3.249]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 30 May 2023 16:11:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=A5GknR4Y9CemSz0i4kEhP6YzBXFuyd+SKir2doOUTcA=; b=I07QXfTh8R5WF9amVy7GtGCOpQThgGR+Jff6PLQhSfCQDyOyYgV9BvPO7mr7BenTPnBs 2z1HaSoL9crCNxOzUA5ebhyq5QWuew4po9Wk+Yq3EYgJHh9RS/l9xRhNZeQG5IfSt1yP gXrEhTcJX5+ir5LhepJfRUIk9mJv46Fydj4QWOuFhIhh88R3bb/BT7v6S6GDwPMKatM1 E++Vw3l6vY25JEXpQYfZwH03rhfRpg+ANPmp56p0vVPkQhYXa7+mXbifGAJtBigI5bQs qO1FMD4H19K/uH9vP1qFQl20sfaC4Ju5rWvycp3hPFnk5fdnOlUZXX/FYlJZqAmSdgcy Tg== From: Frederic Barrat To: clg@kaod.org, danielhb413@gmail.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/4] pnv/xive2: Allow writes to the Physical Thread Enable registers Date: Tue, 30 May 2023 18:11:28 +0200 Message-Id: <20230530161129.313258-4-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530161129.313258-1-fbarrat@linux.ibm.com> References: <20230530161129.313258-1-fbarrat@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: HBclzGt1vKJGf7nu8FYIPScejFfe3DEr X-Proofpoint-GUID: 2fb6E93BXKmAlv9rhOKBVDlpVflyFLHS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-30_12,2023-05-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 phishscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=812 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305300127 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=fbarrat@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1685463152887100003 Content-Type: text/plain; charset="utf-8" Fix what was probably a silly mistake and allow to write the Physical Thread enable registers 0 and 1. Skiboot prefers to use the ENx_SET variant so it went unnoticed, but there's no reason to discard a write to the full register, it is Read-Write. Signed-off-by: Frederic Barrat Reviewed-by: C=C3=A9dric Le Goater --- hw/intc/pnv_xive2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index a75ff270ac..132f82a035 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -1294,6 +1294,7 @@ static void pnv_xive2_ic_tctxt_write(void *opaque, hw= addr offset, */ case TCTXT_EN0: /* Physical Thread Enable */ case TCTXT_EN1: /* Physical Thread Enable (fused core) */ + xive->tctxt_regs[reg] =3D val; break; =20 case TCTXT_EN0_SET: --=20 2.40.1 From nobody Mon May 20 14:32:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1685463171; cv=none; d=zohomail.com; s=zohoarc; b=g5uQm563kzj1fIJOuHNX4JufwnjAjLAyk3VQEq026Rdsjp41Q/etOTz8iDlaLMZKSbenh1hrfcoAmy49kdGamgphQuPHnWiY1cVcB8yAsZFgEvz8+NfHCZTHZ3KjaDAOmwrxc+Mfv3Zh1mdRKAzIl3PhhQzj2KO1vapyDDu3DnM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685463171; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oxBeEXZK7INoSWrPy9vA/633LH4d6tUJusySr2JiwVc=; b=LVDqQoi0wb/o96aN19EsSf8rOXHHBrlENKH0Y0nSOx80Fo6k6gKJV+UMGvSkWNF7KaltZSa+Vdmho55qMd355lHlIZqGqOCLC9YMNmUWi+jeWXQNTD7KhwKadHGVNnjgVBTRq47jnLX3ZUrabtFrdD1AwPCueceUyw3acTdHecM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685463171764914.3519921542352; Tue, 30 May 2023 09:12:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q41wt-0004kj-NN; Tue, 30 May 2023 12:11:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wq-0004jg-BQ; Tue, 30 May 2023 12:11:48 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q41wn-00034s-Hh; Tue, 30 May 2023 12:11:48 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34UG8quU017034; Tue, 30 May 2023 16:11:37 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwh1des00-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:36 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34UG8ulx017587; Tue, 30 May 2023 16:11:36 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qwh1dery3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:36 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34U5GNXj014529; Tue, 30 May 2023 16:11:34 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3qu9g59axq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 16:11:33 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34UGBVuW8848118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 May 2023 16:11:31 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 89E032004D; Tue, 30 May 2023 16:11:31 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 456A420043; Tue, 30 May 2023 16:11:31 +0000 (GMT) Received: from borneo.ibmuc.com (unknown [9.171.3.249]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 30 May 2023 16:11:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=oxBeEXZK7INoSWrPy9vA/633LH4d6tUJusySr2JiwVc=; b=LTx1EuSIXBAJ9dbdjnlzfVQ/39LR4K7hm5zOCBqoDU0aTTukP/tgfWAx9cLRtGl58RRR yOq9GbXpC+XAPPEpa/hrw4rVFaH+elp91/5i79uKPjFbaqssHbGscmhYv8xSapbLo32D EThgsL/stPbm2pgzuIYOeSbKbCGh4ithqQw3t4DN9+EmosVRTPAkY5R0Ra6fTMh1rABD NH8ikICgbB085o7gHQysEQ5iuUhG24V1eDOel9oKq0QBwup2hnOzOPOFMT70vkLgz+X9 bAXLFgnYKgX/fcbhj3V10JwmFCEhvcUIrsvIVc/94UXSYjwjQ7MaQYvtqOlgX0sUsz9T wA== From: Frederic Barrat To: clg@kaod.org, danielhb413@gmail.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 4/4] pnv/xive2: Handle TIMA access through all ports Date: Tue, 30 May 2023 18:11:29 +0200 Message-Id: <20230530161129.313258-5-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530161129.313258-1-fbarrat@linux.ibm.com> References: <20230530161129.313258-1-fbarrat@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: T1HWBFeMG1yrgYuXsUF0pGQ2lNSQCdC8 X-Proofpoint-ORIG-GUID: rLwe3mfY8mSeJS9hSxCV1Pplyf69CR7F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-30_12,2023-05-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=939 priorityscore=1501 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305300127 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=fbarrat@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1685463173920100001 Content-Type: text/plain; charset="utf-8" The Thread Interrupt Management Area (TIMA) can be accessed through 4 ports/snoop buses, targeted by the address. The base address of a TIMA is using port 0 and the other ports are 0x80 apart. Using one port or another can be useful to balance the load on the snoop buses. The TIMA registers are in the 0x0 -> 0x3F range and there are 2 indication bits for special operations (bits 10 and 11; everything fits on a 4k page). So the port address bits fall in between and are "don't care" for the hardware when processing the TIMA operation. So this patch filters out those port address bits so that a TIMA operation can be triggered using any port. It is also true for indirect access (through the IC BAR) and it's actually nothing new, it was already the case on P9. Which helps here, as the TIMA handling code is common between P9 (xive) and P10 (xive2). Signed-off-by: Frederic Barrat Reviewed-by: C=C3=A9dric Le Goater --- hw/intc/pnv_xive2.c | 4 ++++ hw/intc/xive.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 132f82a035..c80316657a 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -1662,6 +1662,8 @@ static void pnv_xive2_tm_write(void *opaque, hwaddr o= ffset, bool gen1_tima_os =3D xive->cq_regs[CQ_XIVE_CFG >> 3] & CQ_XIVE_CFG_GEN1_TIMA_OS; =20 + offset &=3D 0xC3F; /* See comment in xive_tctx_tm_write() */ + /* TODO: should we switch the TM ops table instead ? */ if (!gen1_tima_os && offset =3D=3D HV_PUSH_OS_CTX_OFFSET) { xive2_tm_push_os_ctx(xptr, tctx, offset, value, size); @@ -1681,6 +1683,8 @@ static uint64_t pnv_xive2_tm_read(void *opaque, hwadd= r offset, unsigned size) bool gen1_tima_os =3D xive->cq_regs[CQ_XIVE_CFG >> 3] & CQ_XIVE_CFG_GEN1_TIMA_OS; =20 + offset &=3D 0xC3F; /* See comment in xive_tctx_tm_read() */ + /* TODO: should we switch the TM ops table instead ? */ if (!gen1_tima_os && offset =3D=3D HV_PULL_OS_CTX_OFFSET) { return xive2_tm_pull_os_ctx(xptr, tctx, offset, size); diff --git a/hw/intc/xive.c b/hw/intc/xive.c index a986b96843..c1abfae31d 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -527,6 +527,15 @@ void xive_tctx_tm_write(XivePresenter *xptr, XiveTCTX = *tctx, hwaddr offset, =20 trace_xive_tctx_tm_write(offset, size, value); =20 + /* + * The TIMA can be accessed through 4 ports/snoop buses, with + * addresses 0x80 apart. + * However, the offset bits between the "special op" bits and the + * MSB of the range used for the TIMA registers are "don't care" + * for the hardware, so we filter them out. + */ + offset &=3D 0xC3F; + /* * TODO: check V bit in Q[0-3]W2 */ @@ -566,6 +575,15 @@ uint64_t xive_tctx_tm_read(XivePresenter *xptr, XiveTC= TX *tctx, hwaddr offset, const XiveTmOp *xto; uint64_t ret; =20 + /* + * The TIMA can be accessed through 4 ports/snoop buses, with + * addresses 0x80 apart. + * However, the offset bits between the "special op" bits and the + * MSB of the range used for the TIMA registers are "don't care" + * for the hardware, so we filter them out. + */ + offset &=3D 0xC3F; + /* * TODO: check V bit in Q[0-3]W2 */ --=20 2.40.1