From nobody Sun Feb 8 05:41:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.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 207.211.31.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=1583434291; cv=none; d=zohomail.com; s=zohoarc; b=DMlnVXisNu/RIplKiCP9B6Y5Ffojo0P/4yP50Nb9exziFcp5aPA1e2svMYBGzy5fPme/GHwqvaInqlrexf4RZ9M5vlm6WQpnoFBpc3WZyaJYyDZ7OWJ3pU3IrU1bouZ1MKHIbmi4fpiOD0+JonXRnUfXkRWEEQ6OLVVRp7ORFPk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583434291; 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=syfRbYVu7OziPy3CLPaLo8GmcdZekOqAYUBOvBHYa7M=; b=HdEts/PkX8d3u27pPVSC23I8pEomJ92oAJt3BbUB4lX4OTuRr7xNMYhDaLtTJVSuqUKaWe/r3Z/AEyBap1e9n8z16n1zsIIdKMUQZrwy1KBMWNv9KlBP082pqDW34hHY8yQum5maxw4RpoSi0v4apDUtKidzG26BMxoOOSHRqbk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1583434291613353.3303728601171; Thu, 5 Mar 2020 10:51:31 -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-63-vg8tgx1VNg6ltMJfMUvHLw-1; Thu, 05 Mar 2020 13:51:28 -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 D48F6DBAC; Thu, 5 Mar 2020 18:51:21 +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 ADE805D9CD; Thu, 5 Mar 2020 18:51:21 +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 6361A5FBEF; Thu, 5 Mar 2020 18:51:21 +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 025Ip7SS000949 for ; Thu, 5 Mar 2020 13:51:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0C26D2166B27; Thu, 5 Mar 2020 18:51:07 +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 0600C2166B28 for ; Thu, 5 Mar 2020 18:51:06 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 4FE30101A55E for ; Thu, 5 Mar 2020 18:51:06 +0000 (UTC) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-200-BrcIiZU5M2ajVOLwrYfihg-1; Thu, 05 Mar 2020 13:51:04 -0500 Received: by mail-qk1-f193.google.com with SMTP id y126so2942740qke.4 for ; Thu, 05 Mar 2020 10:51:03 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:77f1:bfee:4b65:7d38:7648]) by smtp.gmail.com with ESMTPSA id i26sm16182868qkl.66.2020.03.05.10.50.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 10:50:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583434290; 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=syfRbYVu7OziPy3CLPaLo8GmcdZekOqAYUBOvBHYa7M=; b=Muj4+a1ObqS3XfP8gQuc46lRmdoCB5iKpg3g6FxzbTLGA4I7x9i32wehIuwt0NZQEK1fUe lXGS4sXrravN2stscG7oshXSEfWQXbvxKLfSY3TkOJvuY43jADhl22HqXxA7ruaKUNm6tf aO9XMQwpZ1wQj0jS9n7SV+64E0HVQ24= X-MC-Unique: vg8tgx1VNg6ltMJfMUvHLw-1 X-MC-Unique: BrcIiZU5M2ajVOLwrYfihg-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=2cQ76NRGBgcrC5hrB5xXKTG0xjzbJOZWbDiJwWV9cAA=; b=qXtSp0aree3uHBt4bvbiHFDVq6DceMPEdD0jiu8GFw9qEl17PhArtuVFOQa+5tjrsM Nc0ppMXJuveyYE4vjf7dYn3R+1D/A5LqweUksg0YKxBASs8R7jpwoDawKOi1WwTSmBN9 tBOYs/cJlKhUJPaHjL6SWYFIATkmlsimAzeZCW4j0rhiEnlWRTFfH1vft1La0fl1J4At yURHE3FFgdqPPtKGCbakfUHKaN8FQfU0S9/dWH95enZCpnZiH/Jh/3FKxVYUlduYdIIV 5hvP3Ht460svQOmcg/CqBfahJahG/i8nH9+GhPS87THhlmLQMClpZCRpYyrQ5935L0za FrFA== X-Gm-Message-State: ANhLgQ0RNyAsDeZjDU4kuEepdSFCaQYA3qpf/Bb6fK1aLXFT0nndgVfI 86OQ5df6kAlV7k+sHp6xHFE0imhIEJI= X-Google-Smtp-Source: ADFU+vt7M1G6e22iDJoE4ssmcm9WIJdgf+xJoSyL8wL+vk1pIhEYq7cnCSWHGaUjZDLcRrYCLbWFEA== X-Received: by 2002:a05:620a:2239:: with SMTP id n25mr9487433qkh.147.1583434259373; Thu, 05 Mar 2020 10:50:59 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 2/4] qemu_command.c: enable NVDIMM support for ppc64 Date: Thu, 5 Mar 2020 15:50:45 -0300 Message-Id: <20200305185047.1097648-3-danielhb413@gmail.com> In-Reply-To: <20200305185047.1097648-1-danielhb413@gmail.com> References: <20200305185047.1097648-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 025Ip7SS000949 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 new 'uuid' element for NVDIMM memory added in the previous patch, let's enable NVDIMM support for ppc64 guests. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 7 ++++ .../memory-hotplug-nvdimm-ppc64.args | 32 +++++++++++++++++++ tests/qemuxml2argvtest.c | 4 +++ 3 files changed, 43 insertions(+) create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args 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/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/test= s/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args new file mode 100644 index 0000000000..160c5f1131 --- /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=3D536870912 \ +-device nvdimm,node=3D0,uuid=3D49545eb3-75e1-2d0a-acdd-f0294406c99e,\ +memdev=3Dmemnvdimm0,id=3Dnvdimm0,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/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, --=20 2.24.1