From nobody Thu Nov 14 17:52:53 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1708704233; cv=none; d=zohomail.com; s=zohoarc; b=npD+WOiIpfYcLewoYeByltQHAXob7gk5Pymy9Z5HLuPUEzDy0dv6fxy3coVUFj5pscr6b30of117xibxSwtuTCdj4jXlFKxq1hl9ZkZFjLd+09cEsvwJG8SfZ8Mtv6NBs8cC+TX53nXRA8H71ET6DbRNHYZqKBemlkRpYcfXdM4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708704233; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DrRZ61wOnwt9hhs6OE9xukgw6eXlMPtoB/Awq7rJA7I=; b=km+g5US5YerfSTbeDkYRK7v+A6tyI3I2UWH8e1/NBbViMHGtcaqmD/UefVjolMbg2jIs0ozfXWFOD/6yrdQ5RvMcc7q3jeaNmT5Di57SkxiA12J3b3Xc1xiZJTZvOuJbz+y19OS4JwoAK5NcDw+vNFAQ7ANn19+2fifcvy+kXXA= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708704233986856.444440390991; Fri, 23 Feb 2024 08:03:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdY15-0005tJ-SA; Fri, 23 Feb 2024 11:03:15 -0500 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 1rdXkS-0007cs-QF; Fri, 23 Feb 2024 10:46:04 -0500 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdXkP-0006jS-Q4; Fri, 23 Feb 2024 10:46:04 -0500 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1dc13fb0133so7537935ad.3; Fri, 23 Feb 2024 07:46:01 -0800 (PST) Received: from wheely.local0.net (220-235-194-103.tpgi.com.au. [220.235.194.103]) by smtp.gmail.com with ESMTPSA id h18-20020a170902f2d200b001d913992d8csm11808208plc.242.2024.02.23.07.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 07:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708703160; x=1709307960; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DrRZ61wOnwt9hhs6OE9xukgw6eXlMPtoB/Awq7rJA7I=; b=FgQby1VBsXjsK4OGmmXFkgVOBo4CNZmIiiFxFNH1V//gmlGHsCg6odT+f354n5phua iDrQCg+2iw3DFdrsbhrpGGuV4xPGGEe0WxTO8wlxk3Bt5HZsIFpsfaSSPK6Gf+04bVSx 2NB5VtSq1WzTVZyZBar6pBSC3N4jXE900pS7fidNT/nlBdiqPWm9G+VDRzYLdHn0j4It GuTDD7SxH7qd2jz+rceNJOv5oUTowRR5sUJHwD1y9HgwU0A0cNyaAqZm6PLN00CymEld shNQ92QoqFeDIsdgalSf6bZkLXB2GlVORpjQpNKngCU5Y5WPxxsdKthbhAkv6X61Z6mC cgQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708703160; x=1709307960; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DrRZ61wOnwt9hhs6OE9xukgw6eXlMPtoB/Awq7rJA7I=; b=FCe6bnLS0Ijca1MpoEa1tWKJQCsnj4VYYF/p0os77dt48FNVeMwWPBqK8XhDsZcQHj Khn3ClCNav5Yf5PEABX3FrJc9n4yzHQiJiO3w8F9A0aF5j5rM2cQmjtlGClWvCqMq2CA 5p9iCimUkYIdh/Ycjuf5bWaiu+RC2PPLGdMlbW4wu0ZAmGOZhvK2fRPoDFYs2Sew591Z ub9qTXjKXPRPuCoZmUJ/78SfVBT0FmhecmZRXZifNIEUTueGP5aNFfkfIJd8G4y8RWBz D9sxIIgtn8+98sMP9MPetmFTBMJ+xTLTb0E+znnqlvlhGcO5ZNviYAC4Qctzco0I/UXi X4EQ== X-Forwarded-Encrypted: i=1; AJvYcCUzqWIQMcUehJk9VVw6fY8AJDazpNdonTwnMA8V8NbpZCkVXkLJyuGkVlBACpXdEeuwoa/+kOrKWuqHxsRkaK59DJA1 X-Gm-Message-State: AOJu0YwvajHLq0tSxpmvtAH9Nvx4CVTS6KWp+UiWXaNbIqLlDsiSqSER 5gTjesEo/nY4ZY1Oux8ujMPXn7eGg5M+qDxdZZjR93eovOXRxQ3wtdUc3TdE X-Google-Smtp-Source: AGHT+IHPcWpjyPTIXwNnFjNfT0SP2LpoI3MCpdOaKIA51f4GuPcVeG8uPAU+2cgxnK9XqQQVftvKtg== X-Received: by 2002:a17:902:9a4c:b0:1db:d184:c458 with SMTP id x12-20020a1709029a4c00b001dbd184c458mr142829plv.44.1708703159732; Fri, 23 Feb 2024 07:45:59 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , BALATON Zoltan Subject: [PULL 44/47] target/ppc: 4xx don't flush TLB for a newly written software TLB entry Date: Sat, 24 Feb 2024 01:42:03 +1000 Message-ID: <20240223154211.1001692-45-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240223154211.1001692-1-npiggin@gmail.com> References: <20240223154211.1001692-1-npiggin@gmail.com> 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=2607:f8b0:4864:20::633; envelope-from=npiggin@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 @gmail.com) X-ZM-MESSAGEID: 1708704235083100003 BookE software TLB is implemented by flushing old translations from the relevant TCG TLB whenever software TLB entries change. This means a new software TLB entry should not have any corresponding cached TCG TLB translations, so there is nothing to flush. The exception is multiple software TLBs that cover the same address and address space, but that is a programming error and results in undefined behaviour, and flushing does not give an obviously better outcome in that case either. Remove the unnecessary flush of a newly written software TLB entry. Tested-by: BALATON Zoltan Acked-by: C=C3=A9dric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/mmu_helper.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index 949ae87f4f..68632bf54e 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -808,13 +808,6 @@ void helper_4xx_tlbwe_hi(CPUPPCState *env, target_ulon= g entry, tlb->prot & PAGE_WRITE ? 'w' : '-', tlb->prot & PAGE_EXEC ? 'x' : '-', tlb->prot & PAGE_VALID ? 'v' : '-', (int)tlb->PID); - /* Invalidate new TLB (if valid) */ - if (tlb->prot & PAGE_VALID) { - qemu_log_mask(CPU_LOG_MMU, "%s: invalidate TLB %d start " - TARGET_FMT_lx " end " TARGET_FMT_lx "\n", __func__, - (int)entry, tlb->EPN, tlb->EPN + tlb->size); - ppcemb_tlb_flush(cs, tlb); - } } =20 void helper_4xx_tlbwe_lo(CPUPPCState *env, target_ulong entry, --=20 2.42.0