From nobody Sun May 5 03:18:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1583962211; cv=none; d=zohomail.com; s=zohoarc; b=Uzs/waiDpvMMmGLaa9yM5lWPgf1wUq8f+MIB30NvzinWpqZRY+2vySc7ATUGgV141A0HSUZgkA9dVtTXj42UTQl1rKTTgLu8X3McHNTzP34GSjIQkcg69/01ubsTGe1fXuZYbT3WymCmoRxC6jA6vTdOKbYeup37LAYiJW5FrPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583962211; 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=obgYcqYLqs69AldlhPAoBW24TJGOkSVuJhDik9cS/Yc=; b=GKWzJlea3XKK8WqtET9KngdytMblkk+R6Lt1pN37wwKsql1yCiNiK9asBsdv7wH6gdXt2QyrLMvhEutfNZDUZa9pW3fGCA6JpzvB6381ZfUJVYxeuHMcV7sL//dY16ArqjSnsqkozxDf8F8Eu/eTJh9NgTc1RcwDKPpdjn6uo24= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1583962211203526.9357860447717; Wed, 11 Mar 2020 14:30:11 -0700 (PDT) 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-315-jvZ9jg48OyaXg-nbX81cUg-1; Wed, 11 Mar 2020 17:30:08 -0400 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 7535D13F9; Wed, 11 Mar 2020 21:30:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C2E15D9CA; Wed, 11 Mar 2020 21:30: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 95FAF184367A; Wed, 11 Mar 2020 21:30:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02BLTx4M025645 for ; Wed, 11 Mar 2020 17:29:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9937A2028CD3; Wed, 11 Mar 2020 21:29:59 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 930B32026D67 for ; Wed, 11 Mar 2020 21:29:57 +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 67A0B185A78F for ; Wed, 11 Mar 2020 21:29:57 +0000 (UTC) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-88mzJeOxNfuiNBVtILfUkQ-1; Wed, 11 Mar 2020 17:29:55 -0400 Received: by mail-qt1-f171.google.com with SMTP id g16so2755466qtp.9 for ; Wed, 11 Mar 2020 14:29:54 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:acda:e3b3:e49e:9034:e20d]) by smtp.gmail.com with ESMTPSA id f93sm11371616qtd.26.2020.03.11.14.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 14:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583962210; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=obgYcqYLqs69AldlhPAoBW24TJGOkSVuJhDik9cS/Yc=; b=H/DpG21LJfX6x7l3vJragsyAH9fJk4RZbK5FH4f/ZefB5b3QfUtT2uIs5/0KUzmmpAyM+r ENMEHiG//H8cZ6vME1n7wpQbZed8uOA6tPcTfT1V5OZUUxSXAY3ubqv5QrB4Ju+K1LdqSY 8EvLrEjJwDlnYTulnVQvG/hmcYMXFDU= X-MC-Unique: jvZ9jg48OyaXg-nbX81cUg-1 X-MC-Unique: 88mzJeOxNfuiNBVtILfUkQ-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=rM66c68BUFaCgVzqMhy1rLMZ9197/F/w8nVo21RyU2c=; b=CQTD+ym6V1aGH14tsiJkv4OJ8ACzv0yrkIPTP5okEHhQnGib4NYGV2f1jZhbFh/QCo UDrJn85NsbkbV5hhmLUbO2CipTIwReKLrrRjWcoekP4DnV4oFb3mzGRDSTx15P84n/fV NEuveMTfl4+2qMzcC4+2fGka2oFiKj0bIFPpNBmOJy9bcPuT0uvsyRmGfsY09EDQ476X fs+W1SEXLSZ5BunNYTb2AJuBsznv0Vit6ZBM1pO12thzNTkKF7HcjrE97UNhsho5l7We T2RKKUx5OdTu9too65nGa0/e7tJAEWUdB6HejdJSAhm77w+lolvQvil/gazP8PVrSxal E/0g== X-Gm-Message-State: ANhLgQ1T/FPX8t5xBf2fEVpYkQdi6PLg6QbncJsCPoBNbk49m2NA8YIv svMyi/gi3jehCw8AoHl6V8bf7EFxZ+U= X-Google-Smtp-Source: ADFU+vtxiS+oyB0r/PViypDN4Mi1DfHsjQ0basD6nMkCTgHBAw1yRVMvBZpO2z1fTEC36GDIA3w6gg== X-Received: by 2002:ac8:4d8a:: with SMTP id a10mr4438690qtw.373.1583962194144; Wed, 11 Mar 2020 14:29:54 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 1/5] conf: Introduce optional 'uuid' element for NVDIMM memory Date: Wed, 11 Mar 2020 18:29:38 -0300 Message-Id: <20200311212942.520394-2-danielhb413@gmail.com> In-Reply-To: <20200311212942.520394-1-danielhb413@gmail.com> References: <20200311212942.520394-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02BLTx4M025645 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.79 on 10.5.11.14 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" ppc64 NVDIMM support was implemented in QEMU by commit [1]. The support is similar to what x86 already does, aside from an extra 'uuid' element. This patch introduces a new optional 'uuid' element for the NVDIMM memory model. This element behaves like the 'uuid' element of the domain definition - if absent, we'll create a new one, otherwise use the one provided by the XML. The 'uuid' element is exclusive to pseries guests and are unavailable for other architectures. Next patch will use this new element to add NVDIMM support for ppc64. [1] https://github.com/qemu/qemu/commit/ee3a71e36654317b14ede0290e87628f8b7= 9f850 Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 5 ++ src/conf/domain_conf.c | 37 +++++++++++++-- src/conf/domain_conf.h | 3 ++ .../memory-hotplug-nvdimm-ppc64.xml | 47 +++++++++++++++++++ .../memory-hotplug-nvdimm-ppc64.xml | 47 +++++++++++++++++++ tests/qemuxml2xmltest.c | 2 + 6 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 529a98fc05..119ebc9401 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5660,6 +5660,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d2d97daf80..3ae6c181c2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16500,6 +16500,7 @@ static virDomainMemoryDefPtr virDomainMemoryDefParseXML(virDomainXMLOptionPtr xmlopt, xmlNodePtr memdevNode, xmlXPathContextPtr ctxt, + const virDomainDef *dom, unsigned int flags) { VIR_XPATH_NODE_AUTORESTORE(ctxt); @@ -16546,6 +16547,25 @@ virDomainMemoryDefParseXML(virDomainXMLOptionPtr x= mlopt, =20 def->discard =3D val; } + VIR_FREE(tmp); + + if (def->model =3D=3D VIR_DOMAIN_MEMORY_MODEL_NVDIMM && + ARCH_IS_PPC64(dom->os.arch)) { + /* Extract nvdimm uuid or generate a new one */ + tmp =3D virXPathString("string(./uuid[1])", ctxt); + + if (!tmp) { + if (virUUIDGenerate(def->uuid) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Failed to generate UUID")); + goto error; + } + } else if (virUUIDParse(tmp, def->uuid) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("malformed uuid element")); + goto error; + } + } =20 /* source */ if ((node =3D virXPathNode("./source", ctxt)) && @@ -16843,7 +16863,8 @@ virDomainDeviceDefParse(const char *xmlStr, break; case VIR_DOMAIN_DEVICE_MEMORY: if (!(dev->data.memory =3D virDomainMemoryDefParseXML(xmlopt, node, - ctxt, flags))) + ctxt, def, + flags))) return NULL; break; case VIR_DOMAIN_DEVICE_IOMMU: @@ -21790,6 +21811,7 @@ virDomainDefParseXML(xmlDocPtr xml, virDomainMemoryDefPtr mem =3D virDomainMemoryDefParseXML(xmlopt, nodes[i], ctxt, + def, flags); if (!mem) goto error; @@ -26976,6 +26998,7 @@ virDomainMemoryTargetDefFormat(virBufferPtr buf, static int virDomainMemoryDefFormat(virBufferPtr buf, virDomainMemoryDefPtr def, + const virDomainDef *dom, unsigned int flags) { const char *model =3D virDomainMemoryModelTypeToString(def->model); @@ -26990,6 +27013,14 @@ virDomainMemoryDefFormat(virBufferPtr buf, virBufferAddLit(buf, ">\n"); virBufferAdjustIndent(buf, 2); =20 + if (def->model =3D=3D VIR_DOMAIN_MEMORY_MODEL_NVDIMM && + ARCH_IS_PPC64(dom->os.arch)) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(def->uuid, uuidstr); + virBufferAsprintf(buf, "%s\n", uuidstr); + } + if (virDomainMemorySourceDefFormat(buf, def) < 0) return -1; =20 @@ -29319,7 +29350,7 @@ virDomainDefFormatInternalSetRootName(virDomainDefP= tr def, } =20 for (n =3D 0; n < def->nmems; n++) { - if (virDomainMemoryDefFormat(buf, def->mems[n], flags) < 0) + if (virDomainMemoryDefFormat(buf, def->mems[n], def, flags) < 0) goto error; } =20 @@ -30432,7 +30463,7 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src, rc =3D virDomainPanicDefFormat(&buf, src->data.panic); break; case VIR_DOMAIN_DEVICE_MEMORY: - rc =3D virDomainMemoryDefFormat(&buf, src->data.memory, flags); + rc =3D virDomainMemoryDefFormat(&buf, src->data.memory, def, flags= ); break; case VIR_DOMAIN_DEVICE_SHMEM: rc =3D virDomainShmemDefFormat(&buf, src->data.shmem, flags); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 91b776c28a..f2f2635957 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2189,6 +2189,9 @@ struct _virDomainMemoryDef { unsigned long long labelsize; /* kibibytes; valid only for NVDIMM */ bool readonly; /* valid only for NVDIMM */ =20 + /* required for QEMU NVDIMM ppc64 support */ + unsigned char uuid[VIR_UUID_BUFLEN]; + virDomainDeviceInfo info; }; =20 diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml b/tests= /qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml new file mode 100644 index 0000000000..59352d3c52 --- /dev/null +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml @@ -0,0 +1,47 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1099511627776 + 1267710 + 1267710 + 2 + + hvm + + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + +
+ + + + + + +
+ + + + 49545eb3-75e1-2d0a-acdd-f0294406c99e + + /tmp/nvdimm + + + 523264 + 0 + +
+ + + diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml b/tes= ts/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml new file mode 100644 index 0000000000..59352d3c52 --- /dev/null +++ b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml @@ -0,0 +1,47 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1099511627776 + 1267710 + 1267710 + 2 + + hvm + + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + +
+ + + + + + +
+ + + + 49545eb3-75e1-2d0a-acdd-f0294406c99e + + /tmp/nvdimm + + + 523264 + 0 + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 9b6a235777..a3c25b4a76 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1246,6 +1246,8 @@ mymain(void) DO_TEST("memory-hotplug-nvdimm-align", QEMU_CAPS_DEVICE_NVDIMM); DO_TEST("memory-hotplug-nvdimm-pmem", QEMU_CAPS_DEVICE_NVDIMM); DO_TEST("memory-hotplug-nvdimm-readonly", QEMU_CAPS_DEVICE_NVDIMM); + DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST= _BRIDGE, + QEMU_CAPS_DEVICE_NVDIMM); DO_TEST("net-udp", NONE); =20 DO_TEST("video-virtio-gpu-device", QEMU_CAPS_DEVICE_VIRTIO_GPU); --=20 2.24.1 From nobody Sun May 5 03:18:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1583962211; cv=none; d=zohomail.com; s=zohoarc; b=eD0gc71VZ+UVjl0i8cZ8FKOy4c8tdDta4d0sSMoXlum+xXkA9jKEnzEqK4tslLzlshQypzYlRPZxEClJY9R1LHLp0f1mJ0fXj1SkAi/XJHG8O6qI+iEbuTQexULGjNeCt97vhtX7hkDiLNk7wQzVCpOwOZuytHfkVvDnYFPklIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583962211; 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=wHSDpP5JpMeXHzdYE5b75Ki+XbaaAXUQplaAQkg7Ylg=; b=VjsoKPV7w5gVQC4KJTOz/v5Q8svV9gAZ26K8Pl0REf7HoRkRf+yoPt5FZokVda+sMNoys+ACRmK95Kjej9QTRkKLXGL5vgnXpx6GJsesYZ9IbdKsJuPHa1EbfyF33/WN8j/3DIgkNiQuzESp5JBEsYwTURrCLTWtg76DK7TYgUI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1583962211288208.17929646913706; Wed, 11 Mar 2020 14:30:11 -0700 (PDT) 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-304-K9Dao1PkPu6GU4tvhEt1HQ-1; Wed, 11 Mar 2020 17:30:07 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BA1413F8; Wed, 11 Mar 2020 21:30:02 +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 11CD092D2A; Wed, 11 Mar 2020 21:30: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 85B4584499; Wed, 11 Mar 2020 21:30:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02BLTxXh025646 for ; Wed, 11 Mar 2020 17:29:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9942A2028CD4; Wed, 11 Mar 2020 21:29:59 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93C082028CD2 for ; Wed, 11 Mar 2020 21:29:58 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 9A2871019E0D for ; Wed, 11 Mar 2020 21:29:58 +0000 (UTC) Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-LDkaZ6OlPViPnTsiCkoXsw-1; Wed, 11 Mar 2020 17:29:56 -0400 Received: by mail-qt1-f193.google.com with SMTP id d22so2800638qtn.0 for ; Wed, 11 Mar 2020 14:29:56 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:acda:e3b3:e49e:9034:e20d]) by smtp.gmail.com with ESMTPSA id f93sm11371616qtd.26.2020.03.11.14.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 14:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583962210; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=wHSDpP5JpMeXHzdYE5b75Ki+XbaaAXUQplaAQkg7Ylg=; b=QYvxpMMjswv3uChDEO3osLOMnB/xodj9oL5CfeL1NmYmjWTgyluIjScGTB0xuIQlaSb5dv k7Hx20ibIVuCjFptlhTvpRuf82TWFUNoOAcUo0qP/paqj+oCnkNmq5Wz0vwbTn7wNi8O/H dCWEWHdYKiTiY8UenZiSkL/T1vKhRQg= X-MC-Unique: K9Dao1PkPu6GU4tvhEt1HQ-1 X-MC-Unique: LDkaZ6OlPViPnTsiCkoXsw-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=XUkRkRJVow7mfJ7Ko4Y30y7T83KVrlyF+yNqTFbrkiY=; b=HScIN0xDUe+r4w9VqSH99hMW1MAAgY5GGj4Yz2Jg1NjKMcMG9JGCW0jKAvdUZDfrO0 ybY5DqFMEDySyG9KT9lctj/Gu+B+iqk3laMkIQeLeQhpArY5hO4XUGHwIsNQktjSAnuQ 2ub4XGXLK6IwztYZDscf1KPFL2sVP5OdCawZ+ZCBxDD0rXOigWR0rW7EwHPB703us2uw gpj9G9RzRG1+hXLAJiYur92zMuKOE888wXNnWCqEGcDsOSPdFIUnETGroNrj6TAMPUd/ rECqKPjffgZ9J+U/spauHX/sL4d92fRrbBM7+hdkZv7RdwW8vd0azHYQmpMHV0ox4Dao S8MA== X-Gm-Message-State: ANhLgQ05vfH7Cgk2xJExfwj/c4brWyyjpv8f8ziKHWjV6tRzrfeFUKIu 8H2C9IlSrdkgyFTEcyn27LP39XFiv3s= X-Google-Smtp-Source: ADFU+vsGPZoBzGs2cXXF+6EK7emavCLqBnN+UN3bq6E+EKWG3opqv/WQh+ewyr4qzx8G55IptrpANg== X-Received: by 2002:ac8:6055:: with SMTP id k21mr4629419qtm.242.1583962195610; Wed, 11 Mar 2020 14:29:55 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 2/5] formatdomain.html.in: document the new 'uuid' NVDIMM element Date: Wed, 11 Mar 2020 18:29:39 -0300 Message-Id: <20200311212942.520394-3-danielhb413@gmail.com> In-Reply-To: <20200311212942.520394-1-danielhb413@gmail.com> References: <20200311212942.520394-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02BLTxXh025646 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.79 on 10.5.11.13 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" Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7e7771725c..e3bf33f873 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -8857,6 +8857,7 @@ qemu-kvm -net nic,model=3D? /dev/null </target> </memory> <memory model=3D'nvdimm'> + <uuid> <source> <path>/tmp/nvdimm</path> </source> @@ -8870,6 +8871,7 @@ qemu-kvm -net nic,model=3D? /dev/null </target> </memory> <memory model=3D'nvdimm' access=3D'shared'> + <uuid> <source> <path>/dev/dax0.0</path> <alignsize unit=3D'KiB'>2048</alignsize> @@ -8925,6 +8927,17 @@ qemu-kvm -net nic,model=3D? /dev/null

