From nobody Sat Apr 27 22:10:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1660644931; cv=none; d=zohomail.com; s=zohoarc; b=ZM6P7mLr7tad1qliBmnIk7Sxj3X0d9xxQX4z59MNR/vEAI/MoNbGayWagnFT9CGLQ5vkVx8nhaE0bY+LLLPWXdQBokYFL6DrpjX5sQ4l7gphO16Ru2SQpPWbYVX0oUrEZqLEEBifx3KlK38mxcUmuIm9kEdKurIGlmX68irHwC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660644931; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cxOtHMeWpRKVHAmqRlfILA8ZLjrIx8Hld0hXMLuWU4c=; b=hKmADtTXlAc8BhxJe/XFvQ6hsz+SX9XJ9WlTIcCzxbEvqDfNpqfGYybNb+5Zo3yroP2W6g4u2BSsQQWsB8QICYY2tKiBiFHFmp37u3NOBIqQtyfcUQl5WdZ12UP0gHPKnWxtNkEbLSgCPPhpivLac05McmOi17O0YgzXvkozZQ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 166064493198122.237135042208138; Tue, 16 Aug 2022 03:15:31 -0700 (PDT) Received: from localhost ([::1]:55898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNtbe-0008MR-E4 for importer@patchew.org; Tue, 16 Aug 2022 06:15:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNtZF-0005Zl-3L for qemu-devel@nongnu.org; Tue, 16 Aug 2022 06:13:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNtZD-0004Jz-Dr for qemu-devel@nongnu.org; Tue, 16 Aug 2022 06:13:00 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-364-a2SB4FsjMU2i5tzHHrcd0g-1; Tue, 16 Aug 2022 06:12:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6387638164C7; Tue, 16 Aug 2022 10:12:56 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1EEE540D2827; Tue, 16 Aug 2022 10:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660644778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxOtHMeWpRKVHAmqRlfILA8ZLjrIx8Hld0hXMLuWU4c=; b=EuPmR7FILzQLBuM2i77+bF9GFYllwFocrFyN7b4vWKXdRI/MwyyqB1YTFAVhZ3UjleUr9B EewXTjNEN6LawO/U6n/2rsaQiViiKH4xFY7sw0444jKIhslYoFQh9Uayo/u7uvOU0242xK Ii5Cm9PedKDKOMnkAxX1Hq2+RtOoUn8= X-MC-Unique: a2SB4FsjMU2i5tzHHrcd0g-1 From: Emanuele Giuseppe Esposito To: qemu-devel@nongnu.org Cc: Paolo Bonzini , "Michael S. Tsirkin" , Cornelia Huck , Peter Xu , David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Maxim Levitsky , kvm@vger.kernel.org, Emanuele Giuseppe Esposito Subject: [RFC PATCH 1/2] softmmu/memory: add missing begin/commit callback calls Date: Tue, 16 Aug 2022 06:12:49 -0400 Message-Id: <20220816101250.1715523-2-eesposit@redhat.com> In-Reply-To: <20220816101250.1715523-1-eesposit@redhat.com> References: <20220816101250.1715523-1-eesposit@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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=170.10.133.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1660644933381100001 Content-Type: text/plain; charset="utf-8" kvm listeners now need ->commit callback in order to actually send the ioctl to the hypervisor. Therefore, add missing callers around address_space_set_flatview(), which in turn calls address_space_update_topology_pass() which calls ->region_* and ->log_* callbacks. Using MEMORY_LISTENER_CALL_GLOBAL is a little bit an overkill, but it is harmless, considering that other listeners that are not invoked in address_space_update_topology_pass() won't do anything, since they won't have anything to commit. Signed-off-by: Emanuele Giuseppe Esposito --- softmmu/memory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/softmmu/memory.c b/softmmu/memory.c index 7ba2048836..1afd3f9703 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -1076,7 +1076,9 @@ static void address_space_update_topology(AddressSpac= e *as) if (!g_hash_table_lookup(flat_views, physmr)) { generate_memory_topology(physmr); } + MEMORY_LISTENER_CALL_GLOBAL(begin, Forward); address_space_set_flatview(as); + MEMORY_LISTENER_CALL_GLOBAL(commit, Forward); } =20 void memory_region_transaction_begin(void) --=20 2.31.1 From nobody Sat Apr 27 22:10:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1660645011; cv=none; d=zohomail.com; s=zohoarc; b=nDPg0WDWvQ6za1kevoqsBO6JqeQ6YfY0XOZiLiRD+V8o2vVGBfIpWEWgyfuquV9ahHp9pbEGpln1Bbef2Ftd7bTNOPbdNn+5HO9ame3ZUpfIBVjyheF9eAW0vjn8Ctw4t3WO2Gnp3kbLttaKTAnKlcSII+Dsoe1KSTLRfsMd8jY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660645011; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NKA6rxMzSG9plLayOOUgu+lS1k1tefQ9X0WWKNpyvdw=; b=azDqvQCJxUhuHhKmkZAB2T7kg0phNTAuMjoJUe+5OSqIMw5txRC+KQnCk7Obs10i7/HHgpTB7C6oTvFOC8ac3lm46TjgsNy8iOCHEqEan4BjIDy06Tnejt/llZX+XMOVdkY78fBj9kYHRvJ+lYW+bscQAoKL/02Nax+OEd5wH2U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1660645011135678.5910374272083; Tue, 16 Aug 2022 03:16:51 -0700 (PDT) Received: from localhost ([::1]:33458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNtcw-0001kB-0f for importer@patchew.org; Tue, 16 Aug 2022 06:16:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNtZK-0005iE-QA for qemu-devel@nongnu.org; Tue, 16 Aug 2022 06:13:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:53608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNtZG-0004KS-80 for qemu-devel@nongnu.org; Tue, 16 Aug 2022 06:13:03 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-455-Lryv6ImxNMy3GiCPK2AxZA-1; Tue, 16 Aug 2022 06:12:57 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B104E85A586; Tue, 16 Aug 2022 10:12:56 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CF7640D2827; Tue, 16 Aug 2022 10:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660644781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NKA6rxMzSG9plLayOOUgu+lS1k1tefQ9X0WWKNpyvdw=; b=XCU5lU3RUSE+uzFTkM33+eeTlHeJhu9FtvOKh4dahoIQorkRiSKpBhpI0wIV2tGfnmwIvE OtE9E0EV37s/7cg5JTkDjYIg5Onxq9xRHqAwNG7cO0Sbb9XS/cZBJgpNd7zR2rSBP30NRn qAV6BEaFT1Fcc6kf/3MhP0JvQnFHQMM= X-MC-Unique: Lryv6ImxNMy3GiCPK2AxZA-1 From: Emanuele Giuseppe Esposito To: qemu-devel@nongnu.org Cc: Paolo Bonzini , "Michael S. Tsirkin" , Cornelia Huck , Peter Xu , David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Maxim Levitsky , kvm@vger.kernel.org, Emanuele Giuseppe Esposito Subject: [RFC PATCH 2/2] kvm/kvm-all.c: listener should delay kvm_vm_ioctl to the commit phase Date: Tue, 16 Aug 2022 06:12:50 -0400 Message-Id: <20220816101250.1715523-3-eesposit@redhat.com> In-Reply-To: <20220816101250.1715523-1-eesposit@redhat.com> References: <20220816101250.1715523-1-eesposit@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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=170.10.129.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1660645013251100001 Content-Type: text/plain; charset="utf-8" Instead of sending a single ioctl every time ->region_* or ->log_* callbacks are called, "queue" all memory regions in a list that will be emptied only when committing. This allow the KVM kernel API to be extended and support multiple memslots updates in a single call. Signed-off-by: Emanuele Giuseppe Esposito --- accel/kvm/kvm-all.c | 99 ++++++++++++++++++++++++++++----------- include/sysemu/kvm_int.h | 6 +++ linux-headers/linux/kvm.h | 9 ++++ 3 files changed, 87 insertions(+), 27 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 645f0a249a..3afa46b2ef 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -357,39 +357,40 @@ int kvm_physical_memory_addr_from_host(KVMState *s, v= oid *ram, return ret; } =20 +static void kvm_memory_region_node_add(KVMMemoryListener *kml, + struct kvm_userspace_memory_region = *mem) +{ + MemoryRegionNode *node; + + node =3D g_malloc(sizeof(MemoryRegionNode)); + *node =3D (MemoryRegionNode) { + .mem =3D mem, + }; + QTAILQ_INSERT_TAIL(&kml->mem_list, node, list); +} + static int kvm_set_user_memory_region(KVMMemoryListener *kml, KVMSlot *slo= t, bool new) { - KVMState *s =3D kvm_state; - struct kvm_userspace_memory_region mem; - int ret; + struct kvm_userspace_memory_region *mem; =20 - mem.slot =3D slot->slot | (kml->as_id << 16); - mem.guest_phys_addr =3D slot->start_addr; - mem.userspace_addr =3D (unsigned long)slot->ram; - mem.flags =3D slot->flags; + mem =3D g_malloc(sizeof(struct kvm_userspace_memory_region)); =20 - if (slot->memory_size && !new && (mem.flags ^ slot->old_flags) & KVM_M= EM_READONLY) { + mem->slot =3D slot->slot | (kml->as_id << 16); + mem->guest_phys_addr =3D slot->start_addr; + mem->userspace_addr =3D (unsigned long)slot->ram; + mem->flags =3D slot->flags; + + if (slot->memory_size && !new && (mem->flags ^ slot->old_flags) & + KVM_MEM_READONLY) { /* Set the slot size to 0 before setting the slot to the desired * value. This is needed based on KVM commit 75d61fbc. */ - mem.memory_size =3D 0; - ret =3D kvm_vm_ioctl(s, KVM_SET_USER_MEMORY_REGION, &mem); - if (ret < 0) { - goto err; - } - } - mem.memory_size =3D slot->memory_size; - ret =3D kvm_vm_ioctl(s, KVM_SET_USER_MEMORY_REGION, &mem); - slot->old_flags =3D mem.flags; -err: - trace_kvm_set_user_memory(mem.slot, mem.flags, mem.guest_phys_addr, - mem.memory_size, mem.userspace_addr, ret); - if (ret < 0) { - error_report("%s: KVM_SET_USER_MEMORY_REGION failed, slot=3D%d," - " start=3D0x%" PRIx64 ", size=3D0x%" PRIx64 ": %s", - __func__, mem.slot, slot->start_addr, - (uint64_t)mem.memory_size, strerror(errno)); + mem->memory_size =3D 0; + kvm_memory_region_node_add(kml, mem); } - return ret; + mem->memory_size =3D slot->memory_size; + kvm_memory_region_node_add(kml, mem); + slot->old_flags =3D mem->flags; + return 0; } =20 static int do_kvm_destroy_vcpu(CPUState *cpu) @@ -1517,12 +1518,52 @@ static void kvm_region_add(MemoryListener *listener, static void kvm_region_del(MemoryListener *listener, MemoryRegionSection *section) { - KVMMemoryListener *kml =3D container_of(listener, KVMMemoryListener, l= istener); + KVMMemoryListener *kml =3D container_of(listener, KVMMemoryListener, + listener); =20 kvm_set_phys_mem(kml, section, false); memory_region_unref(section->mr); } =20 +static void kvm_begin(MemoryListener *listener) +{ + KVMMemoryListener *kml =3D container_of(listener, KVMMemoryListener, + listener); + assert(QTAILQ_EMPTY(&kml->mem_list)); +} + +static void kvm_commit(MemoryListener *listener) +{ + KVMMemoryListener *kml =3D container_of(listener, KVMMemoryListener, + listener); + MemoryRegionNode *node, *next; + KVMState *s =3D kvm_state; + + QTAILQ_FOREACH_SAFE(node, &kml->mem_list, list, next) { + struct kvm_userspace_memory_region *mem =3D node->mem; + int ret; + + ret =3D kvm_vm_ioctl(s, KVM_SET_USER_MEMORY_REGION, mem); + + trace_kvm_set_user_memory(mem->slot, mem->flags, mem->guest_phys_a= ddr, + mem->memory_size, mem->userspace_addr, 0= ); + + if (ret < 0) { + error_report("%s: KVM_SET_USER_MEMORY_REGION failed, slot=3D%d= ," + " start=3D0x%" PRIx64 ": %s", + __func__, mem->slot, + (uint64_t)mem->memory_size, strerror(errno)); + } + + QTAILQ_REMOVE(&kml->mem_list, node, list); + g_free(mem); + g_free(node); + } + + + +} + static void kvm_log_sync(MemoryListener *listener, MemoryRegionSection *section) { @@ -1664,8 +1705,12 @@ void kvm_memory_listener_register(KVMState *s, KVMMe= moryListener *kml, kml->slots[i].slot =3D i; } =20 + QTAILQ_INIT(&kml->mem_list); + kml->listener.region_add =3D kvm_region_add; kml->listener.region_del =3D kvm_region_del; + kml->listener.begin =3D kvm_begin; + kml->listener.commit =3D kvm_commit; kml->listener.log_start =3D kvm_log_start; kml->listener.log_stop =3D kvm_log_stop; kml->listener.priority =3D 10; diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h index 1f5487d9b7..eab8598007 100644 --- a/include/sysemu/kvm_int.h +++ b/include/sysemu/kvm_int.h @@ -30,9 +30,15 @@ typedef struct KVMSlot ram_addr_t ram_start_offset; } KVMSlot; =20 +typedef struct MemoryRegionNode { + struct kvm_userspace_memory_region *mem; + QTAILQ_ENTRY(MemoryRegionNode) list; +} MemoryRegionNode; + typedef struct KVMMemoryListener { MemoryListener listener; KVMSlot *slots; + QTAILQ_HEAD(, MemoryRegionNode) mem_list; int as_id; } KVMMemoryListener; =20 diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index f089349149..f215efdaa8 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -103,6 +103,13 @@ struct kvm_userspace_memory_region { __u64 userspace_addr; /* start of the userspace allocated memory */ }; =20 +/* for KVM_SET_USER_MEMORY_REGION_LIST */ +struct kvm_userspace_memory_region_list { + __u32 nent; + __u32 flags; + struct kvm_userspace_memory_region entries[0]; +}; + /* * The bit 0 ~ bit 15 of kvm_memory_region::flags are visible for userspac= e, * other bits are reserved for kvm internal use which are defined in @@ -1426,6 +1433,8 @@ struct kvm_vfio_spapr_tce { struct kvm_userspace_memory_region) #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) +#define KVM_SET_USER_MEMORY_REGION_LIST _IOW(KVMIO, 0x49, \ + struct kvm_userspace_memory_region_list) =20 /* enable ucontrol for s390 */ struct kvm_s390_ucas_mapping { --=20 2.31.1