From nobody Sun Feb 8 10:30:21 2026 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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=1607361229; cv=none; d=zohomail.com; s=zohoarc; b=V2OgbFFHeTUH3pqA18XCxpk+RvhkeFbi933PRs2JwSKYWnaP4mPgK56qPh9GhMOpvU7m5vPg8cTgTcsvaSCVRSLhNMtuOOb05e+c2cTyqoiVdzsJ5SgOTcMiCAbG2Dr3rkmc9wp3ZnjqyKJMcGycbjGadT+RjH+JQEiFmyg/IlU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607361229; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Pii02jz9DB7KHOWwjVMaNKuRj0DubESRynyiywmaLpo=; b=l1cfrDXUyq+KJnFeRDBGCwzvYGH2PrVfjbJ4BSUs5FhY3ip5I/xlmlkcxHQaYiqNe/WyWiz18lT/+3GltRcvA57JJP1O6zJT4kbxACcISgImUWDluIv1T9v37/m/+hJbErPMHTKKoGa/7cEr2Xz8K3ZLKgw4OotUJjBK534xR24= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass 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 1607361229406247.31739364706982; Mon, 7 Dec 2020 09:13:49 -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-294-ablrsupDPKiaxqiK3QpEYA-1; Mon, 07 Dec 2020 12:09:41 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C007AC28C; Mon, 7 Dec 2020 17:09:34 +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 EF38E5D9D0; Mon, 7 Dec 2020 17:09:33 +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 6E7434E58E; Mon, 7 Dec 2020 17:09:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0B7H7MC2001223 for ; Mon, 7 Dec 2020 12:07:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 913C36A052; Mon, 7 Dec 2020 17:07:22 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.194.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 85D3260CED for ; Mon, 7 Dec 2020 17:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607360984; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Pii02jz9DB7KHOWwjVMaNKuRj0DubESRynyiywmaLpo=; b=dz8HYAnYHOb8f1AQCOwVZ5ApUFZDr1ef3AJZ4vJ7yBuVQsREQ/5jdVn/SEquXehesRIV4b p0PkM2EJSGlPqvQnWxUKHf4Ml4BJOkVToRsixxjWLyNDUzaM/DBUw3M/j54Dk/K23rSZpl Y09t8GG0whF4VyrTkpE1k3Ap5hx2hcg= X-MC-Unique: ablrsupDPKiaxqiK3QpEYA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: Simplify size check for ppc64 NVDIMMs Date: Mon, 7 Dec 2020 18:07:14 +0100 Message-Id: <20201207170714.55230-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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.79 on 10.5.11.14 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 X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We already calculated the guest area, which is what is subject to minimum size requirements, a few lines earlier. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f14a15d3b4..4d007bc4a0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5363,7 +5363,7 @@ qemuDomainNVDimmAlignSizePseries(virDomainMemoryDefPt= r mem) /* Align down guest_area. 256MiB is the minimum size. Error * out if target_size is smaller than 256MiB + label_size, * since aligning it up will cause QEMU errors. */ - if (mem->size < (ppc64AlignSize + mem->labelsize)) { + if (guestArea < ppc64AlignSize) { virReportError(VIR_ERR_XML_ERROR, "%s", _("minimum target size for the NVDIMM " "must be 256MB plus the label size")); --=20 2.26.2