=20 +
uuid
+
+

+ For pSeries guests, an uuid can be set to identify the + nvdimm module. If absent, libvirt will generate an uuid. + automatically. This attribute is allowed only for + model=3D'nvdimm' for pSeries guests. + Since 6.2.0 +

+
+
source

--=20 2.24.1 From nobody Sun May 5 03:18:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1583962221; cv=none; d=zohomail.com; s=zohoarc; b=RbEeVakqKWFWwBCVV+ZiGGYuBuheRW3ihSRoxY03HcDXfU5UkznbgxDT8YLhG4O/IXT2zZki7DrnBvuaw/cm+SSJHD1T/q+ZfpuaVFchfvbIWNOnS9huJHOK1gB1NfInAupXAff33XQWp6vyhS9GWZ7p/CZtWuSxZlSji+SRHLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583962221; 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=j4UisPqrvgnLjNKHGZPkSjPuZLEdrAvx/efL4ghFDJo=; b=SaXIw7XHzdQFCb5gQCSmdk+njUdpCaS1PsuG+zBBXoAmgvm3Fle8W/C1T31sryNFleegZWBgYd6GsJf12Sz9sts7mtcZt478WvkRiTbsrlkUBHMmr3wenGNUSaFcSMnLiwGAXWTUcoU3aQJ6H+T5n1j1QozJlVnkduBeq9jTMY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1583962221189337.21722584379904; Wed, 11 Mar 2020 14:30:21 -0700 (PDT) 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-189-ebNEW8GvMNKyfn7mPCY1BA-1; Wed, 11 Mar 2020 17:30:18 -0400 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 7AB9B1005F71; Wed, 11 Mar 2020 21:30:11 +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 DAA525D9E5; Wed, 11 Mar 2020 21:30:10 +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 37A6186A29; Wed, 11 Mar 2020 21:30:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02BLU5MS025688 for ; Wed, 11 Mar 2020 17:30:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6EA5910EE6D6; Wed, 11 Mar 2020 21:30:05 +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 69F3F10EE78D for ; Wed, 11 Mar 2020 21:30:00 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 6D8258BA53D for ; Wed, 11 Mar 2020 21:30:00 +0000 (UTC) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-451-KrF9WGv7MlOGjhDjEAmWkA-1; Wed, 11 Mar 2020 17:29:57 -0400 Received: by mail-qv1-f54.google.com with SMTP id u17so1613709qvv.7 for ; Wed, 11 Mar 2020 14:29:57 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:acda:e3b3:e49e:9034:e20d]) by smtp.gmail.com with ESMTPSA id f93sm11371616qtd.26.2020.03.11.14.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 14:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583962220; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=j4UisPqrvgnLjNKHGZPkSjPuZLEdrAvx/efL4ghFDJo=; b=JDiH4xdelhd0x8Vwfgwk6XYMfEhG+KEqJaKM8owU9ZRvLA+xdcEpJiHBn/+sNdmpE3kN8N J9EcHVcCBk3PCr4xuzkugM1keVHpk1G645KGkmsT09/gFQQCPm9VMSxznIDlRnj3xwBz6V VkNSIDvtycl6baCvDxPjJGr0NCw1Bpo= X-MC-Unique: ebNEW8GvMNKyfn7mPCY1BA-1 X-MC-Unique: KrF9WGv7MlOGjhDjEAmWkA-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=Z6wBbO6TAUIEdAIwPQSppxpZcWbB+SlUbdHmrBYVLjg=; b=HKq06PyKkqPyLfpgKZ3MkxV5oC6gPxdZbsQd4D7Lc5any7lJu8Cu59/9o90NX9LwnQ dW7ct26lltz3r/7s0LPJKSC5sCXEzHNQgfiwHnmh5HcRK1YySKNmG/7W+CkLUX8QlYAf Po7BBOU/rkw/HyUx9oLPbpFXts4kqbtxOc6sAxBYHyFXgXw1v2T1U/Sc6xvfI18byq97 YivVvcBWORCA1qtLDJI8YRMovB1NAtuEXTXTfNjC9S2dbNmcMFy/0KzDvLj50EUEYVKP z8sfgx78lh1U+T5EX4xT3rNB46rmmqxzHahe5s2uuSIxCF4XQ8sFLC82jU8+I7ekCMVc 8Fuw== X-Gm-Message-State: ANhLgQ2ES16QPr5LWVxHmgQdxHKQQvOGptFGs8cCyFozM1kwVGaz3Y7d 3UmoFZ9VHpmIUTOR27rckhJL7YjUvm8= X-Google-Smtp-Source: ADFU+vvMtle8TQfGbDsnRi7b4SRKhu0a49LcDdIACBmIcJ3/6dKlWE4FOt3U+yo9bsVoaQdwe0AbkQ== X-Received: by 2002:a05:6214:12c1:: with SMTP id s1mr4477172qvv.150.1583962196964; Wed, 11 Mar 2020 14:29:56 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 3/5] conf, qemu: enable NVDIMM support for ppc64 Date: Wed, 11 Mar 2020 18:29:40 -0300 Message-Id: <20200311212942.520394-4-danielhb413@gmail.com> In-Reply-To: <20200311212942.520394-1-danielhb413@gmail.com> References: <20200311212942.520394-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02BLU5MS025688 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.79 on 10.5.11.14 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" Using the 'uuid' element for ppc64 NVDIMM memory added in the previous patch, use it in qemuBuildMemoryDeviceStr() to pass it over to QEMU. Another ppc64 restriction is the necessity of a mem->labelsize, given than ppc64 only support label-area backed NVDIMMs. Finally, we don't want ppc64 NVDIMMs to align up due to the high risk of going beyond the end of file with a 256MiB increment that the user didn't predict. Align it down instead. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 7 +++ src/qemu/qemu_command.c | 7 +++ src/qemu/qemu_domain.c | 47 +++++++++++++++++-- .../memory-hotplug-nvdimm-ppc64.args | 32 +++++++++++++ .../memory-hotplug-nvdimm-ppc64.xml | 5 +- tests/qemuxml2argvtest.c | 4 ++ .../memory-hotplug-nvdimm-ppc64.xml | 5 +- 7 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3ae6c181c2..7f8018fed2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16582,6 +16582,13 @@ virDomainMemoryDefParseXML(virDomainXMLOptionPtr x= mlopt, if (virDomainMemoryTargetDefParseXML(node, ctxt, def) < 0) goto error; =20 + if (def->model =3D=3D VIR_DOMAIN_MEMORY_MODEL_NVDIMM && + ARCH_IS_PPC64(dom->os.arch) && def->labelsize =3D=3D 0) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("label size is required for NVDIMM device")); + goto error; + } + if (virDomainDeviceInfoParseXML(xmlopt, memdevNode, &def->info, flags) < 0) goto error; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9e0334a3e7..76f1247329 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3677,6 +3677,13 @@ qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem, if (mem->labelsize) virBufferAsprintf(&buf, "label-size=3D%llu,", mem->labelsize *= 1024); =20 + if (virUUIDIsValid(mem->uuid)) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(mem->uuid, uuidstr); + virBufferAsprintf(&buf, "uuid=3D%s,", uuidstr); + } + if (mem->readonly) { if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_NVDIMM_UN= ARMED)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 3d3f796d85..2f420a43cd 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -12418,6 +12418,35 @@ qemuDomainGetMemoryModuleSizeAlignment(const virDo= mainDef *def, } =20 =20 +static void +qemuDomainNVDimmAlignSizePseries(virDomainDefPtr def, + virDomainMemoryDefPtr mem) +{ + /* For NVDIMMs in ppc64 in we want to align down the guest + * visible space, instead of align up, to avoid writing + * beyond the end of file by adding a potential 256MiB + * to the user specified size. + * + * The label-size is mandatory for ppc64 as well, meaning that + * the guest visible space will be target_size-label_size. + * + * Finally, target_size must include label_size. + * + * The above can be summed up as follows: + * + * target_size =3D AlignDown(target_size - label_size) + label_size + */ + unsigned long long ppc64AlignSize =3D qemuDomainGetMemorySizeAlignment= (def); + unsigned long long guestArea =3D mem->size - mem->labelsize; + + /* Align down guest_area. 256MiB is the minimum size. */ + guestArea =3D (guestArea/ppc64AlignSize) * ppc64AlignSize; + guestArea =3D MAX(guestArea, ppc64AlignSize); + + mem->size =3D guestArea + mem->labelsize; +} + + int qemuDomainAlignMemorySizes(virDomainDefPtr def) { @@ -12464,8 +12493,14 @@ qemuDomainAlignMemorySizes(virDomainDefPtr def) =20 /* Align memory module sizes */ for (i =3D 0; i < def->nmems; i++) { - align =3D qemuDomainGetMemoryModuleSizeAlignment(def, def->mems[i]= ); - def->mems[i]->size =3D VIR_ROUND_UP(def->mems[i]->size, align); + if (def->mems[i]->model =3D=3D VIR_DOMAIN_MEMORY_MODEL_NVDIMM && + ARCH_IS_PPC64(def->os.arch)) { + qemuDomainNVDimmAlignSizePseries(def, def->mems[i]); + } else { + align =3D qemuDomainGetMemoryModuleSizeAlignment(def, def->mem= s[i]); + def->mems[i]->size =3D VIR_ROUND_UP(def->mems[i]->size, align); + } + hotplugmem +=3D def->mems[i]->size; =20 if (def->mems[i]->size > maxmemkb) { @@ -12494,7 +12529,13 @@ void qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def, virDomainMemoryDefPtr mem) { - mem->size =3D VIR_ROUND_UP(mem->size, qemuDomainGetMemorySizeAlignment= (def)); + if (mem->model =3D=3D VIR_DOMAIN_MEMORY_MODEL_NVDIMM && + ARCH_IS_PPC64(def->os.arch)) { + qemuDomainNVDimmAlignSizePseries(def, mem); + } else { + mem->size =3D VIR_ROUND_UP(mem->size, + qemuDomainGetMemorySizeAlignment(def)); + } } =20 =20 diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/test= s/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args new file mode 100644 index 0000000000..92e6c538fb --- /dev/null +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name QEMUGuest1 \ +-S \ +-machine pseries,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,nvdimm=3Don \ +-m size=3D1048576k,slots=3D16,maxmem=3D1099511627776k \ +-realtime mlock=3Doff \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-numa node,nodeid=3D0,cpus=3D0-1,mem=3D1024 \ +-object memory-backend-file,id=3Dmemnvdimm0,prealloc=3Dyes,mem-path=3D/tmp= /nvdimm,\ +size=3D537001984 \ +-device nvdimm,node=3D0,label-size=3D131072,\ +uuid=3D49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=3Dmemnvdimm0,id=3Dnvdim= m0,slot=3D0 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-usb \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml b/tests= /qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml index 59352d3c52..ae5a17d3c8 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.xml @@ -38,8 +38,11 @@ /tmp/nvdimm - 523264 + 550000 0 +

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 35d413d40b..077f7e7650 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2790,6 +2790,10 @@ mymain(void) DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-align"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-pmem"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-readonly"); + DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE= _NVDIMM, + QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_OBJECT_MEMORY_RAM, + QEMU_CAPS_OBJECT_MEMORY_FILE); =20 DO_TEST("machine-aeskeywrap-on-caps", QEMU_CAPS_AES_KEY_WRAP, diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml b/tes= ts/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml index 59352d3c52..ae5a17d3c8 100644 --- a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml +++ b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.xml @@ -38,8 +38,11 @@ /tmp/nvdimm - 523264 + 550000 0 +
--=20 2.24.1 From nobody Sun May 5 03:18:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1583962220; cv=none; d=zohomail.com; s=zohoarc; b=DSLrAkvcR+aNrxdnZd+OVdECn22sk/OWsboXxe7KEkk3oqGd3tbVhWAgENt270JUHtgHw+fWAkNQT4uNstfBqu9fLN+FSAeyPrPMdJIIvipM7R0ggcYSkJA3+2V9l/k0FJDrSg8U1lnk81MI76bcjPLLeD9GhJZKIk4HtfwgElk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583962220; 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=sQQJ1iq2/xX7k+6KIophx1Foseq5gEkvV+jzSkDdovU=; b=hY3ArSKQPPbeGHz/L87hMUTuum8/fJag4rz8Gj7SxK3D7xmeqbSVMUS+NfLslJm6bB91uvlSTQNKWKyja8hOXiF12V3FoXJxxvzBPjgzvvGsCuAP2OtEpE3/HiiXBTDE0k55qKw8vUtWpttM/1bHjBGorRRJ84/2vfiRxdVGcTg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1583962220048844.8116826588553; Wed, 11 Mar 2020 14:30:20 -0700 (PDT) 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-466-vTgpbKRePDGKkP55OeCXxQ-1; Wed, 11 Mar 2020 17:30:16 -0400 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 9F35A18AB2D1; Wed, 11 Mar 2020 21:30:10 +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 3B6CB5DA83; Wed, 11 Mar 2020 21:30:10 +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 9E9BB86A24; Wed, 11 Mar 2020 21:30:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02BLU4qO025680 for ; Wed, 11 Mar 2020 17:30:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1C63811514C; Wed, 11 Mar 2020 21:30:04 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 181E5115145 for ; Wed, 11 Mar 2020 21:30:02 +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 37C558007A4 for ; Wed, 11 Mar 2020 21:30:02 +0000 (UTC) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-104-nC0s3S0WMUWa4igmaRnMDw-1; Wed, 11 Mar 2020 17:29:59 -0400 Received: by mail-qt1-f179.google.com with SMTP id e20so2772757qto.5 for ; Wed, 11 Mar 2020 14:29:58 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:acda:e3b3:e49e:9034:e20d]) by smtp.gmail.com with ESMTPSA id f93sm11371616qtd.26.2020.03.11.14.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 14:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583962218; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=sQQJ1iq2/xX7k+6KIophx1Foseq5gEkvV+jzSkDdovU=; b=fAREovGql+wQP/t3elkkG+NiEjn9rFJU9xv/0YeRHripBq7RxuEouc7bDHVffK6RMshtRp NaMCJ00sBt8PBcUoZu9D3Ep9Ylw7CzT5HCbjrkEa3wUnBQru/iW1Tvz1ktvtlOsQlHmPAn 7teqzrGgA0Wy7G2ELC63mW2nap766og= X-MC-Unique: vTgpbKRePDGKkP55OeCXxQ-1 X-MC-Unique: nC0s3S0WMUWa4igmaRnMDw-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=5cM/HZEDJUzul3/SHbgQFbXR0LFdNAni64l27aymEuo=; b=R6gXeBnsG3esAlcVtUfGoFneu/aFrZaRV0fls588E98v/TG5jNxyMZVriu64ObFWuf h95i3ZzyZ7ADpa3DC7fawZE+Voy5mL1muFWQRFb5hHaZD+bv5pnvjqwFe7DxH3Ry6b/d iwifgJ02dvfv0VTgtmYyK3ULgvmlZNfo6BAn0/BJCnfnKAyQVcyArIZX0PSA9eiL5jCo 9mrVI7Rx+LpxzqAfCI7bcvF3II+aQ5tt8TUW2BHixc7VgH1Yk9N+8ebVf5NiP+YVECXi fvths3tHUn5LHd7A8CDVkqSyAJtV6tXy9arYAQcP854h6PmQbihTHeiIzprcoMPTre59 hoLQ== X-Gm-Message-State: ANhLgQ1PoTNwP5Umf8KK6+l6cfwaXYKRSXmSNU86JhJeWKbFcFe7245g WPHY1fnpUxZiZYHeXcn1xBWavTTv3Ak= X-Google-Smtp-Source: ADFU+vt8bnv76C9tV0oNmrIao/FlzLcEpFQ3NU+Jp0CrowFbmGjObCmqfixqGUwaVhCmpU8DtvbYdg== X-Received: by 2002:ac8:3805:: with SMTP id q5mr4094779qtb.46.1583962198404; Wed, 11 Mar 2020 14:29:58 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 4/5] formatdomain.html.in: document NVDIMM 'label' requirement for pSeries Date: Wed, 11 Mar 2020 18:29:41 -0300 Message-Id: <20200311212942.520394-5-danielhb413@gmail.com> In-Reply-To: <20200311212942.520394-1-danielhb413@gmail.com> References: <20200311212942.520394-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02BLU4qO025680 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.79 on 10.5.11.14 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" Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index e3bf33f873..142cd17205 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -9026,12 +9026,13 @@ qemu-kvm -net nic,model=3D? /dev/null
label

