From patchwork Sat Oct 5 20:05:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 832996 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp1338722wra; Sat, 5 Oct 2024 13:08:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUDd6xGcc6fe2WmIYBaVUPVs7+pPhWkaB2IyFFj3nysUshO3I+WAES/HO9F2pZjQtSlkg3Aw==@linaro.org X-Google-Smtp-Source: AGHT+IG+N5oucwBa4yPBh55cF/L5IMppYwQ7h9usEX6dqdp8Y2W5EDB5VQFPN2AfEfaoyF8QdK02 X-Received: by 2002:a05:620a:248b:b0:7a9:bb8e:cd9b with SMTP id af79cd13be357-7ae6f49da34mr1163569585a.58.1728158882743; Sat, 05 Oct 2024 13:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728158882; cv=none; d=google.com; s=arc-20240605; b=FeIc/er68dDH39I82qDSnA+qKBktCXzYx5JPk7De4+0YxdLlx9G4A4GhucGms5uvhf HrxiHJuxfCbddM4TMVA/ASt0Hv3js0+5C3FJW4aPEqPC0d2eL6r7E4Dt57YoxuKqYLVJ +/IXzsfRNy576eYdZOwf2BCpdbbPgnfW2AbJEvONoI0OHdOVotG9eNE+pWDFUiajiV/m 4D8GdrOQV/EGkc+HrJ7SoZxp+1+Cvsn4MNlEX0m50TQ6NtE3oftoxyxf22blA/n2o9ux UEozBYKhwt6HCz7vowmzyyD04nYcBDyjyzSFjwRg5M2WTxl+hjlvT8vo79PFSdQVkjhz ogrQ== 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=FblpZq+3cwYZcBSlulEoSAn0dsL5+wVuy4bsu678AGSmjfuDxl4fUBBk8s8u4/CL3/ SFL7YvLjHDWl/4xOZQjoOMqTOfmGmByYGmZ+Kit80c7t38axLFTU46weAzd2T9LxqIo5 q97qij87tJzmnldzynrOKiwdJoY2k+h11VAFUmU2StT1XyMDjhzHyNGS/vR8cvE+/hxo JpLQN1O1s4NWlBz+QdZyen0s923mX3QI4aOq+mOnFS1PHFB7uweiW9jGwjD1GtSdd1xA xPvkk1z+SOz4xr3wBiAhzTty84m/gDxnAUBSbwVkuQcnvJMLGLJjDST9hxxlxYNvvCWA ty+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J7ETou96; 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 af79cd13be357-7ae75764bc8si254260485a.474.2024.10.05.13.08.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2024 13:08:02 -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=J7ETou96; 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 1sxB2W-0006Gz-Rc; Sat, 05 Oct 2024 16:06:08 -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 1sxB2U-0006Ez-Nd for qemu-devel@nongnu.org; Sat, 05 Oct 2024 16:06:06 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sxB2S-0001hr-0H for qemu-devel@nongnu.org; Sat, 05 Oct 2024 16:06:06 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-20b58f2e1f4so21812115ad.2 for ; Sat, 05 Oct 2024 13:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728158763; x=1728763563; 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=J7ETou96MJsubgZ7bZXJ1Lpb2hWHSpxbRLjFp2u1d+wjN5yvudDHCgKssjd2UKt6Kl Mk3Ltpy1k9tWHj9KzZocGvPWT6Gdx732waYHFLHGPjdG22sP9zo2nF/DkuLAVN5KeZLa SIZFPwDhiEQwqt8GxnKFAh9kOR3dKbIjZyxA3G2j+1f+VciBOm4lqfYLe2Ug6p4JV/jN UApNsZXFs3KiIli88gNk0U1SwZpI6mXfXexRQwea2pULDHSjpZRnaiY5n0O6hVpw7CLF nKsH2yXvBjsZkdeWwaD1zWpR8jE0WeGeJaG5L5YmfyjtY/mqrDc8GjQU5uxRx5LCRcKq huAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728158763; x=1728763563; 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=sy752RxiRO4zcick0KA55F/ygDBpdLm8lVPm3i0iT2D+qtXFjNzuDqrxdxRVSoKOif McIWheIjeAXHWep4J3g3fnMPu3PVlTkNz29wXUfras3mIrtkCGj5/WNxG91A5sx79cXL yhYtktEUeq/yewMoDhYF7MA7Nv+Fi2tljbgZyV92eWs42bEMC8qbl/pDqciuUq2cbOtn +CW4uvrDwbrAsEHNs/1f5l8bsdCGDeJOianaPxVQqSu3BJmjF3RoML8xMosTWjSIKKP3 uvekFn7Py/ZH6cFUSTpg/0xF586c+4n9vX31V3mtGWWFu/7ivhGC7UqiA8t+csaJI+yx Zt5A== X-Gm-Message-State: AOJu0YxLyq5CJ2LcGF0GC3etB3Bu5V80lQuwFKqjq7d4ibd/3x6wd4rt gQcMoJ9rfja3NWYgOdtUAtV9InfW8eLxH1YYkcxexby2FFt5+kERoSwad5tJ5O2CyUXgVbGCgFz O X-Received: by 2002:a17:902:f545:b0:20b:a576:1896 with SMTP id d9443c01a7336-20bff190668mr89398765ad.43.1728158762695; Sat, 05 Oct 2024 13:06:02 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c13931055sm16493405ad.139.2024.10.05.13.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 13:06:02 -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 v2 01/21] accel/tcg: Assert noreturn from write-only page for atomics Date: Sat, 5 Oct 2024 13:05:40 -0700 Message-ID: <20241005200600.493604-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241005200600.493604-1-richard.henderson@linaro.org> References: <20241005200600.493604-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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 Reviewed-by: Helge Deller Reviewed-by: Peter Maydell --- 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;