From nobody Thu Mar 28 17:24:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1605729552; cv=none; d=zohomail.com; s=zohoarc; b=K0jt30pBOxlMoJqi20yTzjl0jD9T5E1oSp0YbQRfbRiCR0b3idPyi5YDqvPVPACYdsW3HBZT+L0/WAzZ3DDsgWWqOJYOhiLCBJIT0Y7iP/HEL1YS5JzHXI7+ncGj8A5RTS+zA3EfqPB5w9ejA062d6qS2Er8qfCAwK6qxqbKIGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605729552; h=Content-Type: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=/rkgMI7klqfy+YWxseigt9SszeQV7AGqgUK32dDZn/w=; b=dwKmoep/EQ/tjmEJQzAX9AmYDLHx9zpuCp/AGtDIyJfzYZsxp9MBjv9P13THNI7/xxLcj6PVxOX2/qvsY0W+UHvKjcXwjYyTeg/V0LrRYhSe9UzFE9ylOfBCVerHNlz5gGIx/YgYrWXKxwt71EKjpTtGAeV5I81Q8ssBxOZ4FkA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605729552306313.6544431895396; Wed, 18 Nov 2020 11:59:12 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-244-2RBr1Lw1MOGq-e-A2mkAAA-1; Wed, 18 Nov 2020 14:59:09 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 746F21005D4C; Wed, 18 Nov 2020 19:59:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 762251964E; Wed, 18 Nov 2020 19:59:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0FAED44A5C; Wed, 18 Nov 2020 19:59:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AIJwwvk021598 for ; Wed, 18 Nov 2020 14:58:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2ADB12166BA3; Wed, 18 Nov 2020 19:58:58 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 261B02166B44 for ; Wed, 18 Nov 2020 19:58:58 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15592858F11 for ; Wed, 18 Nov 2020 19:58:58 +0000 (UTC) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-54-eTm8OcXOMGSFAjDgKw3qpg-1; Wed, 18 Nov 2020 14:58:56 -0500 Received: by mail-qk1-f196.google.com with SMTP id q5so3045639qkc.12 for ; Wed, 18 Nov 2020 11:58:55 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c7:d88a:482:7c39:5cca:96f6]) by smtp.gmail.com with ESMTPSA id n21sm7022757qke.21.2020.11.18.11.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 11:58:52 -0800 (PST) X-MC-Unique: 2RBr1Lw1MOGq-e-A2mkAAA-1 X-MC-Unique: eTm8OcXOMGSFAjDgKw3qpg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/rkgMI7klqfy+YWxseigt9SszeQV7AGqgUK32dDZn/w=; b=oCRRVKPG1WzYDDCGIZMz4+3vEu67hBAY0OLyC7K3foRnUGw0qjtenijWZDN+hQ1UQj pJd9qVA96NwwpMFELW4iYfjzyQj9dXq4Ozr+foG98i0knw4rsDs4+ULqAio+fI4oeFu0 REEDWZYxi0amvz6iYy4zko7BlOt89UEKWkxvM/uFeUQmNI+V0QhHxulqG1daszyDHu4o 6/txOoiPjgC8N2Uf8PrsGcgADQM17UcbVTvPEtES0I3WGLhh7RVGuwPL2pWAHs3bA+D/ jYuIk2pA8pCw8cS4N1wfEzjDIrlbk4y/7avJf3Cz77ReCSOM1+JJGNTUY9un6rVlmy4L F2Gw== X-Gm-Message-State: AOAM5301SqrgqDjpvS0m2qiOTlFNJ7vVtC9Ds5bwvdy4byxVWXy6Z4EM NvlR+6fY84jB58qxRCoOrgDkwrzR2Yd5fA== X-Google-Smtp-Source: ABdhPJzX8nZeH3z+vGGrx2K4IpYUbJVTAjSirgTeJHXLd1ahL1FiTsdQypA6XoHo4JIx2i7e6fw7vw== X-Received: by 2002:a37:6351:: with SMTP id x78mr6389592qkb.301.1605729533414; Wed, 18 Nov 2020 11:58:53 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 3/6] Revert "domain_conf.c: auto-align pSeries NVDIMM in virDomainMemoryDefPostParse()" Date: Wed, 18 Nov 2020 16:58:31 -0300 Message-Id: <20201118195834.1187381-4-danielhb413@gmail.com> In-Reply-To: <20201118195834.1187381-1-danielhb413@gmail.com> References: <20201118195834.1187381-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The code to align ppc64 NVDIMMs on post parse was introduced in commit d3f3c2c97f9b. That commit failed to realize that we can't align memory unconditionally. As of commit c7d7ba85a624 ("qemu: command: Align memory sizes only on fresh starts"), all memory alignment should be executed only when we're not migrating or in a snapshot. This revert does not break any guests in the wild, given that ppc64 NVDIMMs are still being aligned in qemuDomainAlignMemorySizes(). Next patch will introduce a mechanism where we can have post parse NVDIMM alignment for pSeries without breaking the intended design, as defined by c7d7ba85a624. This reverts commit d3f3c2c97f9b92c982ff809479495f44614edb88. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 23 +------------------ .../memory-hotplug-nvdimm-ppc64.xml | 2 +- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 498a8b6ef0..961f292e1f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5351,24 +5351,6 @@ virDomainVsockDefPostParse(virDomainVsockDefPtr vsoc= k) } =20 =20 -static int -virDomainMemoryDefPostParse(virDomainMemoryDefPtr mem, - const virDomainDef *def) -{ - /* Although only the QEMU driver implements PPC64 support, this - * code is related to the platform specification (PAPR), i.e. it - * is hypervisor agnostic, and any future PPC64 hypervisor driver - * will have the same restriction. - */ - if (ARCH_IS_PPC64(def->os.arch) && - mem->model =3D=3D VIR_DOMAIN_MEMORY_MODEL_NVDIMM && - virDomainNVDimmAlignSizePseries(mem) < 0) - return -1; - - return 0; -} - - static int virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev, const virDomainDef *def, @@ -5414,10 +5396,6 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDef= Ptr dev, ret =3D 0; break; =20 - case VIR_DOMAIN_DEVICE_MEMORY: - ret =3D virDomainMemoryDefPostParse(dev->data.memory, def); - break; - case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_FS: case VIR_DOMAIN_DEVICE_INPUT: @@ -5432,6 +5410,7 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDefP= tr dev, case VIR_DOMAIN_DEVICE_SHMEM: case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: + case VIR_DOMAIN_DEVICE_MEMORY: case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_AUDIO: ret =3D 0; diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml b/tes= ts/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml index ecb1b83b4a..ae5a17d3c8 100644 --- a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml +++ b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml @@ -38,7 +38,7 @@ /tmp/nvdimm - 524416 + 550000 0