From patchwork Sat Nov 9 10:14:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842077 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2082368wru; Sat, 9 Nov 2024 02:19:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV1c+7uwVMm6whEmbo9CRNyaVgjzZ+R2+uRvDti+rRsKwRpzXll8IMtaIUSuIJDcv2PtjhDVA==@linaro.org X-Google-Smtp-Source: AGHT+IGU9lVU6tuvTmPNo260gWuB5E3680iGL9c2k7UWSOcE6xaTOuyr1R0NxuezagE3xRdCy2Yu X-Received: by 2002:ac8:5794:0:b0:460:8f80:9091 with SMTP id d75a77b69052e-4630933aad6mr93041031cf.15.1731147597193; Sat, 09 Nov 2024 02:19:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147597; cv=none; d=google.com; s=arc-20240605; b=a1v7KJmJfUsdDAJhw8ZPHw9r8w++Z6SO/Lzyki+Kq06A4taRRVXPIw0asfLKOXJ6xJ 7XNbgVWZDQuxO55hpMriKAtbekWAQBOK9pLaxD+Db33kDGEwoolCLN0fre+mV3s9JlxT 9v64fZJbuAYA0gY5LDpVqFT0PcYQ7/Gix8aMPrJauMT3P0UzuJL6lDAvwvq1VWBdGFbu cCxDLTd8htAh4MkbJvSjCPyP/Ghi1CElJ7YlLexiq7VSm0PqJGdHV9jzWsX1nCZ9G11K fxG0MbIiWSk4388hKOsrHlqNI/3WhzR9iZuYI8OwgnGJ2kiu+pmA2klUDh0chz7Fh5lP 4OGA== 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; bh=h9aVlYLCKD1NhC9xGKdu2g3w7SBQlop+lT5iyoi0Aco=; fh=jnOGvdacaTpco5Be5Zrr9OXpoek4qPe+c7L5Gapq/Ic=; b=Hxq2kunWCz2P83cg5U1Oxv+PE1eBE1cq3qRF1QzODMPC5IgZVaZ5U05JD0yXNs0mRu QxNy2faGCLmzx7gGX1hLbY665JS4z9RTKj4GTApRWeR57ZyYWefj+P1qfdr2A/NMsDq8 QWsoFKVuLp+7zUfSNnB0B5om1/G9yyLxibaMrhqHf1z0vaUEjl/fkgQt2vmgmyMSwQDi Pe5+VVDR5Mbl6QrVTtsdRABzuTxyj1y8zftPfrIYv9cpTEHLNNOhddfGfUZ7o0L/oIbI GGqn9HRZWQ8uiz10cAYPz8WrxnH8Dj1jr4GTM4QHrC3EfZqC5EvwF+xEeqdPH/cTMpVL 7h+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff61b171si59172471cf.429.2024.11.09.02.19.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:19:57 -0800 (PST) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iYd-0002FM-W6; Sat, 09 Nov 2024 05:19:08 -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 1t9iW6-00060h-SD; Sat, 09 Nov 2024 05:16:34 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iW5-0007yu-AP; Sat, 09 Nov 2024 05:16:30 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 88111A13FD; Sat, 9 Nov 2024 13:13:50 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 358B6167EE8; Sat, 9 Nov 2024 13:14:45 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Michael Tokarev Subject: [Stable-8.2.8 24/49] target/i386: Use probe_access_full_mmu in ptw_translate Date: Sat, 9 Nov 2024 13:14:15 +0300 Message-Id: <20241109101443.312701-24-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 From: Richard Henderson 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> (cherry picked from commit 115ade42d50144c15b74368d32dc734ea277d853) Signed-off-by: Michael Tokarev diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 319b23762c..31c5032ace 100644 --- a/target/i386/tcg/sysemu/excp_helper.c +++ b/target/i386/tcg/sysemu/excp_helper.c @@ -61,12 +61,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; @@ -439,9 +438,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,