From nobody Sun May 19 01:27:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1674138484; cv=none; d=zohomail.com; s=zohoarc; b=V0lB8j3QNl/WBiqfIWPEQz6y10ZpUs3NABdrMTwrAH5HnA5O7kDkKLXHbeaRQ2Qx/IKT8hJr3yA9WurOKEVrW+TFCLd+qKssCSVz+EeCOr1TZN1joX3P52UyYAtlsePa8ClmlKI5NiAwwxhcz9uUQ/LxSAB1vCh4Lur0L5KhlAI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674138484; h=Content-Type:Content-Transfer-Encoding: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=IbRx5tYoR46JgKT+uyr9itWpiUU0FNgOx11ik/hJ3lM=; b=XMf0iW91RByBipehNvKFLsmn9sGxhZPAay+cgw9cX9UwX4hFP3I9UA/ln36F7cYVm9V3LffKkSlxijb7wk6kPuXSQ9RT9LXep6LQg48E5OlQd+x+9tmCBMnD+QJqrzr2ybRKBz+q1WnQTYQuXyIGkaNMf5lW5JwsrzbwqB9YlVY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16741384849501019.0345813022518; Thu, 19 Jan 2023 06:28:04 -0800 (PST) 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-185-ukFcI6w5NVCZkN4MmNsAOA-1; Thu, 19 Jan 2023 09:28:01 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4DD5A100F903; Thu, 19 Jan 2023 14:27:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37F351121318; Thu, 19 Jan 2023 14:27:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E974C1946A72; Thu, 19 Jan 2023 14:27:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BD8741946A6D for ; Thu, 19 Jan 2023 14:27:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AF5114010D46; Thu, 19 Jan 2023 14:27:56 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-29.brq.redhat.com [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14BE4401530D for ; Thu, 19 Jan 2023 14:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674138483; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IbRx5tYoR46JgKT+uyr9itWpiUU0FNgOx11ik/hJ3lM=; b=JQ3qRguqjVtquV/Zhd9W+ca2P/3xkdC38xpcwYxZYVjWH6OjktLhchN6JGER/m8lmNQ+hP hydbOtVNmIJA7VbXeyCO91dTJTDsh3v8SVA8sc0Agsuo/0wTTKUp1UbAiTZVBtVQn8xs6N je21QO13naCEomHjSCZnGEG4YuPV5oI= X-MC-Unique: ukFcI6w5NVCZkN4MmNsAOA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/3] qemu: hotplug: Remove legacy quirk for 'dimm' address generation Date: Thu, 19 Jan 2023 15:27:52 +0100 Message-Id: <40c515ed6dfd1e4cfc92b023f99662a163d96190.1674138444.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674138486757100002 Content-Type: text/plain; charset="utf-8" Commit b7798a07f93 (in fall of 2016) changed the way we generate aliases for 'dimm' memory devices as the alias itself is part of the migration stream section naming and thus must be treated as ABI. The code added compatibility layer for VMs with memory hotplug started with the old scheme to prevent from generating wrong aliases. The compatibility layer broke though later when 'nvdimm' and 'pmem' devices were introduced as it wrongly detected them as old configuration. Now rather than attempting to fix the legacy compat layer to treat other devices properly we'll be better off simply removing it as it's extremely unlikely that somebody has a VM started in 2016 running with today's libvirt and attempts to hotplug more memory. This fixes a corner case when a user hot-adds a 'dimm' into a VM with a 'dimm' and a 'nvdimm' after restart of libvirtd and then attempts to migrate the VM. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2158701 Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander --- src/qemu/qemu_hotplug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 026e1ee5ad..5840504d13 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2275,9 +2275,7 @@ qemuDomainAttachMemory(virQEMUDriver *driver, goto cleanup; releaseaddr =3D true; - /* in cases where we are using a VM with aliases generated according t= o the - * index of the memory device we need to keep continue using that sche= me */ - if (qemuAssignDeviceMemoryAlias(vm->def, mem, priv->memAliasOrderMisma= tch) < 0) + if (qemuAssignDeviceMemoryAlias(vm->def, mem, false) < 0) goto cleanup; objalias =3D g_strdup_printf("mem%s", mem->info.alias); --=20 2.38.1 From nobody Sun May 19 01:27:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1674138617; cv=none; d=zohomail.com; s=zohoarc; b=OZyw/k3J743Cl3X7v/TbMUStKv7zaBwD3wPcUrRzCRGkdezxhNukd2OunFltJCuleKShvfNlCKjFC3ZzSxvk1EfsRm2r97e2TgDNgIy9tEYJfAlVTt9Bth0x616ZlgY1LRK3FS/0vp4yJXC+E3zVR0p9Hq47e8c0J27OOlOGqlk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674138617; h=Content-Type:Content-Transfer-Encoding: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=r0g2UYF4OEjCreiSzm4c6BXgoO8Aneb4CESlDHVamAY=; b=lO1DqYjYmDeuSazyzkPB4CxMgiTTO30tZCqekFEnMpPAaRAmBlYuV+bgASxsLzjS/q2OcaB27TAcDzIv0P26BeCrhI6DLeBwPAe5xS152vfKg1k6G9VJM55NVCWOioW3JZAWEZfVyFYPo/5qxGz2mSJ81k+er9c3h3t0JfBePS4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1674138617674683.1390055935067; Thu, 19 Jan 2023 06:30:17 -0800 (PST) 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-424-Sst2VzGaOsqOJDAQSf3iJw-1; Thu, 19 Jan 2023 09:28:00 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9C48A1C05B05; Thu, 19 Jan 2023 14:27:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8847F492B02; Thu, 19 Jan 2023 14:27:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7C8B41946A6E; Thu, 19 Jan 2023 14:27:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CB4711946A6D for ; Thu, 19 Jan 2023 14:27:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BB17940C1141; Thu, 19 Jan 2023 14:27:57 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-29.brq.redhat.com [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14C2F40C6EC4 for ; Thu, 19 Jan 2023 14:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674138616; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=r0g2UYF4OEjCreiSzm4c6BXgoO8Aneb4CESlDHVamAY=; b=KewOmnMRII3yoXcB9L00bKwa63GsxNaIREnBzBsv8M7eHLbAH+SjMbNTSygLZ5Zie0oTOr sYbN7cT/AEd6EH92v/hO+peFE2D0gqbhncBP5ZFtUFmQ0WAV86omjz3COaSCxM9ikYmDg4 x8lXVSLfnFLpu8XN21qFpd2zWsqNKHQ= X-MC-Unique: Sst2VzGaOsqOJDAQSf3iJw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/3] qemu: alias: Remove 'oldAlias' argument of qemuAssignDeviceMemoryAlias Date: Thu, 19 Jan 2023 15:27:53 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674138617911100001 Content-Type: text/plain; charset="utf-8" All callers pass 'false' so we no longer need it. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander --- src/qemu/qemu_alias.c | 13 ++++--------- src/qemu/qemu_alias.h | 3 +-- src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index ef8e87ab58..0f1310a0e5 100644 --- a/src/qemu/qemu_alias.c +++ b/src/qemu/qemu_alias.c @@ -454,7 +454,6 @@ qemuAssignDeviceRNGAlias(virDomainDef *def, static int qemuDeviceMemoryGetAliasID(virDomainDef *def, virDomainMemoryDef *mem, - bool oldAlias, const char *prefix) { size_t i; @@ -462,8 +461,7 @@ qemuDeviceMemoryGetAliasID(virDomainDef *def, /* virtio-pmem and virtio-mem go onto PCI bus and thus DIMM address is= not * valid */ - if (!oldAlias && - mem->model !=3D VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM && + if (mem->model !=3D VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM && mem->model !=3D VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM && mem->model !=3D VIR_DOMAIN_MEMORY_MODEL_SGX_EPC) return mem->info.addr.dimm.slot; @@ -482,8 +480,6 @@ qemuDeviceMemoryGetAliasID(virDomainDef *def, * qemuAssignDeviceMemoryAlias: * @def: domain definition. Necessary only if @oldAlias is true. * @mem: memory device definition - * @oldAlias: Generate the alias according to the order of the device in @= def - * rather than according to the slot number for legacy reasons. * * Generates alias for a memory device according to slot number if @oldAli= as is * false or according to order in @def->mems otherwise. @@ -492,8 +488,7 @@ qemuDeviceMemoryGetAliasID(virDomainDef *def, */ int qemuAssignDeviceMemoryAlias(virDomainDef *def, - virDomainMemoryDef *mem, - bool oldAlias) + virDomainMemoryDef *mem) { const char *prefix =3D NULL; int idx =3D 0; @@ -525,7 +520,7 @@ qemuAssignDeviceMemoryAlias(virDomainDef *def, break; } - idx =3D qemuDeviceMemoryGetAliasID(def, mem, oldAlias, prefix); + idx =3D qemuDeviceMemoryGetAliasID(def, mem, prefix); mem->info.alias =3D g_strdup_printf("%s%d", prefix, idx); return 0; @@ -685,7 +680,7 @@ qemuAssignDeviceAliases(virDomainDef *def) qemuAssignDeviceTPMAlias(def->tpms[i], i); } for (i =3D 0; i < def->nmems; i++) { - if (qemuAssignDeviceMemoryAlias(def, def->mems[i], false) < 0) + if (qemuAssignDeviceMemoryAlias(def, def->mems[i]) < 0) return -1; } if (def->vsock) { diff --git a/src/qemu/qemu_alias.h b/src/qemu/qemu_alias.h index 6433ae4cec..af9c3f62d3 100644 --- a/src/qemu/qemu_alias.h +++ b/src/qemu/qemu_alias.h @@ -55,8 +55,7 @@ void qemuAssignDeviceRNGAlias(virDomainDef *def, virDomainRNGDef *rng); int qemuAssignDeviceMemoryAlias(virDomainDef *def, - virDomainMemoryDef *mems, - bool oldAlias); + virDomainMemoryDef *mems); void qemuAssignDeviceShmemAlias(virDomainDef *def, virDomainShmemDef *shmem, diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 5840504d13..2df59873db 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2275,7 +2275,7 @@ qemuDomainAttachMemory(virQEMUDriver *driver, goto cleanup; releaseaddr =3D true; - if (qemuAssignDeviceMemoryAlias(vm->def, mem, false) < 0) + if (qemuAssignDeviceMemoryAlias(vm->def, mem) < 0) goto cleanup; objalias =3D g_strdup_printf("mem%s", mem->info.alias); --=20 2.38.1 From nobody Sun May 19 01:27:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1674138486; cv=none; d=zohomail.com; s=zohoarc; b=QwwvKRltb6eIIe8jEd2eXU5P7uhfiFomjxXsQMchdXtG1N0tyclB8SLMRjCZGa0RYpTzStE2B34X26Gh7+yBot6GUPgWJIOzK+GZGLGemITd6zLWkU7lVePmEOecYazD5EzSB34Ucse7rWYdGs5CbQ9zENabtfUt57VJjV3EUWw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674138486; h=Content-Type:Content-Transfer-Encoding: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=AoRAhK76d1+UnrnQOQVOZFAYf15eL1vV+6ojYBqIo8s=; b=NOs+5opekXHXD/ss68pycRodDoZpg8+mmKtq8lmffNND9Nx79qpLNmYLMgyBY3zLyX7r2U+YZ+n5Crkw74AAwqM4A9iHpY8bERpE+VaVGivC2XByKBWVl5/irjbxsvItwYckTA+ladO3bRi+9YG2Hp4ggWPVBA7Iz8ke9tK7aiE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1674138486621756.4515818664748; Thu, 19 Jan 2023 06:28:06 -0800 (PST) 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-342-pTSmsVYGPEu6boF5jR2pvw-1; Thu, 19 Jan 2023 09:28:02 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 52B62857F82; Thu, 19 Jan 2023 14:28:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D4101121318; Thu, 19 Jan 2023 14:28:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2B6A51946A6E; Thu, 19 Jan 2023 14:28:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D0E731946A72 for ; Thu, 19 Jan 2023 14:27:58 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B531540C115E; Thu, 19 Jan 2023 14:27:58 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-29.brq.redhat.com [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1EC3240C6EC4 for ; Thu, 19 Jan 2023 14:27:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674138485; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=AoRAhK76d1+UnrnQOQVOZFAYf15eL1vV+6ojYBqIo8s=; b=fePh80NoPd/F4yl0cnJD+tAGQGYw/boKd635ARGxNsqz6y3+1Zh4wR8cEjm8kybskQZGxR nRRjJEYi2xMZmu4l1EtmSbr3UVHIadQwBW4qv1zm+W7LG0kLx6aK1EFOpSEOD/Bl2Hjjgm ryvoFUVOuMgWT6QRdShY/mAQOPK/1jQ= X-MC-Unique: pTSmsVYGPEu6boF5jR2pvw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/3] qemu: Remove 'memAliasOrderMismatch' field from VM private data Date: Thu, 19 Jan 2023 15:27:54 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674138488876100005 Content-Type: text/plain; charset="utf-8" The field is no longer used so we can remove it and the code filling it. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander --- src/qemu/qemu_domain.h | 3 --- src/qemu/qemu_process.c | 24 ------------------------ 2 files changed, 27 deletions(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 08430b67b9..eca5404cdc 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -177,9 +177,6 @@ struct _qemuDomainObjPrivate { uint8_t *masterKey; size_t masterKeyLen; - /* note whether memory device alias does not correspond to slot number= */ - bool memAliasOrderMismatch; - /* for migrations using TLS with a secret (not to be saved in our */ /* private XML). */ qemuDomainSecretInfo *migSecinfo; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ee9f0784d3..29716ecb19 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3896,28 +3896,6 @@ qemuDomainPerfRestart(virDomainObj *vm) } -static void -qemuProcessReconnectCheckMemAliasOrderMismatch(virDomainObj *vm) -{ - size_t i; - int aliasidx; - virDomainDef *def =3D vm->def; - qemuDomainObjPrivate *priv =3D vm->privateData; - - if (!virDomainDefHasMemoryHotplug(def) || def->nmems =3D=3D 0) - return; - - for (i =3D 0; i < def->nmems; i++) { - aliasidx =3D qemuDomainDeviceAliasIndex(&def->mems[i]->info, "dimm= "); - - if (def->mems[i]->info.addr.dimm.slot !=3D aliasidx) { - priv->memAliasOrderMismatch =3D true; - break; - } - } -} - - static bool qemuProcessDomainMemoryDefNeedHugepagesPath(const virDomainMemoryDef *mem, const long system_pagesize) @@ -9091,8 +9069,6 @@ qemuProcessReconnect(void *opaque) if (qemuProcessRefreshFdsetIndex(obj) < 0) goto error; - qemuProcessReconnectCheckMemAliasOrderMismatch(obj); - if (qemuConnectAgent(driver, obj) < 0) goto error; --=20 2.38.1