From nobody Sun May 19 09:42:10 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=quarantine dis=none) header.from=sfc.wide.ad.jp ARC-Seal: i=1; a=rsa-sha256; t=1651720425; cv=none; d=zohomail.com; s=zohoarc; b=jDw354YdcsGnbxrn/guQuHKgYuAfA2CQji/t2p8Z6iUvs10LMu8LAOE9d+sQgfkwEUrgNC4Mes9xNYvnuxfS3XimeDalSUMv1Jye7jY2xsfOIpGl19MbPMh0i55f1PWKCsiUaTYDNOaFsHe+miC6ZvOZTPPZR1YE1p7ZaKF9pYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651720425; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=6J5MbFV9+5QDZTer5mv6673ScD1edhPGc7IfKgoHBC8=; b=bY675jlGwfAoMeOs3esmi8oTlCvuq3EGwFZWhYNaF7RAnLRHX0rFGiEWSnGFiQPYCEAcr5X40R3hi22A2bZlpQX5OoNDJveIkY3I2Wn0Nu6OCGFW3/MZTif7bONV5HrqEFv6QPso5m0KladYQzQK4D7J0Wuu/7WXBmUOwtk8jQw= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651720425538686.3900804664232; Wed, 4 May 2022 20:13:45 -0700 (PDT) Received: from localhost ([::1]:42960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmRw0-0002qX-GL for importer@patchew.org; Wed, 04 May 2022 23:13:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmRvC-0002AF-P7; Wed, 04 May 2022 23:12:54 -0400 Received: from mail1.sfc.wide.ad.jp ([2001:200:0:8803:203:178:142:133]:47920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmRv8-0006Va-0K; Wed, 04 May 2022 23:12:53 -0400 Received: from localhost (h219-110-166-078.catv02.itscom.jp [219.110.166.78]) (Authenticated sender: mkei) by mail1.sfc.wide.ad.jp (Postfix) with ESMTPSA id 25C4A4655; Thu, 5 May 2022 12:12:43 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sfc.wide.ad.jp; s=mail1; t=1651720363; bh=KSqF29AEingAgln34VcmqF+WeN8XhSc84wgbRg18ENE=; h=From:To:Cc:Subject:Date:From; b=JEVdgLPofyhCF0CpgJ1j2RYKGLrEoHNp24GJpJ/1sZK9DPPFVqqOlEcE926PKeLSe qBBrni8gIMy9vGNhHeoPcdprMUx8ow+7zDJv9bP+QstxRSUw+4QAQbuj7vhiTuOazs Xq9UcT0Gpcdm3fq1SkCagIeVy/oAth6Lx+fKGMxkxcBFNXyCKSBURScyTxl6cpl7St gjwUFynqsflB5Ln2NbJPJE5MgNdGEXuT7F9NqdJHyR3X7X/9G8amJfQD/WAbZSXOkq 90rXLV8OAX9I/3dl9DgclM67onViqau6L7ndgQXh0EGYTklu2Scxuu6UfVvUp8tOdR Vj8xUlqgzGn0A== From: mkei@sfc.wide.ad.jp To: qemu-devel Cc: qemu-arm , Peter Maydell , Keisuke Iida Subject: [PATCH] target/arm: fix s2mmu input size check Date: Thu, 5 May 2022 12:12:34 +0900 Message-Id: <20220505031234.20349-1-mkei@sfc.wide.ad.jp> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2001:200:0:8803:203:178:142:133; envelope-from=mkei@sfc.wide.ad.jp; helo=mail1.sfc.wide.ad.jp X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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" X-ZohoMail-DKIM: pass (identity @sfc.wide.ad.jp) X-ZM-MESSAGEID: 1651720427902100001 Content-Type: text/plain; charset="utf-8" From: Keisuke Iida The maximum IPA size('inputsize') is constrained by the implemented PA size= that is specified by ID_AA64MMFR0_EL1.PARange. Please reference Arm Architecture Re= ference Manual for A-profile architecture "Supported IPA size" on page D5-4788. Signed-off-by: Keisuke Iida --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 5a244c3ed9..868e7a2c0b 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -11116,7 +11116,7 @@ static bool check_s2_mmu_setup(ARMCPU *cpu, bool is= _aa64, int level, } =20 /* Inputsize checks. */ - if (inputsize > outputsize && + if (inputsize > arm_pamax(cpu) && (arm_el_is_aa64(&cpu->env, 1) || inputsize > 40)) { /* This is CONSTRAINED UNPREDICTABLE and we choose to fault. = */ return false; --=20 2.34.1