From nobody Tue May 14 14:12:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=nutanix.com ARC-Seal: i=1; a=rsa-sha256; t=1609727579; cv=none; d=zohomail.com; s=zohoarc; b=OIFTQZBHxMuCoqqUPt5UFdH/OruL1/7mnTPSCMzxTXJOSCwAH8MRsR+RNZ+Kdd4Ypq5zZ4GfAItLyKLaVfmRROXUU/PQwzQZd5D5eyHYRbdceqy00diORUBILlTtn8VIFooVHtM1/B+x8jGEkJNaTgsTfjvJd08jLePvSLB1dxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609727579; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Gt5yIaNKisYglFf694ZUOmSp2OwGCosNnehAfFbhxKs=; b=N4e4JXyJz9qjFrw9hZl29X1hVbPWwrEXTadhk0PdJ32287Q7ykQciEsfzTRK78ZDL6OulvGJGerE9VDENq4tFR69lSPiRW1sT4fSGVAWclvR6lOd4D592Pt789pR2HDefek04GLkeOKUKXKgu67gL5W6gAW4dK9oxRrBKjj6h1E= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1609727579535355.4486668448375; Sun, 3 Jan 2021 18:32:59 -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-164-Vib1xYOiNlCrnXMhjbp7hQ-1; Sun, 03 Jan 2021 21:32:56 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 225171842142; Mon, 4 Jan 2021 02:32:51 +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 9BB081002C10; Mon, 4 Jan 2021 02:32:50 +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 98FB14A7C6; Mon, 4 Jan 2021 02:32:48 +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 1042Wksp023713 for ; Sun, 3 Jan 2021 21:32:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0DEF39D482; Mon, 4 Jan 2021 02:32:46 +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 06C4C7C52 for ; Mon, 4 Jan 2021 02:32:43 +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 2553D8007D9 for ; Mon, 4 Jan 2021 02:32:43 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-Es5M2QwNPs-KKlscf37W6A-1; Sun, 03 Jan 2021 21:32:40 -0500 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1042R4lt023825; Sun, 3 Jan 2021 18:32:37 -0800 Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108]) by mx0a-002c1b01.pphosted.com with ESMTP id 35ts93t4fg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 03 Jan 2021 18:32:37 -0800 Received: from DM6PR02MB6250.namprd02.prod.outlook.com (2603:10b6:5:1f5::26) by DM6PR02MB6730.namprd02.prod.outlook.com (2603:10b6:5:220::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Mon, 4 Jan 2021 02:32:35 +0000 Received: from DM6PR02MB6250.namprd02.prod.outlook.com ([fe80::6947:5670:b8f3:377b]) by DM6PR02MB6250.namprd02.prod.outlook.com ([fe80::6947:5670:b8f3:377b%7]) with mapi id 15.20.3721.024; Mon, 4 Jan 2021 02:32:35 +0000 Received: from eiichi-tsukata.ubvm.nutanix.com (192.146.154.244) by BYAPR07CA0008.namprd07.prod.outlook.com (2603:10b6:a02:bc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19 via Frontend Transport; Mon, 4 Jan 2021 02:32:34 +0000 X-MC-Unique: Vib1xYOiNlCrnXMhjbp7hQ-1 X-MC-Unique: Es5M2QwNPs-KKlscf37W6A-1 From: Eiichi Tsukata To: libvir-list@redhat.com, stefanb@linux.vnet.ibm.com, jferlan@redhat.com, jtomko@redhat.com Subject: [PATCH v2] conf: Add support for keeping TPM emulator state Date: Mon, 4 Jan 2021 02:31:59 +0000 Message-Id: <20210104023159.181913-1-eiichi.tsukata@nutanix.com> X-Originating-IP: [192.146.154.244] X-ClientProxiedBy: BYAPR07CA0008.namprd07.prod.outlook.com (2603:10b6:a02:bc::21) To DM6PR02MB6250.namprd02.prod.outlook.com (2603:10b6:5:1f5::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8394e3fa-c43c-4777-69f0-08d8b058fef3 X-MS-TrafficTypeDiagnostic: DM6PR02MB6730: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Oob-TLC-OOBClassifiers: OLM:364 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: 5ViCw5/L8p78dT+xwgRmSmXqCJNB6I0lDiTnXqTtFim6SzGpopLY8Ur8rt6u8HaTl/r2VR8KcMa9eKdvM6Kt4QQgaM+qznW4gQh+RycA4vkNoDudstZWJYeOkeKbwtosea5DA0ySW8o82FUSAwPKZK1n4a+c2L6lgAJATuGWlbL8MGq98T3LTvog2JkehZ8s10WSUDZf6++1795PqvWlRaOx+2k/X9MjTT2cF+x66CvK8HF/GHff03c4WDejNw0bGKHBnFtO9cuV0bnqPmB+ravCiI/bHg1nkKgz2dyCq7uLF/CXvmMQ5sSo0HsFie5Q53RgLPB9e6ASrSbxghgvV/R1Drb/d8lXseqIrfD2ARfMUztdg8HuVSmjk8AxUeb+wLAoFutu9n82gR2IPUZ78g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR02MB6250.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(366004)(136003)(346002)(39850400004)(396003)(16526019)(6486002)(36756003)(186003)(8676002)(26005)(83380400001)(6666004)(30864003)(4326008)(44832011)(52116002)(8936002)(86362001)(5660300002)(1076003)(956004)(66946007)(66556008)(316002)(66476007)(7696005)(107886003)(2906002)(478600001)(2616005); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?ZrDkzASrNKhAx2IJgb/v0h3IFMAXlUyjtbOYjwIGb51hF/13RhG1L3W+biOR?= =?us-ascii?Q?jq1/5waqZceZ6T2so4V9S8KJkQulI7m7K3NqyC99zXKqeIuCz8cONANYinlL?= =?us-ascii?Q?dsB+i6Fblx+zWmH12aZgQZkaBqXgO1OucEWgsu+0bds8qwhW+fSlni9jFZa9?= =?us-ascii?Q?nYbgrzTDNyBQvGd1d/dgoJAinvVOz1J7ZmnBVqn9zJzILdSCibfcSbz+iqss?= =?us-ascii?Q?9FxrGnOFqQ1TN54WGODdMwFQGlbgxmpUreCr0XnNpD0CMHkCItkoCOtuxwNs?= =?us-ascii?Q?GqRLdZb4yYqtRN0Yu0gCBL5cJ/bxFtvT5qX+RnPH8aQYqFXssNGr4APRce2V?= =?us-ascii?Q?/tvvM6P7UHsWSe0BN20QJpq8c/2xufeV757ubj1DFytqbQlONbCgBBwDt2pR?= =?us-ascii?Q?E6HjtBvcH9jIpBuSmmHThHeRCa3NI7W6zotsmCZzFn8xW8zDn0n+tO1VZK3K?= =?us-ascii?Q?2jJrvK87dy7kiL17gwhrSileGLca0ZvKOwT4UPFcB+0JnEOnvG1/fHonb+Fs?= =?us-ascii?Q?2Ee7InwnSCjKUPcGGeVHwWwJqdcZEl4/a8QpKZg0pDyaTM+wnP9ZkYYeqLw7?= =?us-ascii?Q?aasTGhKEt30hMpjKjqaCZL51tBurWp0HsgFjm7g0mt0HWx3ubwUu5Sztz3mH?= =?us-ascii?Q?7m/mldPpyZusH0JYFbN0PZZgoU+X1QtJhefn0Ief/bt0iyCukDLzCY1HMNj2?= =?us-ascii?Q?J0YTLm4oZOdhLAYZXzFkeM7R2r+mYFd9C9h84yqVZOeEkarOp4mKeAfi9ebj?= =?us-ascii?Q?yl0+i80GWWaeY21JsVAsCwktYVzSCHbTA5Vo13ezBW43pwe7DuRxzotHTUg5?= =?us-ascii?Q?5Zpvx8RPxKeThDtqPqNwCXYgLv8PCHATDqEDlFvB3fdQnkJSHxiC/pPZ5UVe?= =?us-ascii?Q?NghSsB5/7AoJQAUKUsxEqph5rO4hVXc9ONAndQhVhaeD5DX6HATGvwJS04R2?= =?us-ascii?Q?0fPjtwjZAOUsZd/4HdgQye4qA4anQJNwiwZH4bulPQfafRHT7hniynr1RbCX?= =?us-ascii?Q?aQPZ?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-AuthSource: DM6PR02MB6250.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2021 02:32:35.2791 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-Network-Message-Id: 8394e3fa-c43c-4777-69f0-08d8b058fef3 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9tgV3VwTDdWG/A419Y3OBOK3jovo6rn0IVNjbQT3CnixEfu1zk2Nkeb+rqLUOfgH4wRngCowBIhS/xsxiZ8w6SacCtrvRbh8Forzyna/YX8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB6730 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-03_16:2020-12-31, 2021-01-03 signatures=0 X-Proofpoint-Spam-Reason: safe X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Eiichi Tsukata 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.22 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 Content-Type: text/plain; charset="utf-8" Currently, swtpm TPM state file is removed when a transient domain is powered off or undefined. When we store TPM state on a shared storage such as NFS and use transient domain, TPM states should be kept as it is. Add per-TPM emulator option `persistent_sate` for keeping TPM state. This option only works for the emulator type backend and looks as follows: Signed-off-by: Eiichi Tsukata Reviewed-by: Stefan Berger Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik --- docs/formatdomain.rst | 7 ++++ docs/schemas/domaincommon.rng | 12 ++++++ src/conf/domain_conf.c | 21 ++++++++++ src/conf/domain_conf.h | 1 + src/qemu/qemu_tpm.c | 3 +- ...pm-emulator-tpm2-pstate.x86_64-latest.args | 38 +++++++++++++++++++ .../tpm-emulator-tpm2-pstate.xml | 30 +++++++++++++++ tests/qemuxml2argvtest.c | 1 + ...tpm-emulator-tpm2-pstate.x86_64-latest.xml | 37 ++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 10 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-= latest.args create mode 100644 tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_6= 4-latest.xml diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 512939679b..87bbd1a4f1 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -6986,6 +6986,13 @@ Example: usage of the TPM Emulator - '1.2' : creates a TPM 1.2 - '2.0' : creates a TPM 2.0 =20 +``persistent_state`` + The ``persistent_state`` attribute indicates whether 'swtpm' TPM state = is + kept or not when a transient domain is powered off or undefined. This + option can be used for preserving TPM state. By default the value is ``= no``. + This attribute only works with the ``emulator`` backend. The accepted v= alues + are ``yes`` and ``no``. + ``encryption`` The ``encryption`` element allows the state of a TPM emulator to be encrypted. The ``secret`` must reference a secret object that holds the diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 795b654feb..d7cedc014c 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4780,6 +4780,18 @@ + + + + + + yes + no + + + + + =20 diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 23415b323c..82c3a68347 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13178,6 +13178,12 @@ virDomainSmartcardDefParseXML(virDomainXMLOptionPt= r xmlopt, * * * + * + * Emulator persistent_state is supported with the following: + * + * + * + * */ static virDomainTPMDefPtr virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt, @@ -13193,6 +13199,7 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlop= t, g_autofree char *backend =3D NULL; g_autofree char *version =3D NULL; g_autofree char *secretuuid =3D NULL; + g_autofree char *persistent_state =3D NULL; g_autofree xmlNodePtr *backends =3D NULL; =20 def =3D g_new0(virDomainTPMDef, 1); @@ -13265,6 +13272,18 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlo= pt, } def->data.emulator.hassecretuuid =3D true; } + + persistent_state =3D virXMLPropString(backends[0], "persistent_sta= te"); + if (persistent_state) { + if (virStringParseYesNo(persistent_state, + &def->data.emulator.persistent_state) = < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Invalid persistent_state value, either '= yes' or 'no'")); + goto error; + } + } else { + def->data.emulator.persistent_state =3D false; + } break; case VIR_DOMAIN_TPM_TYPE_LAST: goto error; @@ -26952,6 +26971,8 @@ virDomainTPMDefFormat(virBufferPtr buf, case VIR_DOMAIN_TPM_TYPE_EMULATOR: virBufferAsprintf(buf, " version=3D'%s'", virDomainTPMVersionTypeToString(def->version)); + if (def->data.emulator.persistent_state) + virBufferAddLit(buf, " persistent_state=3D'yes'"); if (def->data.emulator.hassecretuuid) { char uuidstr[VIR_UUID_STRING_BUFLEN]; virBufferAddLit(buf, ">\n"); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 72771c46b9..109625828a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1362,6 +1362,7 @@ struct _virDomainTPMDef { char *logfile; unsigned char secretuuid[VIR_UUID_BUFLEN]; bool hassecretuuid; + bool persistent_state; } emulator; } data; }; diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 872be16570..532e0912bd 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -729,7 +729,8 @@ qemuExtTPMCleanupHost(virDomainDefPtr def) if (def->tpms[i]->type !=3D VIR_DOMAIN_TPM_TYPE_EMULATOR) continue; =20 - qemuTPMDeleteEmulatorStorage(def->tpms[i]); + if (!def->tpms[i]->data.emulator.persistent_state) + qemuTPMDeleteEmulatorStorage(def->tpms[i]); } } =20 diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-latest.= args b/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-latest.args new file mode 100644 index 0000000000..90505c7a76 --- /dev/null +++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-latest.args @@ -0,0 +1,38 @@ +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-x86_64 \ +-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 pc-i440fx-2.12,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,\ +memory-backend=3Dpc.ram \ +-cpu qemu64 \ +-m 2048 \ +-object memory-backend-ram,id=3Dpc.ram,size=3D2147483648 \ +-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 piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-tpmdev emulator,id=3Dtpm-tpm0,chardev=3Dchrtpm \ +-chardev socket,id=3Dchrtpm,path=3D/dev/test \ +-device tpm-tis,tpmdev=3Dtpm-tpm0,id=3Dtpm0 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml b/tests/qe= muxml2argvdata/tpm-emulator-tpm2-pstate.xml new file mode 100644 index 0000000000..45fc4c0e1a --- /dev/null +++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml @@ -0,0 +1,30 @@ + + TPM-VM + 11d7cd22-da89-3094-6212-079a48a309a1 + 2097152 + 512288 + 1 + + hvm + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 9b853c6d59..e96a51d18b 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2460,6 +2460,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("tpm-emulator-tpm2-pstate"); DO_TEST_CAPS_LATEST_PPC64("tpm-emulator-spapr"); =20 DO_TEST_PARSE_ERROR("pci-domain-invalid", NONE); diff --git a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-lates= t.xml b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-latest.xml new file mode 100644 index 0000000000..08bc8d690c --- /dev/null +++ b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-latest.xml @@ -0,0 +1,37 @@ + + TPM-VM + 11d7cd22-da89-3094-6212-079a48a309a1 + 2097152 + 512288 + 1 + + hvm + + + + + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + + + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 1968be6782..f8bca9f559 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -761,6 +761,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("tpm-emulator-tpm2-pstate"); =20 DO_TEST("metadata", NONE); DO_TEST("metadata-duplicate", NONE); --=20 2.28.0