From nobody Tue May 7 01:10:39 2024 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594192775; cv=none; d=zohomail.com; s=zohoarc; b=AxQAF6KUBF4rvSxJf5kpmIfwWRI58tXapE6cm15RBhysBdYZUIWYO4yf1wFtJHwNbe27DHjSGBgoviOqp7hbspdk8v7NPvqoxKVfbh6BL8jV4D8F77IUdHaoIIGEu3Eeh2S3nKhtezyYdl01XOtG2nJF5A0UwcmpjsOaStkcHo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594192775; 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=tCkGK4cr23kXeR+pApfK1oB6TDAcbobEp6UZ3G7Vucg=; b=kT/LVNUqMFo1Sos5Fd793XyWCioUKdBppd69FjIJTqmDgGR3iu2Keoxz7+eICj3IBe3lZb3YX41MGbpTfMGCefoeBkWubbrLGc2AHHYf7DXUEviwurLZjKgPrN2/jf/zPnbbhAqtXxhnhfnmrumxoK/+2VqrrS9jUzgn9KI8o2A= 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=pass 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 1594192775375740.9893367442502; Wed, 8 Jul 2020 00:19:35 -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-71-xhcPpJYcPFew6tV5nSk5Ng-1; Wed, 08 Jul 2020 03:19:31 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A26E7800D5C; Wed, 8 Jul 2020 07:19:25 +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 29A2D5C1B2; Wed, 8 Jul 2020 07:19:24 +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 978541809547; Wed, 8 Jul 2020 07:19:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0687JK8H006081 for ; Wed, 8 Jul 2020 03:19:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1917519D61; Wed, 8 Jul 2020 07:19:20 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7979019C4F for ; Wed, 8 Jul 2020 07:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594192774; 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=tCkGK4cr23kXeR+pApfK1oB6TDAcbobEp6UZ3G7Vucg=; b=K3CELNRmts4Twtb1mCxKzTb8lc/kYhtSgy2El1VErYY8Dvf/eXs4EWi0Jp19xGd9OOqEAz V8+TgJBelz7Mzb6q4KOKebuUjGiUIRASnhx72T5nYpDVnSQnDeb94Ndm4Rc3AD/hlicEg1 6faP9GFHUjhiqa80TTYRJTj5Ju9UWLc= X-MC-Unique: xhcPpJYcPFew6tV5nSk5Ng-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] qemuBuildMemoryBackendProps: Use boolean type for 'pmem' property Date: Wed, 8 Jul 2020 09:19:15 +0200 Message-Id: <05b329b0f90da6c5ac0ba15c7a22782bb820be23.1594192755.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.16 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" Commit 82576d8f35e used a string "on" to enable the 'pmem' property. This is okay for the command line visitor, but the property is declared as boolean in qemu and thus it will not work when using QMP. Modify the type to boolean. This changes the command line, but fortunately the command line visitor in qemu parses both 'yes' and 'on' as true for the property. https://bugzilla.redhat.com/show_bug.cgi?id=3D1854684 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 2 +- .../memory-hotplug-nvdimm-pmem.x86_64-latest.args | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0c4c77cf8c..c32db06e34 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3187,7 +3187,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendP= rops, "with this QEMU binary")); return -1; } - if (virJSONValueObjectAdd(props, "s:pmem", "on", NULL) < 0) + if (virJSONValueObjectAdd(props, "b:pmem", true, NULL) < 0) return -1; } diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-lates= t.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.ar= gs index 5dfba9b50a..00a78baa92 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args @@ -19,7 +19,7 @@ file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -smp 2,sockets=3D2,dies=3D1,cores=3D1,threads=3D1 \ -numa node,nodeid=3D0,cpus=3D0-1,mem=3D214 \ -object memory-backend-file,id=3Dmemnvdimm0,prealloc=3Dyes,mem-path=3D/tmp= /nvdimm,\ -share=3Dno,size=3D536870912,pmem=3Don \ +share=3Dno,size=3D536870912,pmem=3Dyes \ -device nvdimm,node=3D0,memdev=3Dmemnvdimm0,id=3Dnvdimm0,slot=3D0 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ --=20 2.26.2