From patchwork Tue Jun 18 16:00:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805261 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275770wrx; Tue, 18 Jun 2024 09:10:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWy5lwNDiLL42zyfkfdyt/XJk3N47J8O64cxumC2k3uQgrEAxUsnU87tPCQcDVWcx/ZirB6rbE1OffhMXt/hkDu X-Google-Smtp-Source: AGHT+IHVNNs9B4x8LMk5Ns7PHB5Oi2YcyJ3hJt3WZFDBhCOTBXVvaX4h8tS8+cjOB6s79CaBZ3Bl X-Received: by 2002:a05:6808:1708:b0:3d2:1a43:d1b with SMTP id 5614622812f47-3d51b9b57a1mr254094b6e.14.1718727059172; Tue, 18 Jun 2024 09:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727059; cv=none; d=google.com; s=arc-20160816; b=gzYpuCJYlhbqQXhWlC2RuiCmWdpJvnHwjzkeUToZ5//bxPTmPQx0N3jaHuesd/3+Sc vTrDvF0ohheBgdmnFVAamLxiuILLu1RU7Z2vkTPmk6liU2mbDJG80hJ3QtbYghv7p6Hh PCyZN0IBopepfiMJpq9FhvAoMnxB6QNAhaVTfTACwneLvNxZ8RNkBMvPiNUiSa/La3gM lUauckIGfZ6aeQYta5yFauR796D4ItiW0j+rbYyKDdKIqLfGzFPHM9toe2JO6MDwNHGD 6gWMC5n9I/EXmmzBnwdFbJUFgN7CI1iC7agPMkzWpuviusfRfoRNF6zkK6UuAlogCYHD 6Scw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=HtmX+S2yK/Vz8/u+qz4/0UFgu+q37Y7br+Oj/kr8kUw=; fh=vbGUDJIv0td6conUnGz4oHw5hGzDnkUZulGjJDPiw2E=; b=y+QpTn5o3Pg62J/4UbcLTkGcL2MiJGMDiaKZdq2GcBevzzyGjKa7M5jdFKlbh5UacI dn7Kso+RXK5ZZuyUZX02as9FvuIWYJUPV6i1J9sUh3F+eGZjJ+EthHUifqu1zd2b9nwL WBOOSap7Z0+8YexktoUEz6qRPdmwwTEnMx0Uxjd1cR/8DC+kvICxGkvRgrxjsnlK19ur 7YVFUUIJByF4qMaGrag3Wl+mW/TysjKt29GNKZeJ0KgCmi/H9Ad+7I3AHv9JNGwC9Kbf fbjA+yv698uSPyV7yON2AQCMacqVU3q4UnYJXxReo+9EQkf70dE7aloipdbP4eXRmw6m YcTg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gRVUg5s5; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-80d7872a569si1775251241.95.2024.06.18.09.10.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:10:59 -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=gRVUg5s5; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJbLh-0007At-Jk; Tue, 18 Jun 2024 12:06:22 -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 1sJbLd-0006v5-LN for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:17 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLa-0007kX-Q5 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:17 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2ec0f3b9cfeso51060771fa.0 for ; Tue, 18 Jun 2024 09:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726773; x=1719331573; 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=HtmX+S2yK/Vz8/u+qz4/0UFgu+q37Y7br+Oj/kr8kUw=; b=gRVUg5s53KnJZxK1be+9I6jBVj5BXXJT2lzVkc/g4F34OB4u7ltoblPZ8T3QydS8Ks rGc520bYIv7QegJPI4fjFZm4USKp+fAo/BFmcVRsi13XX3uwHVJFvpG7ZBZzIoFp1byp Sjfzd40iP4onk9I0qymIgbEc6sv4XrzKYfl/navj05D8nEdp8GKcuT06IDKc6+5lw6pU NSa6FZkoqwbnCVXzdiOk/SrTKTdfyn71BzQ3ACLWRAxcKy96eEGIP0gs4Q4l4TVu5jOY QRmTBz0gb++qwqvA/fcqSRYYKW3nFuEbsVeqpfKjyu3ySpi49XTpFEizHfo/g1vzFH8i m8Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726773; x=1719331573; 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=HtmX+S2yK/Vz8/u+qz4/0UFgu+q37Y7br+Oj/kr8kUw=; b=USpCl9k0lcGiD/+lur6KHHVGrfFgFbPDPI5tXsWEaUjk9K169OOyW+i/tbGj4QQ1jX P+EMq9UuF46SsTv6wUYJMgXZT1blpqtLNhCi4JrNQ/VRp8inMzn8zl7UeUHP+1xTDVft LUqR3iq1YUsZXwI8DxjDOPr0YeUEuKbhfjfCkK/KM47ljl3nizeumiad6twRqJ127PzH PqM3sGmgYixDnW7Bux3ghyAgM3wEFoE4+oz1fuS6MztikhS2OQtFC+todJ5/01bspfvx MYWQ82OG5iWXAUPPoNSW5auKSXktEDlBkGOUBBaOdZ5p9FUyinR8H9Oc0eQ6MHtrUwy8 Xscg== X-Gm-Message-State: AOJu0Yya14Korn/FMIiY4xDb3rc8cywIA34828ds47jtCAwZExxSvPZJ mPmwHQUh9fCJyXKtWXAOcs2y8xM3WdR68DNutHGkcOplRW6LWhivMZUBUX1maIvqT4AZdN5dSop P X-Received: by 2002:a2e:9694:0:b0:2ea:91cf:a5f0 with SMTP id 38308e7fff4ca-2ec3ceb6a0cmr1879591fa.19.1718726772788; Tue, 18 Jun 2024 09:06:12 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f6320bd8sm191966715e9.32.2024.06.18.09.06.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Xu Subject: [PULL 57/76] memory: Constify IOMMUTLBEvent in memory_region_notify_iommu_one() Date: Tue, 18 Jun 2024 18:00:19 +0200 Message-ID: <20240618160039.36108-58-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=philmd@linaro.org; helo=mail-lj1-x230.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @event access is read-only. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Message-Id: <20240612132532.85928-2-philmd@linaro.org> --- include/exec/memory.h | 2 +- system/memory.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 1be58f694c..2bf5e23b6a 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1852,7 +1852,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr, * range. */ void memory_region_notify_iommu_one(IOMMUNotifier *notifier, - IOMMUTLBEvent *event); + const IOMMUTLBEvent *event); /** * memory_region_unmap_iommu_notifier_range: notify a unmap for an IOMMU diff --git a/system/memory.c b/system/memory.c index 74cd73ebc7..f3a37c97c1 100644 --- a/system/memory.c +++ b/system/memory.c @@ -2006,9 +2006,9 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr, } void memory_region_notify_iommu_one(IOMMUNotifier *notifier, - IOMMUTLBEvent *event) + const IOMMUTLBEvent *event) { - IOMMUTLBEntry *entry = &event->entry; + const IOMMUTLBEntry *entry = &event->entry; hwaddr entry_end = entry->iova + entry->addr_mask; IOMMUTLBEntry tmp = *entry;