From nobody Sun Feb 8 17:21:24 2026 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=linux.ibm.com 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 1580505551754887.9643032732752; Fri, 31 Jan 2020 13:19:11 -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-330-Zklm72-zOzOAt8uuvWxpsA-1; Fri, 31 Jan 2020 16:19:08 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC11C18C8C22; Fri, 31 Jan 2020 21:19: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 862EB91851; Fri, 31 Jan 2020 21:19: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 4324E85CE8; Fri, 31 Jan 2020 21:19:02 +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 00VLHpOV031409 for ; Fri, 31 Jan 2020 16:17:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9D4CF10A50E4; Fri, 31 Jan 2020 21:17:51 +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 983AB1005E32 for ; Fri, 31 Jan 2020 21:17:50 +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 8481485A30F for ; Fri, 31 Jan 2020 21:17:50 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-240-p4FWyhXeNwObXA8aWZJpIA-1; Fri, 31 Jan 2020 16:17:48 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00VL6LoC068316; Fri, 31 Jan 2020 16:17:47 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2xvpq752cq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jan 2020 16:17:47 -0500 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 00VL8DE1076333; Fri, 31 Jan 2020 16:17:46 -0500 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 2xvpq752ck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jan 2020 16:17:46 -0500 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 00VL5sIj028823; Fri, 31 Jan 2020 21:17:46 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma05wdc.us.ibm.com with ESMTP id 2xrda7qk6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jan 2020 21:17:46 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00VLHjLg12321366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jan 2020 21:17:45 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B760C12405A; Fri, 31 Jan 2020 21:17:45 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9FEEA124058; Fri, 31 Jan 2020 21:17:45 +0000 (GMT) Received: from newfield.pok.ibm.com (unknown [9.47.158.66]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 31 Jan 2020 21:17:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580505550; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc: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=Xspkm5qNSX4hjl2Zd6YL+eGUKrr/ZgtvliVw8EyLrT0=; b=JaxJ6lIkp+tPLvtvKkNhm0qhf/pRzqFSPdrYPhsdb0iiitpzDE560GX6TzlaSAeqOt6JZL Rkfx2uLM8Ct5yfa7UqXLH6amSepXPIyTvEkLot1VFRUVjyt3eIdsb2neHLQ1OZgfuh0uPp wRkRy3hfAq2UjfDoTNHHk6paaTutNjw= From: Stefan Berger To: libvir-list@redhat.com Subject: [PATCH 5/5] tests: Add test for domain XML with tpm-spapr TPM device model Date: Fri, 31 Jan 2020 16:17:43 -0500 Message-Id: <20200131211743.121606-6-stefanb@linux.ibm.com> In-Reply-To: <20200131211743.121606-1-stefanb@linux.ibm.com> References: <20200131211743.121606-1-stefanb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-31_06:2020-01-31, 2020-01-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=1 priorityscore=1501 malwarescore=0 mlxscore=0 impostorscore=0 adultscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1911200001 definitions=main-2001310173 X-MC-Unique: p4FWyhXeNwObXA8aWZJpIA-1 X-MC-Unique: Zklm72-zOzOAt8uuvWxpsA-1 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 00VLHpOV031409 X-loop: libvir-list@redhat.com Cc: aik@ozlabs.ru, marcandre.lureau@redhat.com, Stefan Berger , david@gibson.dropbear.id.au 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.15 X-Mimecast-Spam-Score: 2 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This patch adds a test case for domain XML with the tpm-spapr TPM device model. Signed-off-by: Stefan Berger --- .../tpm-emulator-spapr.ppc64-latest.args | 45 ++++++++++++++ tests/qemuxml2argvdata/tpm-emulator-spapr.xml | 60 +++++++++++++++++++ tests/qemuxml2argvtest.c | 4 ++ 3 files changed, 109 insertions(+) create mode 100644 tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.= args create mode 100644 tests/qemuxml2argvdata/tpm-emulator-spapr.xml diff --git a/tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.args b/= tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.args new file mode 100644 index 0000000000..f4c8a062c1 --- /dev/null +++ b/tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.args @@ -0,0 +1,45 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-TPM-VM \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-TPM-VM/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-TPM-VM/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-TPM-VM/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name guest=3DTPM-VM,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-TPM-VM/master-key.aes \ +-machine pseries-5.0,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu POWER9 \ +-m 2048 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 11d7cd22-da89-3094-6212-079a48a309a1 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot menu=3Don,strict=3Don \ +-device pci-ohci,id=3Dusb,bus=3Dpci.0,addr=3D0x1 \ +-device spapr-vscsi,id=3Dscsi0,reg=3D0x00002000 \ +-device spapr-vscsi,id=3Dscsi1,reg=3D0x00003000 \ +-drive file=3D/tmp/scsidisk.img,format=3Draw,if=3Dnone,id=3Ddrive-scsi1-0-= 0-0 \ +-device scsi-hd,bus=3Dscsi1.0,channel=3D0,scsi-id=3D0,lun=3D0,\ +device_id=3Ddrive-scsi1-0-0-0,drive=3Ddrive-scsi1-0-0-0,id=3Dscsi1-0-0-0,b= ootindex=3D1 \ +-chardev pty,id=3Dcharserial0 \ +-device spapr-vty,chardev=3Dcharserial0,id=3Dserial0,reg=3D0x30000000 \ +-chardev pty,id=3Dcharserial1 \ +-device spapr-vty,chardev=3Dcharserial1,id=3Dserial1,reg=3D0x30001000 \ +-tpmdev emulator,id=3Dtpm-tpm0,chardev=3Dchrtpm \ +-chardev socket,id=3Dchrtpm,path=3D/dev/test \ +-device tpm-spapr,tpmdev=3Dtpm-tpm0,id=3Dtpm0,reg=3D0x00005000 \ +-global spapr-nvram.reg=3D0x4000 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/tpm-emulator-spapr.xml b/tests/qemuxml2= argvdata/tpm-emulator-spapr.xml new file mode 100644 index 0000000000..f9cda19727 --- /dev/null +++ b/tests/qemuxml2argvdata/tpm-emulator-spapr.xml @@ -0,0 +1,60 @@ + + TPM-VM + 11d7cd22-da89-3094-6212-079a48a309a1 + 2097152 + 512288 + 1 + + hvm + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a36183bf34..5691317bad 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -738,6 +738,9 @@ mymain(void) # define DO_TEST_CAPS_VER(name, ver) \ DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) =20 +# define DO_TEST_CAPS_LATEST_PPC64(name) \ + DO_TEST_CAPS_ARCH_LATEST(name, "ppc64") + # define DO_TEST_CAPS_ARCH_LATEST_FAILURE(name, arch) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, \ ARG_FLAGS, FLAG_EXPECT_FAILURE) @@ -2193,6 +2196,7 @@ mymain(void) DO_TEST_CAPS_LATEST("tpm-emulator"); DO_TEST_CAPS_LATEST("tpm-emulator-tpm2"); DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-enc"); + DO_TEST_CAPS_LATEST_PPC64("tpm-emulator-spapr"); =20 DO_TEST_PARSE_ERROR("pci-domain-invalid", NONE); DO_TEST_PARSE_ERROR("pci-bus-invalid", NONE); --=20 2.17.1