From nobody Sat May 18 10:30:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 148907326682849.96247793095665; Thu, 9 Mar 2017 07:27:46 -0800 (PST) Received: from localhost ([::1]:34712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clzyh-0008Uh-5G for importer@patchew.org; Thu, 09 Mar 2017 10:27:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clzyE-0008Ua-VH for qemu-devel@nongnu.org; Thu, 09 Mar 2017 10:27:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clzyB-0002Bw-P0 for qemu-devel@nongnu.org; Thu, 09 Mar 2017 10:27:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36276) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1clzyB-0002Bs-GE for qemu-devel@nongnu.org; Thu, 09 Mar 2017 10:27:11 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 68D0A80F93; Thu, 9 Mar 2017 15:27:11 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-164.ams2.redhat.com [10.36.117.164]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v29FR9qG031374; Thu, 9 Mar 2017 10:27:10 -0500 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, pbonzini@redhat.com, peter.maydell@linaro.org Date: Thu, 9 Mar 2017 15:27:08 +0000 Message-Id: <20170309152708.30635-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 09 Mar 2017 15:27:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] memory_region: Fix name comments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" The 'name' parameter to memory_region_init_* had been marked as debug only, however vmstate_region_ram uses it as a parameter to qemu_ram_set_idstr to set RAMBlock names and these form part of the migration stream. Signed-off-by: Dr. David Alan Gilbert --- v2 Reword to state uniqueness Only change RAM related calls Diff with -U7 so you can see the function names with each comment include/exec/memory.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 6911023..6a3d7d5 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -303,15 +303,16 @@ struct MemoryRegionSection { * memory_region_init: Initialize a memory region * * The region typically acts as a container for other memory regions. Use * memory_region_add_subregion() to add subregions. * * @mr: the #MemoryRegion to be initialized * @owner: the object that tracks the region's reference count - * @name: used for debugging; not visible to the user or ABI + * @name: Region name, becomes part of RAMBlock name used in migration str= eam + * must be unique within any device * @size: size of the region; any subregions beyond this size will be clip= ped */ void memory_region_init(MemoryRegion *mr, struct Object *owner, const char *name, uint64_t size); =20 @@ -367,15 +368,16 @@ void memory_region_init_io(MemoryRegion *mr, =20 /** * memory_region_init_ram: Initialize RAM memory region. Accesses into t= he * region will modify memory directly. * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration str= eam + * must be unique within any device * @size: size of the region. * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_ram(MemoryRegion *mr, struct Object *owner, const char *name, uint64_t size, @@ -386,15 +388,16 @@ void memory_region_init_ram(MemoryRegion *mr, * RAM. Accesses into the region will * modify memory directly. Only an in= itial * portion of this RAM is actually use= d. * The used size can change across reb= oots. * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration str= eam + * must be unique within any device * @size: used size of the region. * @max_size: max size of the region. * @resized: callback to notify owner about used size change. * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_resizeable_ram(MemoryRegion *mr, struct Object *owner, @@ -408,15 +411,16 @@ void memory_region_init_resizeable_ram(MemoryRegion *= mr, #ifdef __linux__ /** * memory_region_init_ram_from_file: Initialize RAM memory region with a * mmap-ed backend. * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration str= eam + * must be unique within any device * @size: size of the region. * @share: %true if memory must be mmaped with the MAP_SHARED flag * @path: the path in which to allocate the RAM. * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_ram_from_file(MemoryRegion *mr, struct Object *owner, @@ -430,15 +434,16 @@ void memory_region_init_ram_from_file(MemoryRegion *m= r, /** * memory_region_init_ram_ptr: Initialize RAM memory region from a * user-provided pointer. Accesses into the * region will modify memory directly. * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration str= eam + * must be unique within any device * @size: size of the region. * @ptr: memory to be mapped; must contain at least @size bytes. */ void memory_region_init_ram_ptr(MemoryRegion *mr, struct Object *owner, const char *name, uint64_t size, @@ -492,15 +497,16 @@ void memory_region_init_alias(MemoryRegion *mr, * * This has the same effect as calling memory_region_init_ram() * and then marking the resulting region read-only with * memory_region_set_readonly(). * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration str= eam + * must be unique within any device * @size: size of the region. * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_rom(MemoryRegion *mr, struct Object *owner, const char *name, uint64_t size, @@ -509,15 +515,16 @@ void memory_region_init_rom(MemoryRegion *mr, /** * memory_region_init_rom_device: Initialize a ROM memory region. Writes= are * handled via callbacks. * * @mr: the #MemoryRegion to be initialized. * @owner: the object that tracks the region's reference count * @ops: callbacks for write access handling (must not be NULL). - * @name: the name of the region. + * @name: Region name, becomes part of RAMBlock name used in migration str= eam + * must be unique within any device * @size: size of the region. * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_rom_device(MemoryRegion *mr, struct Object *owner, const MemoryRegionOps *ops, void *opaque, --=20 2.9.3