From nobody Mon Feb 9 04:59:26 2026 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=1667492613; cv=none; d=zohomail.com; s=zohoarc; b=ewCrPaW02l9Ir20M25lWMBg5rgromygKq8kjaJb1S2LEBbYOKYcoYq7rPz3vKrR/wKEnemFKC1GB3zZuLmvKM7WlqOuqo6ZOkFfBCa9cCbUbPNPs0qhd7AWPv1C2gAewMDcfRHEkaK145MzcDUDREh/mnyRTvaDu5ry9d0QizQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667492613; 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=En78pxZrzYzQwgD9TJd0C8RpSvul9JPcRGPym2PX7to=; b=cS+DoYV10fbDOQdZ8etbQZscJgeWgwoFohImZdxv1xnKLMjbmtI/OzlRe6cjvIl81DLZh3W9uNiog+I4CFk468DBZM5pzyFRyH49nvlv67jZKlAh2Co0dJFWZSyXUWrNqUUtcyjJTCBAn1kkFzVdbdhEJAlFohx2FVcTogUNimg= 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 1667492613145349.95140569791386; Thu, 3 Nov 2022 09:23:33 -0700 (PDT) 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-389-8kGpFPiLOVG56ruQhuO_6A-1; Thu, 03 Nov 2022 12:22:54 -0400 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 E523E18E0A8E; Thu, 3 Nov 2022 16:22:23 +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 CF6611121333; Thu, 3 Nov 2022 16:22:23 +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 9F15A1946A46; Thu, 3 Nov 2022 16:22:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 50E2D1946A6C for ; Thu, 3 Nov 2022 16:22:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 456EE1401C23; Thu, 3 Nov 2022 16:22:23 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD6CE1401C21 for ; Thu, 3 Nov 2022 16:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667492611; 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=En78pxZrzYzQwgD9TJd0C8RpSvul9JPcRGPym2PX7to=; b=SBgAgwz5c5snBc5BaWv1+7npVYO+UTzUwl30DN83Q4zSGuDK77ejRzP4NFiyd43GSVE8Yi b7V7vXorJgJAEFFAlwhw5Hvk89xXvTl927PRrzUicMaDYDDtS6Zqm4mw4fc4xYkS6ieA5+ CA40yu1pO1U9jVB3EFsM2hprLRn+W2I= X-MC-Unique: 8kGpFPiLOVG56ruQhuO_6A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 13/15] qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN Date: Thu, 3 Nov 2022 17:22:11 +0100 Message-Id: <598adde7e42f0f2122a701f7ff4bdb81a4e78769.1667490688.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1667492615278100009 Content-Type: text/plain; charset="utf-8"; x-default="true" Introduced in QEMU's commit of v2.12.0-rc0~148^2~4 the .align attribute of memory-backend-file is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 395b2e0a8f..256ef4912c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3410,16 +3410,8 @@ qemuBuildMemoryBackendProps(virJSONValue **backendPr= ops, if (virJSONValueObjectAdd(&props, "U:size", mem->size * 1024, NULL) < = 0) return -1; =20 - if (mem->alignsize) { - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_A= LIGN)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("nvdimm align property is not available " - "with this QEMU binary")); - return -1; - } - if (virJSONValueObjectAdd(&props, "U:align", mem->alignsize * 1024= , NULL) < 0) - return -1; - } + if (virJSONValueObjectAdd(&props, "P:align", mem->alignsize * 1024, NU= LL) < 0) + return -1; =20 if (mem->nvdimmPmem) { if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_P= MEM)) { --=20 2.37.4