From nobody Sat Nov 23 19:33:59 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1731336660; cv=none; d=zohomail.com; s=zohoarc; b=Wd2rsDWj4yQyJa0t/nDkpgsuIcBSGwc8YparX7TP3rzhbqI8K8vvjuYdmUvgowcki6ynpkCJp2KZLohHV49LaWpqc2cywzPw6MVguFJ2yQFRgSFbgeGcgzWATLBo+ESHmPTtNqx9Trl/ZFkiqbpGw2/+Py5K+3NJg1ME5twD4ZI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731336660; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2M/3qA8mMKz7DvBymSN5QuTvN/Xyu5smd+SKwoEDOq0=; b=UefkNHiTozl68n6+n34EMlvJWwyKFu0zIXykCh0cGeOpsu3jFSWzYSd1gmt4+aWgdYL1tuoeVe5T5YK9puNDWJxITJShM+7R4FcicLTCJULp316QnrDkv8expQGNOP1E3Vy6Vi0ZGq6IRos8VcEe+4j8OP2ddBB9QDKs4vsLVCs= 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 1731336660404194.3493605664753; Mon, 11 Nov 2024 06:51:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAVk2-0002Cq-JF; Mon, 11 Nov 2024 09:50:10 -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 1tAVk0-0002Bu-II for qemu-devel@nongnu.org; Mon, 11 Nov 2024 09:50:08 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tAVjy-0001wr-GF for qemu-devel@nongnu.org; Mon, 11 Nov 2024 09:50:08 -0500 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-20cb7139d9dso42173345ad.1 for ; Mon, 11 Nov 2024 06:50:05 -0800 (PST) Received: from stoup.. (wsip-24-120-228-34.lv.lv.cox.net. [24.120.228.34]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21177e68cb0sm76213705ad.224.2024.11.11.06.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 06:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731336604; x=1731941404; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2M/3qA8mMKz7DvBymSN5QuTvN/Xyu5smd+SKwoEDOq0=; b=OouI765aM7lkx+/k56qqY7OLSHXtyl2wSePhdbc8iarcrbL4RmihUCybYuqUWiqc7x XXm73OxnCuL0ZEgdcrMh+qZROS5o9PNYeMOJE2AO6NH7Gc9F+429p1CsLaQnAl4HnggT PDdaAEFJRHxbLgMB7EOYpmMHwDYynMDxngYEwY9Ejf5jUzG0ZKjYZLxgItnoijAhB06C IRmdgqb4KCRHSrGo35fY/6QIvDv29/CMxdr2MjEXHe829gmAIHDmb9N4ED4sKMnbNUh1 Ib2cS/cKg8mcCzKvG+PFBarlHb4LVQl0o6swRJNEDf+I87gadaobjfX5drkQEeV8qzE4 TIwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731336604; x=1731941404; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2M/3qA8mMKz7DvBymSN5QuTvN/Xyu5smd+SKwoEDOq0=; b=X5XQoAnbyyrsBF9KkydIjvwrZ1eI8TiQei4yyUTPBSmoN4PmX60NYvNtdE5gQhI/VW lSZP7o89no3RBvj7h7Ndk/VXhBFuFvFV/DwAyRTe9R76osEEAX5VxxC8YtSgWXlWNsDc zYPBbtF24zegVJVd4GMZOevj0o3N+q8WyvNxl4dLHEjf3IqZAlLu+Vc3FR3iX+h/6mv7 z8oBVR9TkXLa1JEp+8Oc/bbByCmZzS2Z4jdnWA4hn96DEVOiA6f63sB1GcqGpGAwL16N OllETxqQVpPDi/H/ny7tLfSexK8G+A/voGwdgfO47v+g2VlM3dTwK5FzX5NwJdW+rCDU ZgxA== X-Gm-Message-State: AOJu0Yx8nIJRvbhIntCuv/L49JZLT1/bnYjBKA/ID3/Otzl73WMESElg GpVNtUaIh23JPFkhuiXaAWCKOS/zTRyXsSqeGy7+ZjKwfJ3S8rVZcP2ekoGehcOkjoBMWQtkj08 K X-Google-Smtp-Source: AGHT+IEVvIf2X0eekEoWokJQUG03DUGUs5QXh6JoFPk6M7rHtK9dfRhcgX3T7NpQL9DDOaOGJqEp6w== X-Received: by 2002:a17:902:ea12:b0:20c:ccb7:df84 with SMTP id d9443c01a7336-21183e0dd1cmr183698405ad.42.1731336604557; Mon, 11 Nov 2024 06:50:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org Subject: [PATCH for-9.2] accel/tcg: Fix user-only probe_access_internal plugin check Date: Mon, 11 Nov 2024 06:50:02 -0800 Message-ID: <20241111145002.144995-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.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=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1731336662916116600 Content-Type: text/plain; charset="utf-8" The acc_flag check for write should have been against PAGE_WRITE_ORG, not PAGE_WRITE. But it is better to combine two acc_flag checks to a single check against access_type. This matches the system code in cputlb.c. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2647 Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- accel/tcg/user-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index aa8af52cc3..06016eb030 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -800,7 +800,7 @@ static int probe_access_internal(CPUArchState *env, vad= dr addr, if (guest_addr_valid_untagged(addr)) { int page_flags =3D page_get_flags(addr); if (page_flags & acc_flag) { - if ((acc_flag =3D=3D PAGE_READ || acc_flag =3D=3D PAGE_WRITE) + if (access_type !=3D MMU_INST_FETCH && cpu_plugin_mem_cbs_enabled(env_cpu(env))) { return TLB_MMIO; } --=20 2.43.0