From patchwork Wed Jun 12 13:25:30 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: 803472 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp788412wrb; Wed, 12 Jun 2024 06:26:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW4X/AS1WYeo55mbEqsdthY77rlinQf9FpiK8GXHiQBD5Yyc99SoNdzB2Ixh9wKwXKalUQ01oXpBu1zBfa5rDvM X-Google-Smtp-Source: AGHT+IHsqhYGzstirQaxQNnfj1ORXJTACk74/8SqV0CQWZh9Y90U1bcWcmo+3fLB+euTkYkX7Nyt X-Received: by 2002:a05:600c:4fc5:b0:421:81b6:b9d4 with SMTP id 5b1f17b1804b1-422863a8b26mr13517695e9.7.1718198787097; Wed, 12 Jun 2024 06:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718198787; cv=none; d=google.com; s=arc-20160816; b=yQ27rlblGNQo+SfMcLUwhuwXXqOaag5Mvyjmk3gzU7WQXkOjxOLmmsFM2YFV+38su0 IdgeobsyJZHPTsKbL9Cyn6cnQlh8dzkXZAWJTIn2AIUTYtJIzncc9RzYHoMGZnCWpXxA 461kDbY5x3HXrWu4+5dadJRb+kgOLfWVPMhsw4daWUOUIEbO51uNKOHwqTWpjdBBrKXf dGx6sK8wIlyKicTJ8D8htq+9MFQeVR2silrBt0AyyrvBScLPJsBoEk29pNHxcdJTIEFO 6xmZ3DmAqBBnkz+SZVhArlMIXbj31UA41cATxrwzeA511Apj5qIX+M8TfcTGln94nSh9 jqkA== 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=N/V34NJr+rWIWxDjERHJ009gIapl2SiDYy6zj1sgQb8=; fh=4INC/jqaTEcPrU1WI6YvMwfNxFbPxxEt8cBO3UjtE/E=; b=c8ooO3u3ebd3rxOJbz8YdZCqjPoAgsllG5YZ6sRbZdB+in5htirDfcDLtgN3Hf5CvQ 5wk/zOMWzxpqnwQcNJc8vidHyIL+q1bB+4ffhRjydin3q9MtIoAtvvQWRzQkcbb7brQu RCOSIQ+5DPqQVBGLl9xq/yGt3PsrpkBbGLDxBbaunp0iS64EvClvnm3viklNDxdU3q4q Io6+KI6CTWadDbk83Q5p8BJjTegbYGnsvrkDYzEMvAWsPT5eLQzCSib/r8QdU2kE/qvt e50cb3frAY899hactRIupoF4zQNQ7Sa/YesaBmNRu9MVZRls/GqftaC8grNNBI83TchX S6CQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WI02i4AU; 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 5b1f17b1804b1-42286fe54casi9707295e9.47.2024.06.12.06.26.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 06:26:27 -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=WI02i4AU; 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 1sHNz7-0003ZI-IK; Wed, 12 Jun 2024 09:25:53 -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 1sHNz6-0003Z5-9A for qemu-devel@nongnu.org; Wed, 12 Jun 2024 09:25:52 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHNz4-0004ym-N4 for qemu-devel@nongnu.org; Wed, 12 Jun 2024 09:25:52 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-57c8353d8d0so4419097a12.1 for ; Wed, 12 Jun 2024 06:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718198749; x=1718803549; 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=N/V34NJr+rWIWxDjERHJ009gIapl2SiDYy6zj1sgQb8=; b=WI02i4AU9dNJCmZrGXPUOBgOUyZD5xV2NNhS45BF94K6tGxO55FAgyTLe7vihbSZwa IVpWE3P3pvYYb1zDwbk9TF9imjR5GBjH5Ud+TVvD/tBNfKqyX6lHVlsn7pkCjeJDaMfG PePuyN5TqPBBOPiK7fkRcC7GTcM2KOps8eni2GY9gT+mtOX/gsvEffe1HxdkICeWjC0i xftNrYn2/zZPks3RlZVBuLpkJm39AKbdfVqaUjFuEuCMLS7r4eJ2koYjef9XpbNhe/wg aBwJgNE3manV1bwu50kBFIlwr6uycbOwrBWRtLsEzzlyvr5F27lMMV6iCsHkkKH0adny uBwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718198749; x=1718803549; 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=N/V34NJr+rWIWxDjERHJ009gIapl2SiDYy6zj1sgQb8=; b=PsKqUru2NTwniZPUxd31ULUrTczezR77HNGa+OuXRU43gpsoMe9C6CJJNW0OIOGOBs zWOQE8DIiadKw6YMc3PE3R8+fDTbszjfovHPAkFV7GID0Zm5jXbB7zgZbq5DzBFO9fXl LwB74yrg3HthzeucnZsENYoJ9XlsYY7oO8sxKa75w03RqI19H3b15ndKb+9G+AkABTMC ZfSyiHcTJPMfUZq550t+1tag2An6Ca1RnmEpUV1OaaFoU2gNv4URK3ESd5kGQ0Tol6b6 ommA+Th7A52fABvcQmxgB3Vp/K3itEyCHx0uitxtJVcBS8Gp9fdqXiK6E+kF+8B0HWRq NfXg== X-Gm-Message-State: AOJu0Yyiq3WHGtCX1sf4H6YiWloiTmtdIAdqZf5K9ZQrrN/3fkldhUac Oy5hch6XLka/zqvq3AJX/6MfVFaQcjH1asM1tRsLrcO3wk4IJlZsB+XMwDwiXfCR4D0Pow+lDWw V X-Received: by 2002:a50:a6db:0:b0:57a:2f68:fe7b with SMTP id 4fb4d7f45d1cf-57caaad8c50mr1375473a12.31.1718198748924; Wed, 12 Jun 2024 06:25:48 -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-57c741b0581sm7036325a12.57.2024.06.12.06.25.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 12 Jun 2024 06:25:48 -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 2/3] memory: Constify IOMMUTLBEvent in memory_region_notify_iommu() Date: Wed, 12 Jun 2024 15:25:30 +0200 Message-ID: <20240612132532.85928-3-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::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 2bf5e23b6a..2d7c278b9f 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1837,7 +1837,7 @@ uint64_t memory_region_iommu_get_min_page_size(IOMMUMemoryRegion *iommu_mr); */ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr, int iommu_idx, - IOMMUTLBEvent event); + const IOMMUTLBEvent event); /** * memory_region_notify_iommu_one: notify a change in an IOMMU translation diff --git a/system/memory.c b/system/memory.c index f3a37c97c1..47c600df63 100644 --- a/system/memory.c +++ b/system/memory.c @@ -2052,7 +2052,7 @@ void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier) void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr, int iommu_idx, - IOMMUTLBEvent event) + const IOMMUTLBEvent event) { IOMMUNotifier *iommu_notifier;