From patchwork Sat Oct 5 15:25:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 832987 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp1257044wra; Sat, 5 Oct 2024 08:31:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXC3Bt7hytJmWXx7g5RU9KXZxwx3tYqQ+8uATzVmb8GLQYGRNoBTOPrqy0bPMHJekIb3u6FBw==@linaro.org X-Google-Smtp-Source: AGHT+IFgTSDO/0W15T0rPKr8p7bvG48LMa4aMzFbcsg+DMs2tZ7TIFV/6wzHVPKafTAkgrytyMEZ X-Received: by 2002:ac8:7c46:0:b0:458:3b68:ce39 with SMTP id d75a77b69052e-45d9ba79546mr97518241cf.9.1728142275890; Sat, 05 Oct 2024 08:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728142275; cv=none; d=google.com; s=arc-20240605; b=PQoDkkTN7yiSeJl9eJxdJgWRRFv1hc65XPxcn70sci/V05j0a4xkx9npOKt+UX2+kZ WRq4rS9JUzIboK3oTsX2EhAvUp/goSr/tFhYJsQBr/sU1SX807EomemTMu+llX2uWKHD zdQ82jdiscCswnLNydQnpvqw7nXm+I7w6xFtw/cBjSsjVVc+jOx2G2zZiOOITdrFMp34 2wI72r4/W7jgW96Cj5OLVx/VqFz424ELLL8mSDXze3dK09FDaihl1etjCLBCeFUzeuDX nfYsbMAnhF2CWhR5p55XuhI3krssR7/odZnR5EmzwFpzYwitCAmWgcIw2R4z1op7Ctvf A8MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qpc+gtvz4QF2D7U7hwk6I/PwDTmOhNNc5A8A2G2CqV8=; fh=rQg8EQ8KH04w/0VkDYF6/ktgEyHJ2dqn1eatHCfBaLw=; b=Z+goVtVUjBXc6h7JJEputVUELhZxhgRsE1fM7t7lFDjCH926vsvnjxvwc/1cNrDfLM 8Zey3MbXU+Tp/JgvMBIwjPO21AT1aWHN89vAap2rc8IKBuxaYB1ZNw6RotNu1/bPWC7A dArS/bw98xc8Xim8AQhmmf2d0umglb8dhSgTzI+CfdL9CHHXgQeUJb3P3AjWA3zGv4lK dOwBjS/MpZVX0wLpoaykYPo5ZO8S/+v6tVWRBFHS5LYT5Rhk2B8K64DgsUEwnR/OHW/N XEjtOnOXneRb0AUSZUcvVPZy5UJaDejCI2YEca6hWWWMU8DLhP4qRSiI7MhRH7l1GxzD 5D9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b5bH8TzN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45da74ac7ffsi21629311cf.102.2024.10.05.08.31.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2024 08:31:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b5bH8TzN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sx6fO-0001xc-Mt; Sat, 05 Oct 2024 11:25:58 -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 1sx6fN-0001wa-9k for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:25:57 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sx6fL-0002KG-4j for qemu-devel@nongnu.org; Sat, 05 Oct 2024 11:25:57 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-20b49ee353cso28727765ad.2 for ; Sat, 05 Oct 2024 08:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728141954; x=1728746754; 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=Qpc+gtvz4QF2D7U7hwk6I/PwDTmOhNNc5A8A2G2CqV8=; b=b5bH8TzNryOOwnuIPccE5c3jXQcoTLmj3rhK301DiqYSSeqiN2hywFG/BtDwp2cXFz qQ88SomeL5d2m86/ddrR3T1paVASX8MWN+ATOdfYr9OC7+UBQ/T4rdVcdHBIP0MHO5Ld ZC3wBUHZ1VisVlKtKn02HbJ49qcfXy9pijUw+FOVBgg9PTlU5ri2taTePGH+UljZRWbE rTpqTcWJDBIXl/c6cFj/DRkVBi1BmoFLCxyEk3Q9SkLLEofbYyZgBQdGlqGHSuHKznXI jdGWipLdEI8UGiqx6LYR7tIWCqXhtBvU5P+hAJYUBYF7jz57sj48w6NIaC64iRjGLNBU EjsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728141954; x=1728746754; 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=Qpc+gtvz4QF2D7U7hwk6I/PwDTmOhNNc5A8A2G2CqV8=; b=v8o8cF3wzBNwtSe8as87X/Z1ju8X1VnZn7REqwlDFRe8hbmaFmpruPJcJBKeBJ4ZI+ P47QQRk8VceTQNQbvUJm3RNlQ6N8SYr9z9C6aV6Eg98/tL/f32JFDXbdqGytMZFTNoLo beeoPAVFuxrD81cLy07OuLPkJ+sHkbCj3qoFC1mJW3soX6dNGmazZ74P2VVjmmZpTYW5 XAlbUceLYzjeDE/ATnn5NxRCGavHhhn6zjImF4YY6dO0KUXh7zqaHwWKUv+ECjoPmcTe SgWVRJomncZpHpy9ksH4GdOQ25vKIA47RCqHQHwIkjFaCfuOGrwuLVIUMgLZfLqHQ4yD 2/CQ== X-Gm-Message-State: AOJu0YyijW5WyFzmFXV1C5bNwcjTKHpBLBMIJBx03URX/X8LS/v/aKP8 T789MubXKOTSZo9LPv4pO60QDhQbgH2JRhe8pnBHuYWMp82XbZHvtIxaJnEwcmq4s8roGeR+GrM S X-Received: by 2002:a17:902:f68f:b0:20b:54cc:b34e with SMTP id d9443c01a7336-20bfee34d54mr84315875ad.51.1728141953851; Sat, 05 Oct 2024 08:25:53 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c1396948dsm14351765ad.225.2024.10.05.08.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 08:25:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@kernel.org, peter.maydell@linaro.org, alex.bennee@linaro.org, linux-parisc@vger.kernel.org, qemu-arm@nongnu.org Subject: [PATCH 01/20] accel/tcg: Assert noreturn from write-only page for atomics Date: Sat, 5 Oct 2024 08:25:32 -0700 Message-ID: <20241005152551.307923-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241005152551.307923-1-richard.henderson@linaro.org> References: <20241005152551.307923-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org There should be no "just in case"; the page is already in the tlb, and known to be not readable. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 117b516739..fd6459b695 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1852,10 +1852,9 @@ static void *atomic_mmu_lookup(CPUState *cpu, vaddr addr, MemOpIdx oi, /* * Since we don't support reads and writes to different * addresses, and we do have the proper page loaded for - * write, this shouldn't ever return. But just in case, - * handle via stop-the-world. + * write, this shouldn't ever return. */ - goto stop_the_world; + g_assert_not_reached(); } /* Collect tlb flags for read. */ tlb_addr |= tlbe->addr_read;