From patchwork Wed Jan 4 02:37:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shanker Donthineni X-Patchwork-Id: 13088152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF61FC3DA7D for ; Wed, 4 Jan 2023 02:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=x09P3W3GGS9h0Uzwmd1AmbwrCEUKxdOcCtb4OrfHy6w=; b=L4em+PH2+sKlbs c9TZ/L7kv50HmiojnKsjnjqQe2C+0FesiYm1zyL2BVAhrcFJs+1y0zMvA0h8K7E5KCrtNBS/RFFUa z0JI5VxT9EZcecn26UqNerQOQQ/KmRqKuooDoLTgmunbDfMi8Cozs2lSR4lWh4ZBrXQJQldTHpBH8 GL8GBdCmobsQs/7RvCttLQmho9Y6UKD0TYv19Fsavi6RG/e/tT52t0z5dfDlR3gve90NndWSLGZXy WgDfzA+Q6e8tffj777dB/8CCQch4YZCFc8Ne/0W+4oTErhIFXeXL3aRJ3tfbAe22pc52OSPzCVMeo KH4Zi9VR6mr37AtJkYVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCtfv-006OU7-VM; Wed, 04 Jan 2023 02:38:44 +0000 Received: from mail-dm6nam10on2074.outbound.protection.outlook.com ([40.107.93.74] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCtf8-006OJq-Pi for linux-arm-kernel@lists.infradead.org; Wed, 04 Jan 2023 02:37:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cqEFQSHXlj32zlGOItx1Ikaq8IwhykNC2hSZhob8GV7szHvqcZIE05vuwv66N5sL2C0cJ+kuy2gr2su5/av03qFt2KiVIjw81tJM3ejhP5NIk28usbsmL8+u7sxITbUQ8y6SEQ1hf3DwAnENn2PljODHSNW7QfuJqaKrRSLorwO/kgs4IjXn2ng30Tv6sI8uLXV6sudpb86VYBWcmHhEos8tMrINY2ak704bu4R3QDBruP77maddT6LbEz4Shgx5KwB3SmQc/b2XObUW5k/ciaSSBKxEAOhXXQw9vEIPFE5OGzKGz2AeMtSCB1GdnLdHbURUAjIUABO+Fous0+NnUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+wJURQphI4S2v9tbwmjJrLYq43L4evErXJ7tv9XF7xw=; b=c2T67JRF3bl3g+cZ/gztEfvBLX/5SDgPCo8/K+tyyG1TiMdJygt74iwPP2tuuWSYGrO3bGEkCbMGV+0iZosRIkFlTD1m91dKO8oImcDePqPiAh9HuhbA8fhjv1gSygmJLJSwgm/adcCR6+hFT99Fjl7ML4IrCqLUyDEULy9b82Jx0vSrihfo3ReRSnfSIgDBvlhvBXTVHVh+fs8oV8/g6pXz14Hj4kbkR2jh6WD2cm2A4EpWt8cGunT+DK0uBJy/LDHUrXjknIUy4U8x/J6HmyYE+RoEhEG4H/D3y+FumIGaZDmfRItBTToIqaY6amgk+n4OFydSaQfAh6+e41RT8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+wJURQphI4S2v9tbwmjJrLYq43L4evErXJ7tv9XF7xw=; b=dYEMgLQIS4Br/3yMW8g8jvGye3YboIol4qjF6govIOfSeBm8xV5FsBecMMTbHVFSqdvnT8NFPBketwX4T2CEZbwSczNn0C6gi703IsLoqZLa6ajYOyjvIWnLkqBjfP98yWRUXRHQeFKaLa7nAwkgnsLbdeAU231sfYqJBxHScvzZwLaI2gwAc94mKpnkySC1FHUXeVvnEh9kqxX34QnlUSBLzoNd9rZv2zkGhXBu9wVCxBwCHco5AJhS2Qmq+264tl7cH6gE5+4Fij5RzN6KyfITsI/kMC0gbj5TZOcFt9J7ZJMltfSDciWKSgVEsjRGp7lzlqM24v5kUdnpDEiaCg== Received: from BN9PR03CA0248.namprd03.prod.outlook.com (2603:10b6:408:ff::13) by PH8PR12MB6891.namprd12.prod.outlook.com (2603:10b6:510:1cb::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Wed, 4 Jan 2023 02:37:50 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ff:cafe::af) by BN9PR03CA0248.outlook.office365.com (2603:10b6:408:ff::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5966.19 via Frontend Transport; Wed, 4 Jan 2023 02:37:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.17 via Frontend Transport; Wed, 4 Jan 2023 02:37:49 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 3 Jan 2023 18:37:40 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 3 Jan 2023 18:37:40 -0800 Received: from SDONTHINENI-DESKTOP.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Tue, 3 Jan 2023 18:37:40 -0800 From: Shanker Donthineni To: Catalin Marinas , Marc Zyngier , Will Deacon , James Morse CC: , , Shanker Donthineni Subject: [PATCH v2] arm64: gic: increase the number of IRQ descriptors Date: Tue, 3 Jan 2023 20:37:38 -0600 Message-ID: <20230104023738.1258925-1-sdonthineni@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT049:EE_|PH8PR12MB6891:EE_ X-MS-Office365-Filtering-Correlation-Id: 54310cab-9288-4618-dcac-08daedfcabd7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GgSTx/XD2SVe/hXXeenEA8XIsElSHzGk+0bgRUoUmwbXOcMO+gHkn0J6xLdO/qXSeB7CcNBwew5BoHyAsJcJ1/mmY11drHNcm4nd87SGlRUPU0xMp2SP9AHiadl/n03wRgBc86RtSX7zRAhN3J4ioRY2azEeH1XgugC3O8TA7DVFMAHq92B17iv4lZBa/VIKIuLmwCqYsmuRToD2UD+dUVJ+Whd+BBtWEKXyOx3MGUjEqRS74244hM+5BIxRi9RhNz+zHwC/gSTp5LljLQHAxWD5Mxirz6xKutkvFP6iofJehj1VKwEMz+Zg4i8KcWYJoP7/MVPzIIYPYHTZng2YKDTraCvNHwMxhlMh1UYrp58KLOM7rllNPQgEi3SAlvRM3ZSn5ok21YSlLtDgroumFHFs2Bh7VaW44uJ5dDKdWus8cMpgraDoQmDPZ49szNnWsLcFUQNdrZx9wamEtl53ZcC6zs/G1Tpd7zpdoNWHZlFjb+NPx+c05YQuGJ5Q4q6gqh6C31W8WUoNumfiOx2855g/GZNy8pphVdUHREaHmaWVwspet1k8ARk2B5YgNC6XSWaeEuu4lH8Lyqxz6GKjncMahM07hPk/KKkmpEebR5E87+2kc3UDf6GL2QBkFwItkr4Xx6Zl6CgegTYhUQswcfUDkFQnCVwoc3V8wrZJa8Xasw63AsimI63bD32+ahG5H1DsPD3fvz0JjOte9s1k0A== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(376002)(396003)(346002)(451199015)(36840700001)(40470700004)(46966006)(36756003)(86362001)(82740400003)(4326008)(36860700001)(110136005)(54906003)(41300700001)(70586007)(8676002)(70206006)(356005)(7636003)(26005)(186003)(107886003)(478600001)(7696005)(5660300002)(8936002)(2906002)(426003)(40480700001)(316002)(2616005)(40460700003)(82310400005)(1076003)(336012)(47076005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2023 02:37:49.4907 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 54310cab-9288-4618-dcac-08daedfcabd7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6891 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230103_183755_128950_7F206B1B X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The default value of NR_IRQS is not sufficient to support GICv4.1 features and ~56K LPIs. This parameter would be too small for certain server platforms where it has many IO devices and is capable of direct injection of vSGI and vLPI features. Currently, maximum of 64 + 8192 (IRQ_BITMAP_BITS) IRQ descriptors are allowed. The vCPU creation fails after reaching count ~400 with kvm-arm.vgic_v4_enable=1. This patch increases NR_IRQS to 1^19 to cover 56K LPIs and 262144 vSGIs (16K vPEs x 16). Signed-off-by: Shanker Donthineni --- Changes since v1: -create from v6.2-rc1 and edit commit text arch/arm64/include/asm/irq.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/irq.h b/arch/arm64/include/asm/irq.h index fac08e18bcd5..3fffc0b8b704 100644 --- a/arch/arm64/include/asm/irq.h +++ b/arch/arm64/include/asm/irq.h @@ -4,6 +4,10 @@ #ifndef __ASSEMBLER__ +#if defined(CONFIG_ARM_GIC_V3_ITS) +#define NR_IRQS (1 << 19) +#endif + #include struct pt_regs;