From nobody Tue May 13 23:44:20 2025
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zohomail.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1527605558996680.7354400642724;
Tue, 29 May 2018 07:52:38 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com
[10.5.11.26])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 0039130BE826;
Tue, 29 May 2018 14:52:37 +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 5C04230012BD;
Tue, 29 May 2018 14:52:36 +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 3A9656B4C3;
Tue, 29 May 2018 14:52:35 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
[10.5.11.14])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id w4TEqXvp001432 for ;
Tue, 29 May 2018 10:52:33 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 25D9B4FA40; Tue, 29 May 2018 14:52:33 +0000 (UTC)
Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com
[10.5.110.48])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 9AD2417C4D;
Tue, 29 May 2018 14:52:28 +0000 (UTC)
Received: from huawei.com (szxga02-in.huawei.com [45.249.212.188])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 183CD30C2119;
Tue, 29 May 2018 14:52:27 +0000 (UTC)
Received: from DGGEML401-HUB.china.huawei.com (unknown [172.30.72.56])
by Forcepoint Email with ESMTP id 5E7968E2A8736;
Tue, 29 May 2018 22:52:18 +0800 (CST)
Received: from localhost.localdomain (10.175.104.211) by
DGGEML401-HUB.china.huawei.com (10.3.17.32) with Microsoft SMTP Server
id 14.3.382.0; Tue, 29 May 2018 22:52:12 +0800
From: Jie Wang
To: , , ,
Date: Tue, 29 May 2018 20:38:52 +0800
Message-ID: <1527597532-37999-1-git-send-email-wangjie88@huawei.com>
MIME-Version: 1.0
X-Originating-IP: [10.175.104.211]
X-CFilter-Loop: Reflected
X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207
matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.48]); Tue, 29 May 2018 14:52:27 +0000 (UTC)
X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.48]);
Tue, 29 May 2018 14:52:27 +0000 (UTC) for IP:'45.249.212.188'
DOMAIN:'szxga02-in.huawei.com' HELO:'huawei.com'
FROM:'wangjie88@huawei.com' RCPT:''
X-RedHat-Spam-Score: -0.012 (RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,
SPF_PASS) 45.249.212.188 szxga02-in.huawei.com
45.249.212.188 szxga02-in.huawei.com
X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-loop: libvir-list@redhat.com
Cc: chenxian4@huawei.com, eric.fangyi@huawei.com, wu.wubin@huawei.com,
wangjie88@huawei.com
Subject: [libvirt] [PATCH] conf: Introduce align for hostmem-file
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: ,
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]);
Tue, 29 May 2018 14:52:37 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
QEMU has add the 'align' option to 'memory-backend-file'. Expose
this option to users by new element align.
Signed-off-by: Jie Wang
---
docs/formatdomain.html.in | 18 +++++++
docs/schemas/domaincommon.rng | 7 +++
src/conf/domain_conf.c | 14 +++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 4 ++
.../memory-hotplug-nvdimm-align.args | 31 +++++++++++
.../memory-hotplug-nvdimm-align.xml | 63 ++++++++++++++++++=
++++
tests/qemuxml2argvtest.c | 3 ++
.../memory-hotplug-nvdimm-align.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
10 files changed, 143 insertions(+)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml
create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-align.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0d0fd3b..29fe145 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -7932,6 +7932,9 @@ qemu-kvm -net nic,model=3D? /dev/null
</target>
</memory>
<memory model=3D'nvdimm'>
+ <align>
+ <sieze unit=3D'KiB'>2048</size>
+ </align>
<source>
<path>/tmp/nvdimm</path>
</source>
@@ -7983,6 +7986,21 @@ qemu-kvm -net nic,model=3D? /dev/null
=20
+
align
+
+
+ For NVDIMM type devices one can optionally use
+ align and its subelement size
+ to configure the size of alignment within the NVDIMM module.
+ The size element has usual meaning described
+ here.
+ For QEMU domains the following restrictions apply:
+
+
+
the alignment must be multiples of page size 4KiB,