- For NVDIMM type devices one can optionally use - label and its subelement size - to configure the size of namespaces label storage - within the NVDIMM module. The size element - has usual meaning described + For NVDIMM type devices one can use label and i= ts + subelement size to configure the size of + namespaces label storage within the NVDIMM module. The + size element has usual meaning described here. + label is mandatory for pSeries guests and optio= nal + for all other architectures. For QEMU domains the following restrictions apply:

    --=20 2.24.1 From nobody Sun May 5 03:18:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1583962221; cv=none; d=zohomail.com; s=zohoarc; b=c8rhtp8a4EFGa8iDjD921DprerOaQV893BC5+cGG41EbfmZ+OST6qiQ+RbDMn+ADEddeHK9oerhQZcustuU/EtJfHIjWpxvXV3n2gQjhJEE7UEAajIDFxJfNT0iXQSGKz8mDiwWRL68t03KmMHJLZmNHtYjcz/nwKcyghoxQVhY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583962221; 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=hOkGPDsN+RGd4UG/4R1u0vQ63r3AmcLDcnC8T4wMyec=; b=mYQ8E8XAmlkU2fAzhqVnhRM4gsMw22ltGRHfhXmPzEu/Y2vFgWLp0jTNkt/IK4Uzsw9L7rH1e88/PjNyV9Pp4Sacu5hNK/ncnR2nQhSiHERangC2RlyQUs/wYf8+ALO+//QmnDCwtyBRf2eaie0C3WXGb2mTVX9kEf+AYN0e8HQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 158396222187983.14774270778184; Wed, 11 Mar 2020 14:30:21 -0700 (PDT) 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-464-5b35vlfZPeOE6E3G6SqKnw-1; Wed, 11 Mar 2020 17:30:15 -0400 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 0A1CE18AB2C3; Wed, 11 Mar 2020 21:30:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B32FC388; Wed, 11 Mar 2020 21:30:09 +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 1EA02184367E; Wed, 11 Mar 2020 21:30:08 +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 02BLU3QO025671 for ; Wed, 11 Mar 2020 17:30:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2FD822166B29; Wed, 11 Mar 2020 21:30:03 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29CD22166B27 for ; Wed, 11 Mar 2020 21:30:03 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 06EF1800646 for ; Wed, 11 Mar 2020 21:30:03 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-421-QkpZ3YEUNq6X-bqHPkkv-w-1; Wed, 11 Mar 2020 17:30:00 -0400 Received: by mail-qt1-f194.google.com with SMTP id l13so2751278qtv.10 for ; Wed, 11 Mar 2020 14:30:00 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:acda:e3b3:e49e:9034:e20d]) by smtp.gmail.com with ESMTPSA id f93sm11371616qtd.26.2020.03.11.14.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 14:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583962220; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=hOkGPDsN+RGd4UG/4R1u0vQ63r3AmcLDcnC8T4wMyec=; b=ejHKoa7vsPmRlyRG7q3imHAbqMbPMZVrgcNfTV/TMqlsKby1fQl3sGz7e7kchR0K8rQMC0 Wqu4JC6NaGbiVvIwJlTaQQQUw7+W/jepIiqpTZDpcsj85uDJ163IGp1MluD9m10IVPh4+B SwtkoRIh/z/LOba2mVJc9BH8h7g6KVM= X-MC-Unique: 5b35vlfZPeOE6E3G6SqKnw-1 X-MC-Unique: QkpZ3YEUNq6X-bqHPkkv-w-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=5z9Jv5/QyLf9jk2CPCVMywgQNtUoZ0VD9L4m3wDvQ78=; b=FEBu+Itw2svVZgF7/FAP/qlHDkSMM19neRaHEbrInZ3mEOKifb9exzocragHC3MZE0 r4hE7lo4PylOd+G/HQd9Lyv1nEqw1CmkGmpNfNva4z74Hr8aoT/YJt87TkrBQ3h3LQMy o1ayeRBV3X9eLcvLdzXRq+qtUSJdp1xrK2fWyKnUsCHPC4x64C2HR7HzlzX3gW1kYNA4 zJC4KaLd8C874cGa/uMfNyq8SZiOlGsrdOo0YyBVRdmMbTzLIPtESCNWJUYWxL6Ut95y fXNTa939pFwyiK5A2hIsFkDx55ta7oCY+hyrG3Uez18A13QR/U7l+VKYAftO4rjo9Cf4 V0YQ== X-Gm-Message-State: ANhLgQ2HfC+7QUl1ggwiDehhwsQPj8kmy8k+FmZrNQhUwRm3aMjYI0lC /4z7T3ntufc7JUGoJWFFCtl1svpMo20= X-Google-Smtp-Source: ADFU+vss7H+bqEZsgh9Uwoud0krhJA/3im01yhI/dmMF8dS3FmVgjCQAe7IikH7PGCpjvrHQbP3ZAw== X-Received: by 2002:aed:23aa:: with SMTP id j39mr4493554qtc.42.1583962200045; Wed, 11 Mar 2020 14:30:00 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 5/5] news.xml: document the new NVDIMM support for Pseries guests Date: Wed, 11 Mar 2020 18:29:42 -0300 Message-Id: <20200311212942.520394-6-danielhb413@gmail.com> In-Reply-To: <20200311212942.520394-1-danielhb413@gmail.com> References: <20200311212942.520394-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02BLU3QO025671 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 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" Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 7fd88f9998..6eb222cdb7 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,17 @@
    + + + qemu: NVDIMM support for pSeries guests + + + QEMU 5.0 implements NVDIMM memory support for pSeries guests. Th= is + is done by adding an 'uuid' element in the memory XML, which can + either be provided in the XML or, if ommited, generated + automatically. + +
    --=20 2.24.1