From nobody Tue Oct 14 10:37:14 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1588828308; cv=none; d=zohomail.com; s=zohoarc; b=Fq92ArMke5he/TgiusBMeKdLdtxGedhOnllpQmEHcHUOtixNJYY7sZTmt7joKesL9Gsh/uDMy1ZM66fumC6SuHdq8CaMTjOTec41C7TKdUQ/kXmR9U3Auc7rHnWwQxv9wwSPDrHWKrQv/iYkpa/dCD/yVMk8DO1hmwjGyWQnJIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588828308; h=Content-Type:Content-Transfer-Encoding:Cc: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=/DsU0fa1ISG1YjQQMHxZheXxj/I8oe0GyvKwSNJm49A=; b=gfyUzbvWwEZ4WSywk+kqzuTwF55s7XxAU687fcJbN3rMFHujqMmlmu4yrrh4emx3423PUKnOqoctR0l8FNalUAJGmRe8VqVYCDHbFxM0d2CMvqJKoLfaO9C7UFOphgliinZYCwPYH7Bo3etb0RR0zMsfEaBJAecBGpJ2a64ZyeM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588828308018916.2499131261496; Wed, 6 May 2020 22:11:48 -0700 (PDT) Received: from localhost ([::1]:43554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWYp0-0005Lb-KC for importer@patchew.org; Thu, 07 May 2020 01:11:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWYhy-0007fH-4b; Thu, 07 May 2020 01:04:30 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:50301 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWYhw-0007dU-K2; Thu, 07 May 2020 01:04:29 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 49HhFp0LLTz9sT0; Thu, 7 May 2020 15:04:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1588827854; bh=LLwN8di5dedWUvODzdbVjKRWD4bvw8eDwuEzdivzzTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FLA2TorZFaFEIC6gqn0T13TopGUvw03sT61LRbabdq9u4QwNkHbjLM2hen7UfjTbN bE8b57yGKwpx44P4M0+OFB30xEn2QJ02jxj8Y7LI7vY/KmPpd4oYhi1G35aNufHuTz jYjfX1YX4VvtTentrRLLEMOrgr0kt3AJvOUjDGJ8= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 08/18] target/ppc: Enforce that the root page directory size must be at least 5 Date: Thu, 7 May 2020 15:02:18 +1000 Message-Id: <20200507050228.802395-9-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200507050228.802395-1-david@gibson.dropbear.id.au> References: <20200507050228.802395-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 01:04:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, npiggin@gmail.com, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, Suraj Jitindar Singh , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Suraj Jitindar Singh According to the ISA the root page directory size of a radix tree for either process- or partition-scoped translation must be >=3D 5. Thus add this to the list of conditions checked when validating the partition table entry in validate_pate(); Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: C=C3=A9dric Le Goater Message-Id: <20200330094946.24678-2-clg@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- target/ppc/mmu-radix64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c index 224e646c50..9967857058 100644 --- a/target/ppc/mmu-radix64.c +++ b/target/ppc/mmu-radix64.c @@ -212,6 +212,9 @@ static bool validate_pate(PowerPCCPU *cpu, uint64_t lpi= d, ppc_v3_pate_t *pate) if (lpid =3D=3D 0 && !msr_hv) { return false; } + if ((pate->dw0 & PATE1_R_PRTS) < 5) { + return false; + } /* More checks ... */ return true; } --=20 2.26.2