From patchwork Wed Jun 12 13:25:29 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: 803470 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp788238wrb; Wed, 12 Jun 2024 06:26:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUsMs/UfL7f3ZDMLWLGQlIvF/ZcSxLqK2XW/dNnVzScCPftNqlyYSJR2hVuacBc7UQg6KUnj7pJdcmRKL0OfcjP X-Google-Smtp-Source: AGHT+IFwq3Kpk+Tl2d1LK+2VfEIBOQvJ5RCugVmwVMLPe+CwoHuYMa+xeLsJ8dKKXxaVtQxrIlqM X-Received: by 2002:adf:ee92:0:b0:35f:1d7a:c420 with SMTP id ffacd0b85a97d-35fdf770cccmr1430426f8f.10.1718198765871; Wed, 12 Jun 2024 06:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718198765; cv=none; d=google.com; s=arc-20160816; b=UB26iWNU0sMtw7YcyU/I75MKoFfeghrbMJfLHqYDMrdNJ43gU4QVR6sXrHv5OYy5ih B9LFexTUcuxeD+P8Urya+WOn9OwwnX+6bCJWxt7JfZy94ePoKHK99tL4LDB33vn+jn6W 30s9zrWLseFr93sMWbstffCFTOMDuYpcVSNQdwtcmDdMgrZ59OXeVGRaAQXb4pk6+Hpo o5XnswwceL3SL124IJrTeL0ux8paRzxr9pSLbGO/B7/VcA1SQD4X236nN0kTm7fUscTB EOp2tyyu4wR5COXtgU142+/pBXKnkHLFN6HXAtadkdoTmlV37M8triOkCEYJ21flQixY uGGg== 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=JM/gzg6Fck9TlOnDm2ZflmX6hvT5QMqxJafFp7HjnSg=; fh=4INC/jqaTEcPrU1WI6YvMwfNxFbPxxEt8cBO3UjtE/E=; b=vZA3BQ0jWLxTcwBCtmDtlThuvtRJyJUlRnKG6vU3pnNFdTKKV8gEbOhqoygx16Z8dn mSbQ6tHljECFQHl9bA5xMq6Oehg7th4O+PUDNIEah9vbjfoYqmOWhdbjpXLhOMVs1F/n Xztr8XC/aFAu2luWQfUbSZsY+OJGa67bFd+t+2w9jzRFThKxkOo9lvFIuMWe+ySqMdQb pc+smr15pk5YyEJzaJgpS89xYBHp3oGy4bl8zIcH/HSY1hDPLj834ScDgaAP/+0kJM/K PhCBPkkEiLxZqUKgBSjV2P/qFXxmZc6V4oeh9jKOi8s9cyS2zs0yKQOL/h6wSx3nVkD9 brtQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aqC9typc; 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 ffacd0b85a97d-35f1917d22dsi5803714f8f.958.2024.06.12.06.26.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 06:26:05 -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=aqC9typc; 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 1sHNz1-0003YF-T1; Wed, 12 Jun 2024 09:25:47 -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 1sHNz0-0003Xa-GO for qemu-devel@nongnu.org; Wed, 12 Jun 2024 09:25:46 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450: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 1sHNyy-0004xK-Rs for qemu-devel@nongnu.org; Wed, 12 Jun 2024 09:25:46 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-579fa270e53so3704827a12.3 for ; Wed, 12 Jun 2024 06:25:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718198743; x=1718803543; 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=JM/gzg6Fck9TlOnDm2ZflmX6hvT5QMqxJafFp7HjnSg=; b=aqC9typcPzjbBDUqGAhWTBc0rZSCGq2yG7J0RWpWK9Ju8QPos3LJ6WWHLxaOLp9eFb ZACJlHLps03K/sJ5po8kyqpYUzGjXE+CP5VAUmfVwSeuYnNHcxAlm9hfQtlGpPizcVTD EUrzno7XZJFeJ0tffIp5CQ3ChkLLCrDatVRdy8tmYwuxfcyTEYtP1eNsV4eL56Ap0Dnw 5SfG9lqccC+Tes4GsOjVTlIZjpQFgvzTolZjs038SQqQ9eG4ROdo9MpGXiFpNGFZtBnK FBNSbQgvEvxAauMpigd6Cp7AvlscWcxXvFQe7QvKvlp2tba4b987nxxjDH8axqTGoCnw bfOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718198743; x=1718803543; 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=JM/gzg6Fck9TlOnDm2ZflmX6hvT5QMqxJafFp7HjnSg=; b=lmE/Q/75hZv3Csuy+/Pmyo3F5r9Ui+dUjGHgDOUssJ+F7iZLPPPFpwPVhZ4lKMHQl7 rc17udksndB8wdcJ/qGJ6L2dWa7r4+nTp+3RDfbtWcBOBqcxs+xx9oto4aK6NJGc0J6y 2QMCfK2ObdV/tmqBG0Guaf4COc7f1c4Uc1vElE+AmcTYlF2duJ4F3aqmA3j8Byl4wEiZ L5tiZ9edyDDyXLAkqmsHh/YaK79zzpWen+EUXLiW6kivDS2y0ucuViSiohmvPKmtTUsI dD4QfDTP+OIAXdvxKjszjDuztstzSJ5YnmdU3WW3e/o68t7sChZjTTCOhGJZnkXwSoUv s1rQ== X-Gm-Message-State: AOJu0YwCHwwxXJvU/IpI31pVKLz7IZVrcYIqtBSAN/SPxsQfCe/kwlP1 nxEpMzuj44AAUIgUtGPu7w9ZwAe/WHIkHgPbaHJ/8YEggUBkKPVPNCOr4BW1gkYSzjT2GjmvVGd G X-Received: by 2002:a50:951e:0:b0:57c:6004:4375 with SMTP id 4fb4d7f45d1cf-57ca97513b7mr1433782a12.15.1718198742823; Wed, 12 Jun 2024 06:25:42 -0700 (PDT) Received: from m1x-phil.lan (ram94-h02-176-184-0-172.dsl.sta.abo.bbox.fr. [176.184.0.172]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57c6c95bb33sm7851525a12.8.2024.06.12.06.25.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 12 Jun 2024 06:25:42 -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 , Jason Wang , David Hildenbrand , Paolo Bonzini , "Michael S. Tsirkin" , Richard Henderson Subject: [PATCH 1/3] memory: Constify IOMMUTLBEvent in memory_region_notify_iommu_one() Date: Wed, 12 Jun 2024 15:25:29 +0200 Message-ID: <20240612132532.85928-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240612132532.85928-1-philmd@linaro.org> References: <20240612132532.85928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-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, 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é --- 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;