From nobody Sun Dec 14 05:52:14 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1754569012; cv=none; d=zohomail.com; s=zohoarc; b=fQioeRXnqFWTgf/C3ss93RWYp6KIf55RELj0xWt3XXZKEh/iytcxKt2yfTZLKSHMJNd8zXMjYCBH1uMrK2RZEN6MhkxhYJIvQSJQFn4jROttlj1eFZoWoJ98nDDGdhSEJfmCB8FCmPXcaxq6uxnasH/RmrQZyZ5PXkhDOXLAtNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1754569012; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=27XpbSWF3D+5022emDhSQreOzsZapL9jvznaVyFKvS8=; b=P1dVBLdn5za7a+BA0c0Mr1uufW6diyKdaZcPl183z7LgTfD6hErqpBQhLYVElxTgZa4xiqNBDGEdSevffedtrCgIlhoCvkl0MGCaryQLykuK46f+Sj/eshiR+e74IdtJlv0ihFsTkroLzFYcRvpWYRqnmI0blRYtTC1hrLZyFjc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1754569012562475.51685149656316; Thu, 7 Aug 2025 05:16:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ujzSR-0004J3-Fg; Thu, 07 Aug 2025 08:10:55 -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 1ujzRw-000248-OQ; Thu, 07 Aug 2025 08:10:24 -0400 Received: from mgamail.intel.com ([192.198.163.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujzRu-0005Bt-Gc; Thu, 07 Aug 2025 08:10:24 -0400 Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2025 05:10:01 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by orviesa009.jf.intel.com with ESMTP; 07 Aug 2025 05:09:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1754568622; x=1786104622; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jlCpSuQ5mesdc7DN+lFSCnjeGwm6BIOjo3EmPFLXWfU=; b=hA61kyzr5o5BNZF3jq6WJW6xX/W8b2K5fnQ6Zeg3v3ablYb4hXOfcsUS AoReDmvfDPcJO/mElCME1lyh+fw2SciLauo8MZe1hQdypXXwY1W15r3LW QQPfTKZgg4SCTqfrVGiTp++xQ/cfP53XNAbrfh/VjRzyHrMtasXZ4iLSV fENATiYpbDYAsDPHZmz+3Y26FpNdhFnQ8sGzj2dPjkXVo5EOlPXcUrsMb V7wZrdgxgyAI/54RmxYjgX7lWa8EjE/0a02dI10adyx8CHtFx3pEo7YpR ya7+/HmmsX1S6GgMYtciJeuk6OHJrfdO3FG8+qllm8te7aLNvJ4QEEYy1 g==; X-CSE-ConnectionGUID: ZaMb5jFKShK/twOHL8LGUQ== X-CSE-MsgGUID: VLv08JK5QQaJJx+6ZswO5w== X-IronPort-AV: E=McAfee;i="6800,10657,11514"; a="57036840" X-IronPort-AV: E=Sophos;i="6.17,271,1747724400"; d="scan'208";a="57036840" X-CSE-ConnectionGUID: Vs+/5aMoRbmJvyuCzG9nRA== X-CSE-MsgGUID: o3hYrEH1SBCKzHJQIf7SGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,271,1747724400"; d="scan'208";a="164701151" From: Zhao Liu To: Paolo Bonzini , Peter Xu , David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Junjie Mao Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org, Dapeng Mi , Chuanxiao Dong , Zhao Liu Subject: [RFC 18/26] memory: Rename flatview_access_allowed() to memory_region_access_allowed() Date: Thu, 7 Aug 2025 20:30:19 +0800 Message-Id: <20250807123027.2910950-19-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250807123027.2910950-1-zhao1.liu@intel.com> References: <20250807123027.2910950-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.198.163.15; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1754569014517116600 Content-Type: text/plain; charset="utf-8" flatview_access_allowed() accepts `MemoryRegion *mr` as an argument, so it's based on MemoryRegion and should be named as memory_region_access_allowed(). Signed-off-by: Zhao Liu Reviewed-by: Manos Pitsidianakis --- system/physmem.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index d2106d0ffa87..8aaaab4d3a74 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2921,7 +2921,7 @@ bool prepare_mmio_access(MemoryRegion *mr) } =20 /** - * flatview_access_allowed + * memory_region_access_allowed * @mr: #MemoryRegion to be accessed * @attrs: memory transaction attributes * @addr: address within that memory region @@ -2931,8 +2931,8 @@ bool prepare_mmio_access(MemoryRegion *mr) * * Returns: true if transaction is allowed, false if denied. */ -static bool flatview_access_allowed(MemoryRegion *mr, MemTxAttrs attrs, - hwaddr addr, hwaddr len) +static bool memory_region_access_allowed(MemoryRegion *mr, MemTxAttrs attr= s, + hwaddr addr, hwaddr len) { if (likely(!attrs.memory)) { return true; @@ -2952,7 +2952,7 @@ static MemTxResult flatview_write_continue_step(MemTx= Attrs attrs, hwaddr len, hwaddr mr_addr, hwaddr *l, MemoryRegion *m= r) { - if (!flatview_access_allowed(mr, attrs, mr_addr, *l)) { + if (!memory_region_access_allowed(mr, attrs, mr_addr, *l)) { return MEMTX_ACCESS_ERROR; } =20 @@ -3036,7 +3036,7 @@ static MemTxResult flatview_write(FlatView *fv, hwadd= r addr, MemTxAttrs attrs, =20 l =3D len; mr =3D flatview_translate(fv, addr, &mr_addr, &l, true, attrs); - if (!flatview_access_allowed(mr, attrs, addr, len)) { + if (!memory_region_access_allowed(mr, attrs, addr, len)) { return MEMTX_ACCESS_ERROR; } return flatview_write_continue(fv, addr, attrs, buf, len, @@ -3048,7 +3048,7 @@ static MemTxResult flatview_read_continue_step(MemTxA= ttrs attrs, uint8_t *buf, hwaddr *l, MemoryRegion *mr) { - if (!flatview_access_allowed(mr, attrs, mr_addr, *l)) { + if (!memory_region_access_allowed(mr, attrs, mr_addr, *l)) { return MEMTX_ACCESS_ERROR; } =20 @@ -3127,7 +3127,7 @@ static MemTxResult flatview_read(FlatView *fv, hwaddr= addr, =20 l =3D len; mr =3D flatview_translate(fv, addr, &mr_addr, &l, false, attrs); - if (!flatview_access_allowed(mr, attrs, addr, len)) { + if (!memory_region_access_allowed(mr, attrs, addr, len)) { return MEMTX_ACCESS_ERROR; } return flatview_read_continue(fv, addr, attrs, buf, len, --=20 2.34.1