From patchwork Wed Oct 23 03:34:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 837790 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f12:b0:37d:45d0:187 with SMTP id hh18csp260805wrb; Tue, 22 Oct 2024 20:38:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUcW0JHyDdNDe6440HmlCPdTxIKvPLE/B3hQDY/gSagfM5N/HZHu1SsymvaVfTqYeWXyiFl0Q==@linaro.org X-Google-Smtp-Source: AGHT+IFYuxF1A+POXnj6xPSgSofQ7IUst3FD4Q2uNN/D/0AT62cmxikNFgr27ftyQPYsBx9G/q6i X-Received: by 2002:a05:6214:5242:b0:6cb:cc5e:1bcf with SMTP id 6a1803df08f44-6ce3417a46bmr17453076d6.21.1729654682382; Tue, 22 Oct 2024 20:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729654682; cv=none; d=google.com; s=arc-20240605; b=S888q8lF+THtEPeTbveA37SefbgLciu8NYeVs3d7OSgN77a/J4LJr453qwe6gEtY0F 20u8NaSr/SuqZeSNXsHyBzikh60/Oe2phV8daPDEs9A/U/kNvWnc29+D92Q6Ypp+46fo TSrlicikC7rJjigFLkGI8twUEjuJ1roQqLpI/idJUk/qV5jBC0N/k9nHWRPvVACNEcaP q5Y8wg7dkk1C5R5Bnpjq0ffFoe7hbUGP08N80Eq9Z4ripGFjfbMXY1gX0q/DqevAX5J4 uCDnHYPhkzG53AVAF0LdZOxh2+saIDBOv6Pu7UtKEDLJ5aE3XxuR/jU6T06e3jwwu/08 5Dpw== 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=CNvZhuw+Bf1omcEW8TpFi1p3fkU8it6HGeh8TuxBNsg=; fh=u9oeVh3hHhtbg+GmV0mMjFSzwH4tBCfdDtB0ZjP10xo=; b=GtexbyWx2pjgJvnrFabjDH4+BSEq+vXufN+f+F3L/VJAhMQJweihVEv9EIbvcqtTSR Dhzxy6miQR8gNeC9bBz0oFrOXtVxqacq/H6i0nfKVkXU5rswY46045pNpUyLw2c7v397 9jae2Ah9oneqykboyMNgsJtIxUtpUl5G6eRIQn9+mxR0vmQj69ruTvil0BpM8bI8/Byg yXpVlTqq9j5LFfzZpw4I1dsf1M5sLx+gAzRlrKXuOD4UapDPbrXYSp4EmuhTxyZRwy/p fLvvsJlcfDYWV2D5doLm8GCO77NF+9lxrKdwlCDGsOtOUk6A5J8ouS+NW1K4AEcaCJLN NPKA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eBxHGdbX; 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 6a1803df08f44-6ce009d2569si80566166d6.384.2024.10.22.20.38.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Oct 2024 20:38: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=eBxHGdbX; 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 1t3S9Z-0007QH-IY; Tue, 22 Oct 2024 23:35:21 -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 1t3S9A-00071l-C1 for qemu-devel@nongnu.org; Tue, 22 Oct 2024 23:34:58 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3S93-0008Mu-Kc for qemu-devel@nongnu.org; Tue, 22 Oct 2024 23:34:55 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7db238d07b3so4695958a12.2 for ; Tue, 22 Oct 2024 20:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729654488; x=1730259288; 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=CNvZhuw+Bf1omcEW8TpFi1p3fkU8it6HGeh8TuxBNsg=; b=eBxHGdbXxczgFyv3E0UBFpIGhn4ylq/QaZqleJPwBTG+JWmz/0C0bsucM12sWNzMED PQBxh+mGcD0v1wpIbnPf7d3rxEb75NZKS4h/Pyo7TB389dhNNbYBhH3n8UNqu/OlYWer /8yBonGDvJ9PNC9XaSiWcw0pVRJWL5NrV10ZWnMjKr/HkppEWLO8RkAp6WJzfhIwbEVe 55OZsrVsYIUYE+FoOVIMwC2kB6CABQxaMuLe/1k42o8Gka6dAwqCg6HJePivB8a0yyH/ Yu8IkgzFOemWiCKHZDRuDhQPWCEqm7CKTvV9L4IgKRys2IQTrdyxfKDaQUb5ObDdfxUx 6BtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729654488; x=1730259288; 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=CNvZhuw+Bf1omcEW8TpFi1p3fkU8it6HGeh8TuxBNsg=; b=JRnnVnooYGoIeKk/wXcVBs0ZqEso5FiIt8TULvHl8W3LyUgHnQmRyQDcO1P3YxM47s ri/OKWObiGwr3n3Sqz4a8sHa0/6SIqJ/+asv8g9OZJht89OyaX3YobEmMMy1MoHpRzTA N/cDq+SZ+DlkTLlLdBXjFTxfvDByHeIqqZUyTrIEeZvakpPE5UGrgdpcfy1O3SLzH780 1+f07TKVuOxl/5ofpqWf1ibX7tNxrqlqs3spEpzevR4qFDOQZutl6sIcoCKstm0DxV54 MIUpnkmiTVhKBVhex80DCKcKeAEuhD+zk0rVlsn9TitXLEU4w4E/d4+FM9EN796k1Yk9 94Qg== X-Gm-Message-State: AOJu0YzOwQxeLR64kEEzkGooKt++ow6MSQZGmSl6yVaKRshHyZkM41eo 6tMWDoumimboAH50IM6vtnvX+28l1Y2O0h9Yb3rJWwXo+Ekr2QIsPx0NFjKz7qA9V4Yj5SCjJw+ o X-Received: by 2002:a05:6a21:398b:b0:1d9:542:8d40 with SMTP id adf61e73a8af0-1d978aeacb5mr1341914637.5.1729654488143; Tue, 22 Oct 2024 20:34:48 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec13d73b1sm5438338b3a.105.2024.10.22.20.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 20:34:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 18/24] target/i386: Use probe_access_full_mmu in ptw_translate Date: Tue, 22 Oct 2024 20:34:26 -0700 Message-ID: <20241023033432.1353830-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241023033432.1353830-1-richard.henderson@linaro.org> References: <20241023033432.1353830-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.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=unavailable 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 The probe_access_full_mmu function was designed for this purpose, and does not report the memory operation event to plugins. Cc: qemu-stable@nongnu.org Fixes: 6d03226b422 ("plugins: force slow path when plugins instrument memory ops") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-ID: <20241013184733.1423747-3-richard.henderson@linaro.org> --- target/i386/tcg/sysemu/excp_helper.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 8cb0d80177..8b046ee4be 100644 --- a/target/i386/tcg/sysemu/excp_helper.c +++ b/target/i386/tcg/sysemu/excp_helper.c @@ -62,12 +62,11 @@ typedef struct PTETranslate { static bool ptw_translate(PTETranslate *inout, hwaddr addr, uint64_t ra) { - CPUTLBEntryFull *full; int flags; inout->gaddr = addr; - flags = probe_access_full(inout->env, addr, 0, MMU_DATA_STORE, - inout->ptw_idx, true, &inout->haddr, &full, ra); + flags = probe_access_full_mmu(inout->env, addr, 0, MMU_DATA_STORE, + inout->ptw_idx, &inout->haddr, NULL); if (unlikely(flags & TLB_INVALID_MASK)) { TranslateFault *err = inout->err; @@ -440,9 +439,8 @@ do_check_protect_pse36: CPUTLBEntryFull *full; int flags, nested_page_size; - flags = probe_access_full(env, paddr, 0, access_type, - MMU_NESTED_IDX, true, - &pte_trans.haddr, &full, 0); + flags = probe_access_full_mmu(env, paddr, 0, access_type, + MMU_NESTED_IDX, &pte_trans.haddr, &full); if (unlikely(flags & TLB_INVALID_MASK)) { *err = (TranslateFault){ .error_code = env->error_code,