From nobody Sun Apr 28 17:45:02 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588939669; cv=none; d=zohomail.com; s=zohoarc; b=cj2X8QzkdMSZbLhloc/ksgr/vN+8sb94e6iVoE3Z/ShJqydvcwNjXAKsQfnYc7G7M1iAkRsj/2v4LQjl9KwC5R0lh2mKotLr2dAn/mvVFBDlgvoVSfrjUWRyL3aNiUYCFFJtNqzqBQSg2zIHubQHGrCjaKMjg3w0Kn81GXmBVaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939669; 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=Qf1FA2jYaUF0xndiqsJtgELI01+aNlSzMpW7AyWW8jc=; b=OqXw70xxofUxhQq9yCS1+wT2P/P735GhR7JkEQ56+vXWW4MN4P/qp+U3HvmCFj+LFxIQvFD4jGH6tZ8h0GGM8Kl0318u6S/2jAuRitCAX7SKxaqv18ZMB60C9GLFaXkN+t0fhJyjAaA0bP2vAu6I5ygrg/2a0k/o4oQlnCK6T9c= 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 1588939669421170.91834022896535; Fri, 8 May 2020 05:07:49 -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-443-wd_hbmG7OcWioYuHuQkjYQ-1; Fri, 08 May 2020 08:07:46 -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 ACA271009600; Fri, 8 May 2020 12:07:40 +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 5D51E5D9CA; Fri, 8 May 2020 12:07:40 +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 E70E51806B0B; Fri, 8 May 2020 12:07:39 +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 048C7DrR013063 for ; Fri, 8 May 2020 08:07:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9603A2157F25; Fri, 8 May 2020 12:07:13 +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 9245F2166B28 for ; Fri, 8 May 2020 12:07:11 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 869DF88855F for ; Fri, 8 May 2020 12:07:11 +0000 (UTC) Received: from mail-qv1-f66.google.com (mail-qv1-f66.google.com [209.85.219.66]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191-w4XMT7PLPsKWHejqykEfzw-1; Fri, 08 May 2020 08:07:09 -0400 Received: by mail-qv1-f66.google.com with SMTP id r3so590326qvm.1 for ; Fri, 08 May 2020 05:07:09 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939668; 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=Qf1FA2jYaUF0xndiqsJtgELI01+aNlSzMpW7AyWW8jc=; b=Ja//ayTg8qNPbYySwreUgx8O+9d8kG1SXEvyJRPL5ZD2V05gixid+bYdryRzsYLc4zP7HI GjKgNjxBFtotnOKpZSDGSffSwYIg4GYR4KwazyuDpuUh61yBbhZqUMQp0/21ZWKw1qRrSX T+QdVQ4I2XtlB/hmi9FzyfYgP/AwQ8I= X-MC-Unique: wd_hbmG7OcWioYuHuQkjYQ-1 X-MC-Unique: w4XMT7PLPsKWHejqykEfzw-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=OvxvqJBwReqn35EYbOC+L8fkWYadrsjOH0JZcPoRALA=; b=EwbFZXUAGgLAoqegwnimg9fnGsyFA2JGgZyiIn40lJINFADi1ZJgdQ+/Y6EJXjYWe9 SShrNfg8hzDk8fGqzm96FhC8YjhFwNLm8dRirrEnpXIMILhNApQbrCILiCIWZVBOjxEd O5AUkVV4qotuGdRkna68DwgkqCNwO6c3iMZE+FCgVTJi4MJ7juu4GdQ2r+MGmHsTEafk 2J7bTCrKtNp5jj07KDDMEQAW2IJTFSNuE2CkT2YDiWExMLs4MYgSMt8sY3dB2gG8VAyz +htoczxbL4JrI2X+AmiJjo2xZtFNAEbWTxKrmr8HGz6+ryClCDJFfJE5gblj31iuyBo/ F1Xg== X-Gm-Message-State: AGi0PuYfDlRCteiHnHVjwyAKnau76boIGeCG3wKDnm0Y3bU9lF9EnHQr N9j+K2krrvW+VlD2kXydp4Kmj5YgNzY= X-Google-Smtp-Source: APiQypJYAPfNKcNpXMVeTvbroZGYxyGKXmo1W9yDRiCZ2UJeVZErIs93vPUfxJxs3o1hnzW844iszA== X-Received: by 2002:a05:6214:7a7:: with SMTP id v7mr2487377qvz.27.1588939628413; Fri, 08 May 2020 05:07:08 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 1/8] docs: documentation and schema for the new TPM Proxy device Date: Fri, 8 May 2020 09:06:50 -0300 Message-Id: <20200508120657.970343-2-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7DrR013063 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.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" QEMU 4.1.0 introduced a new device type called TPM Proxy, currently implemented by PPC64 guests via a new virtual device called 'spapr-tpm-proxy' (see QEMU 0fb6bd073230 for more info). The TPM Proxy device interacts with a TPM Resource Manager, a host device capable of multiplexing the host TPM with multiple processes. This allows multiple guests to access some TPM features at the same time. Note that this mode of operation does not provide full TPM features to be available for the guest - for that case the guest still needs to assign a vTPM device (tpm-spapr for PPC64 guests). Although redundant, there is currently no technical limitation for a guest to assign both a vTPM and a TPM Proxy at the same time. This patch adds documentation and schema for the new TPM Proxy device. An example of a TPM Proxy device connected to a TPM Resource Manager '/dev/tpmrm0' will look like this: Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 42 +++++++++++++++++++++++++++++++++++ docs/schemas/domaincommon.rng | 18 +++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 23eb029234..650e2a8c6e 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -8849,6 +8849,48 @@ qemu-kvm -net nic,model=3D? /dev/null =20 +

TPM Proxy device

+ +

+ The TPM Proxy device allows a QEMU guest to interact with an + existing TPM Resource Manager in the host. A TPM Resource Manager + enables a TPM device to be securely multiplexed across several + guests. Only one TPM Proxy device is allowed per guest. +

+

+ A guest using the TPM Proxy device does not have access to all the + features a TPM device provides. This means that a guest can have both + a TPM Proxy and a TPM device assigned at the same time. +

+

+ The TPM Proxy device is currently available only for pSeries guests. + since 6.4.0 +

+

+ Example: usage of the TPM Proxy device +

+
+...
+<devices>
+  <tpmproxy model=3D'spapr-tpm-proxy'>
+    <device path=3D'/dev/tpmrm0'/>
+  </tpmproxy>
+</devices>
+...
+
+ +
+
model
+
+

+ The model attribute specifies what device + model QEMU provides to the guest. If no model name is provided, + spapr-tpm-proxy will automatically be chosen for + PPC64 architectures. +

+
+
+

NVRAM device

nvram device is always added to pSeries guest on PPC64, and its addr= ess diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 9d60b090f3..44bbd92244 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4676,6 +4676,23 @@ =20 + + + + + + spapr-tpm-proxy + + + + + + + + + + + @@ -5279,6 +5296,7 @@ + --=20 2.26.2 From nobody Sun Apr 28 17:45:02 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588939650; cv=none; d=zohomail.com; s=zohoarc; b=MPjgGwXhQ6NnCNX3QKYZOoPZffe9Wfk2+KZLBSsjGgUIOSr/botQIbiWIzav9QH4XseH5iQ7nDiFjZ6xl/4jjIP76G43Sk7tGbHybLedKq3S5ECV3tuwiy2vhyILu8Rhr+pVD+rcdBfuXU6Kqd07wCPpMMBn9zzfPFQdAEDOBEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939650; 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=9P+yrSqQHY++3zWEQJPQMgzC7+512jhhYmkCTeQofRk=; b=at/A9NFm3VFdRRYNz63BoaradQXQr64ubfwLbm5QPw2EAManhbrlZ9vZd+AnJ7R9vMIFzMF4bHeZQ0Rb/057WxQmhaemYcosdNaEnsMTBC//bVhYa1W1hRa2BeObXggmGyzWGcKp01V5XWFxHMwiModEwqNyu9Pgw/Xo/CsRsSo= 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 1588939650716197.41128722411088; Fri, 8 May 2020 05:07:30 -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-283-GmQ8DbwRPUCBWrl_flzHhw-1; Fri, 08 May 2020 08:07:27 -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 224AE473; Fri, 8 May 2020 12:07:22 +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 68F9F5D9CC; Fri, 8 May 2020 12:07:20 +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 5F3E31809541; Fri, 8 May 2020 12:07:15 +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 048C7DqT013057 for ; Fri, 8 May 2020 08:07:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 350202029F62; Fri, 8 May 2020 12:07:13 +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 311042029F61 for ; Fri, 8 May 2020 12:07:13 +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 16FDE101A525 for ; Fri, 8 May 2020 12:07:13 +0000 (UTC) Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-10-sBiH00vIMA-QUjD-gT3vKQ-1; Fri, 08 May 2020 08:07:10 -0400 Received: by mail-qv1-f65.google.com with SMTP id c4so78846qvi.6 for ; Fri, 08 May 2020 05:07:10 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939649; 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=9P+yrSqQHY++3zWEQJPQMgzC7+512jhhYmkCTeQofRk=; b=FGAlG2oi0Z599jzqm5jh0MupVqbtHMNFi2/pPJAvWaCOYiMyiMS+02DthlT63vmyeVNqvw 7aGwYzeBWgQFXxoiri8q6TqhzCtAhmGHUvxlc+WqQuCbDajKXMotQcWDDsFo2Y+EiKusb8 8ZC5pTsQUQ9BU+mQcJBhfD1uNct8pcw= X-MC-Unique: GmQ8DbwRPUCBWrl_flzHhw-1 X-MC-Unique: sBiH00vIMA-QUjD-gT3vKQ-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=ObeSOot7VPUvrAUGYtace4a2xKd1PuBccUMizdkiLs0=; b=qO1P6MrkSf19Y1wuR8oH7JOPfT8E22IZRJnhEuuctjOswplqxtiMFhrjxv9CUMbXh1 +qE13BmRnlE/o25tP4MywGQRXiNYctYn5Qr+wkh2Sdtiq/yZFUQ5elNpHR18U60FXffn rqbEXpNWnyuzIVXkf3P5TX+aazlcRuq6lrUN2uXMPyWjlbkft8/IX9kQZOUhhlJnacSv ehFwMgRx3Y4sbRGMcPkGlK1ScGsb3G4p+NDjmT42cWVrgIAsX/tHY1AGeJPEottHZhSc Xe5UjQ1r3DVefFsU70XAywPGocTLcj+wYZmMCysLBzYEZWv2e9ZyDSHYkYOntaXmPYPY dr8A== X-Gm-Message-State: AGi0PuaQk4dovaUkLeQDeBcvzlPtAJHedrqY1T2/8QhobX+kLIyL0j2C UUsclvKnmP/w2FmrFCf+wet6FdUUAtI= X-Google-Smtp-Source: APiQypKZX8hdgW3NYTx6xwJvAXDVfnOihmLgtLweFXhhcktOstBtFQN2erWQF96GHlag5JqQmPUSeA== X-Received: by 2002:ad4:4462:: with SMTP id s2mr2402806qvt.221.1588939629995; Fri, 08 May 2020 05:07:09 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 2/8] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' Date: Fri, 8 May 2020 09:06:51 -0300 Message-Id: <20200508120657.970343-3-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7DqT013057 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.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" Expose the TPM Proxy support for PPC64 guests by creating a new cap called QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + 4 files changed, 5 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2c6e36685e..dcc1886954 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -580,6 +580,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "machine.pseries.cap-sbbc", "machine.pseries.cap-ibs", "tcg", + "spapr-tpm-proxy", ); =20 =20 @@ -1301,6 +1302,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "tpm-spapr", QEMU_CAPS_DEVICE_TPM_SPAPR }, { "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS }, { "tcg-accel", QEMU_CAPS_TCG }, + { "spapr-tpm-proxy", QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[]= =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index cdeaf09cce..92aca0470b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -561,6 +561,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC, /* -machine pseries.cap-sbbc */ QEMU_CAPS_MACHINE_PSERIES_CAP_IBS, /* -machine pseries.cap-ibs */ QEMU_CAPS_TCG, /* QEMU does support TCG */ + QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY, /* -device spapr-tpm-proxy */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.ppc64.xml index 796ed0a2bc..75301833e6 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -184,6 +184,7 @@ + 4001050 0 42900242 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index a5f0bb538b..08cf607cbf 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -199,6 +199,7 @@ + 5000000 0 42900241 --=20 2.26.2 From nobody Sun Apr 28 17:45:02 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=1588939673; cv=none; d=zohomail.com; s=zohoarc; b=lSRx3RCmaKulf6SboPzY8RUS0YdAx1Cb/p6mHDj+fF05P1aEmqwVsafn3N6cp9JdK/PRF6vtyLJhR65CUme1FwU0OrvlN1iNSLDWQIJlcRWK8GLyvykpLGuEYBW+MJ3MCGJXF6AaTav0Qggy29TnV0Yt9jAgHyslYA1CfejyUq4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939673; 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=mDZAVDRKjIfkKIth3niltCdfv+GGA+OEPF2BuUow8kk=; b=dn1fmyNXAb8AQiyaW8YgXbnrSjC2hEcNQDRNsAnB6rYHrB65dMtQt1CNrl1NN9XoCnY7ipvxeabLiGeOg3AUdXI5WpbZ6TjA5lzngrtaEl9zVyemNTRXq5xYT2Duglm/tX/b+nNOyqgA7VDkHdbgCM2k5IAfJxZQMm6Op75Q40k= 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 1588939673927799.5703070070882; Fri, 8 May 2020 05:07:53 -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-280-dpnb4hPdMSibvZInx8Nseg-1; Fri, 08 May 2020 08:07:50 -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 991031009617; Fri, 8 May 2020 12:07:44 +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 721205D9CC; Fri, 8 May 2020 12:07:44 +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 BDD8A180597C; Fri, 8 May 2020 12:07:43 +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 048C7FHn013078 for ; Fri, 8 May 2020 08:07:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 409382157F25; Fri, 8 May 2020 12:07:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C4EE2166B28 for ; Fri, 8 May 2020 12:07:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 1C76980CDAE for ; Fri, 8 May 2020 12:07:15 +0000 (UTC) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-325-QqJPfazgP_mBbyKddqw64A-1; Fri, 08 May 2020 08:07:12 -0400 Received: by mail-qt1-f173.google.com with SMTP id x8so896704qtr.2 for ; Fri, 08 May 2020 05:07:12 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939672; 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=mDZAVDRKjIfkKIth3niltCdfv+GGA+OEPF2BuUow8kk=; b=LAqwQp3c3F99jsSd1sm9c91aH0VmSUk30BoKXwT/vaS2SYc72OVp+kQCsgjEm7+leutXO0 l529UfWfG03Iz5icBcWBFvCUJ9N6uqEippHq/BkaeYq7R+58P/8EP+R/XzUQ694WmXbdk9 Qu06d0YqwmLiGXJKxR8fv+ngQvbt6hU= X-MC-Unique: dpnb4hPdMSibvZInx8Nseg-1 X-MC-Unique: QqJPfazgP_mBbyKddqw64A-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=Bie5VilbsQoNj5AIrMUfK6/Vqdp5OOVr3hne6ZNR9o0=; b=oiiAdlIphWfae9JT1uT33nQMb6Qa66pwt/4EEofieWZfUBAPWy166NQNvsdiCZmyKU LLq9pxaJW8ywuGRvE2oQKVx6S8OyIpXYHGell3IU3lTLOLDmGCJslWlYz3Gkc06d87GJ 9lCbK7x+ni+HXq48kZxXouXnHYn1rYJXi4GsAyrGgVWwM6M5qbOGxdvOvcFh6g3FxBrG bw9IPmYzopTJoIhCuhhlzT2TANMYtedR943KqnhZ5xHo+WB4pPZCBPDvtEBYD2a5xl/5 i7qB5qqY/62LdICyZDydzf2avqCXFdCri2YpvUQgWnmu2t5ASgh6/FKmVE6fsng+TRS6 c4sQ== X-Gm-Message-State: AGi0PubSDnVQS1Ll1217sRRPzcDQUsR0YJMfm+5jdPrGUE62ihVimW1N ykR10cDoqDF6dk2U8M5rnPQ3TEGSUzg= X-Google-Smtp-Source: APiQypJrlJCdxtcdyDVqEneorz5kRFioDYYlDYh7YM2XQ3Q5GTmujDVofjv1qJSm5xtxq7IXK15/5w== X-Received: by 2002:ac8:162f:: with SMTP id p44mr2545000qtj.75.1588939631601; Fri, 08 May 2020 05:07:11 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 3/8] conf, qemu: adding VIR_DOMAIN_DEVICE_TPMPROXY device Date: Fri, 8 May 2020 09:06:52 -0300 Message-Id: <20200508120657.970343-4-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7FHn013078 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.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" This new device will be used to represent a single instance of a TPM Proxy for the domain. XML functions to parse and format the device from the XML definition will be added in the next patch. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_capabilities.c | 1 + src/conf/domain_conf.c | 68 ++++++++++++++++++++++++++++++++++ src/conf/domain_conf.h | 18 +++++++++ src/conf/virconftypes.h | 3 ++ src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c | 14 +++++++ src/qemu/qemu_domain_address.c | 2 + src/qemu/qemu_driver.c | 5 +++ src/qemu/qemu_hotplug.c | 3 ++ src/qemu/qemu_validate.c | 37 ++++++++++++++++++ 10 files changed, 152 insertions(+) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 921d795630..485fa9a22d 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -703,6 +703,7 @@ virDomainCapsDeviceDefValidate(const virDomainCaps *cap= s, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_NONE: case VIR_DOMAIN_DEVICE_LAST: break; diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 83748354b0..4c731b9f36 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -323,6 +323,7 @@ VIR_ENUM_IMPL(virDomainDevice, "memory", "iommu", "vsock", + "tpmproxy", ); =20 VIR_ENUM_IMPL(virDomainDiskDevice, @@ -1180,6 +1181,12 @@ VIR_ENUM_IMPL(virDomainTPMVersion, "2.0", ); =20 +VIR_ENUM_IMPL(virDomainTPMProxyModel, + VIR_DOMAIN_TPMPROXY_MODEL_LAST, + "default", + "spapr-tpm-proxy", +); + VIR_ENUM_IMPL(virDomainIOMMUModel, VIR_DOMAIN_IOMMU_MODEL_LAST, "intel", @@ -3061,6 +3068,17 @@ void virDomainTPMDefFree(virDomainTPMDefPtr def) VIR_FREE(def); } =20 +void virDomainTPMProxyDefFree(virDomainTPMProxyDefPtr def) +{ + if (!def) + return; + + VIR_FREE(def->path); + virDomainDeviceInfoClear(&def->info); + VIR_FREE(def); + +} + void virDomainHostdevDefFree(virDomainHostdevDefPtr def) { if (!def) @@ -3187,6 +3205,9 @@ void virDomainDeviceDefFree(virDomainDeviceDefPtr def) case VIR_DOMAIN_DEVICE_TPM: virDomainTPMDefFree(def->data.tpm); break; + case VIR_DOMAIN_DEVICE_TPMPROXY: + virDomainTPMProxyDefFree(def->data.tpmproxy); + break; case VIR_DOMAIN_DEVICE_PANIC: virDomainPanicDefFree(def->data.panic); break; @@ -3480,6 +3501,7 @@ void virDomainDefFree(virDomainDefPtr def) VIR_FREE(def->mems); =20 virDomainTPMDefFree(def->tpm); + virDomainTPMProxyDefFree(def->tpmproxy); =20 for (i =3D 0; i < def->npanics; i++) virDomainPanicDefFree(def->panics[i]); @@ -4038,6 +4060,8 @@ virDomainDeviceGetInfo(virDomainDeviceDefPtr device) return &device->data.memory->info; case VIR_DOMAIN_DEVICE_VSOCK: return &device->data.vsock->info; + case VIR_DOMAIN_DEVICE_TPMPROXY: + return &device->data.tpmproxy->info; =20 /* The following devices do not contain virDomainDeviceInfo */ case VIR_DOMAIN_DEVICE_LEASE: @@ -4137,6 +4161,9 @@ virDomainDeviceSetData(virDomainDeviceDefPtr device, case VIR_DOMAIN_DEVICE_LEASE: device->data.lease =3D devicedata; break; + case VIR_DOMAIN_DEVICE_TPMPROXY: + device->data.tpmproxy =3D devicedata; + break; case VIR_DOMAIN_DEVICE_NONE: case VIR_DOMAIN_DEVICE_LAST: break; @@ -4318,6 +4345,12 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr d= ef, if ((rc =3D cb(def, &device, &def->tpm->info, opaque)) !=3D 0) return rc; } + if (def->tpmproxy) { + device.type =3D VIR_DOMAIN_DEVICE_TPMPROXY; + device.data.tpmproxy =3D def->tpmproxy; + if ((rc =3D cb(def, &device, &def->tpmproxy->info, opaque)) !=3D 0) + return rc; + } device.type =3D VIR_DOMAIN_DEVICE_PANIC; for (i =3D 0; i < def->npanics; i++) { device.data.panic =3D def->panics[i]; @@ -4403,6 +4436,7 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr de= f, case VIR_DOMAIN_DEVICE_MEMORY: case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_VSOCK: + case VIR_DOMAIN_DEVICE_TPMPROXY: break; } #endif @@ -5395,6 +5429,7 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDefP= tr dev, case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_MEMORY: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: ret =3D 0; break; =20 @@ -6795,6 +6830,7 @@ virDomainDeviceDefValidateInternal(const virDomainDev= iceDef *dev, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_NONE: case VIR_DOMAIN_DEVICE_LAST: break; @@ -17039,6 +17075,7 @@ virDomainDeviceDefParse(const char *xmlStr, flags))) return NULL; break; + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_NONE: case VIR_DOMAIN_DEVICE_LAST: break; @@ -23743,6 +23780,25 @@ virDomainTPMDefCheckABIStability(virDomainTPMDefPt= r src, } =20 =20 +static bool +virDomainTPMProxyDefCheckABIStability(virDomainTPMProxyDefPtr src, + virDomainTPMProxyDefPtr dst) +{ + if (src->model !=3D dst->model) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Target TPM Proxy device model doesn't match sour= ce")); + return false; + } + + if (STRNEQ_NULLABLE(src->path, dst->path)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Target TPM Proxy device path doesn't match sourc= e")); + return false; + } + + return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info); +} + static bool virDomainMemtuneCheckABIStability(const virDomainDef *src, const virDomainDef *dst, @@ -24355,6 +24411,16 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr= src, goto error; } =20 + if (src->tpmproxy && dst->tpmproxy) { + if (!virDomainTPMProxyDefCheckABIStability(src->tpmproxy, dst->tpm= proxy)) + goto error; + } else if (src->tpmproxy || dst->tpmproxy) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Either both target and source domains or none of= " + "them must have TPM Proxy device present")); + goto error; + } + if (src->nmems !=3D dst->nmems) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Target domain memory device count %zu " @@ -24427,6 +24493,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr = src, case VIR_DOMAIN_DEVICE_MEMORY: case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_VSOCK: + case VIR_DOMAIN_DEVICE_TPMPROXY: break; } #endif @@ -30977,6 +31044,7 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src, case VIR_DOMAIN_DEVICE_MEMBALLOON: case VIR_DOMAIN_DEVICE_NVRAM: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("Copying definition of '%d' type " diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4afd8f04bc..d9b6bc5a22 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -85,6 +85,7 @@ typedef enum { VIR_DOMAIN_DEVICE_MEMORY, VIR_DOMAIN_DEVICE_IOMMU, VIR_DOMAIN_DEVICE_VSOCK, + VIR_DOMAIN_DEVICE_TPMPROXY, =20 VIR_DOMAIN_DEVICE_LAST } virDomainDeviceType; @@ -116,6 +117,7 @@ struct _virDomainDeviceDef { virDomainMemoryDefPtr memory; virDomainIOMMUDefPtr iommu; virDomainVsockDefPtr vsock; + virDomainTPMProxyDefPtr tpmproxy; } data; }; =20 @@ -1330,6 +1332,19 @@ struct _virDomainTPMDef { } data; }; =20 +typedef enum { + VIR_DOMAIN_TPMPROXY_MODEL_DEFAULT, + VIR_DOMAIN_TPMPROXY_MODEL_SPAPR, + + VIR_DOMAIN_TPMPROXY_MODEL_LAST +} virDomainTPMProxyModel; + +struct _virDomainTPMProxyDef { + virDomainDeviceInfo info; + int model; /* virDomainTPMProxyModel */ + char *path; +}; + typedef enum { VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_TYPE_TABLET, @@ -2625,6 +2640,7 @@ struct _virDomainDef { virDomainMemballoonDefPtr memballoon; virDomainNVRAMDefPtr nvram; virDomainTPMDefPtr tpm; + virDomainTPMProxyDefPtr tpmproxy; virCPUDefPtr cpu; virSysinfoDefPtr sysinfo; virDomainRedirFilterDefPtr redirfilter; @@ -3023,6 +3039,7 @@ virDomainDeviceInfoPtr virDomainDeviceGetInfo(virDoma= inDeviceDefPtr device); void virDomainDeviceSetData(virDomainDeviceDefPtr device, void *devicedata); void virDomainTPMDefFree(virDomainTPMDefPtr def); +void virDomainTPMProxyDefFree(virDomainTPMProxyDefPtr def); =20 typedef int (*virDomainDeviceInfoCallback)(virDomainDefPtr def, virDomainDeviceDefPtr dev, @@ -3594,6 +3611,7 @@ VIR_ENUM_DECL(virDomainRNGBackend); VIR_ENUM_DECL(virDomainTPMModel); VIR_ENUM_DECL(virDomainTPMBackend); VIR_ENUM_DECL(virDomainTPMVersion); +VIR_ENUM_DECL(virDomainTPMProxyModel); VIR_ENUM_DECL(virDomainMemoryModel); VIR_ENUM_DECL(virDomainMemoryBackingModel); VIR_ENUM_DECL(virDomainMemorySource); diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index 1c62cde251..5c4a149f24 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -312,6 +312,9 @@ typedef virDomainSoundDef *virDomainSoundDefPtr; typedef struct _virDomainTPMDef virDomainTPMDef; typedef virDomainTPMDef *virDomainTPMDefPtr; =20 +typedef struct _virDomainTPMProxyDef virDomainTPMProxyDef; +typedef virDomainTPMProxyDef *virDomainTPMProxyDefPtr; + typedef struct _virDomainThreadSchedParam virDomainThreadSchedParam; typedef virDomainThreadSchedParam *virDomainThreadSchedParamPtr; =20 diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 269bdbaf56..9065164b1d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -537,6 +537,7 @@ qemuBuildVirtioDevStr(virBufferPtr buf, case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_MEMORY: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: default: return 0; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9c629c31a3..3e86797093 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5923,6 +5923,16 @@ qemuDomainTPMDefPostParse(virDomainTPMDefPtr tpm, } =20 =20 +static int +qemuDomainTPMProxyDefPostParse(virDomainTPMProxyDefPtr tpmproxy) +{ + if (tpmproxy->model =3D=3D VIR_DOMAIN_TPMPROXY_MODEL_DEFAULT) + tpmproxy->model =3D VIR_DOMAIN_TPMPROXY_MODEL_SPAPR; + + return 0; +} + + static int qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def, @@ -5980,6 +5990,10 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr d= ev, ret =3D qemuDomainTPMDefPostParse(dev->data.tpm, def->os.arch); break; =20 + case VIR_DOMAIN_DEVICE_TPMPROXY: + ret =3D qemuDomainTPMProxyDefPostParse(dev->data.tpmproxy); + break; + case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_FS: case VIR_DOMAIN_DEVICE_INPUT: diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 07431343ed..566516f8b5 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -528,6 +528,7 @@ qemuDomainDeviceSupportZPCI(virDomainDeviceDefPtr devic= e) case VIR_DOMAIN_DEVICE_MEMORY: case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_VSOCK: + case VIR_DOMAIN_DEVICE_TPMPROXY: break; =20 case VIR_DOMAIN_DEVICE_NONE: @@ -1031,6 +1032,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDev= iceDefPtr dev, case VIR_DOMAIN_DEVICE_HUB: case VIR_DOMAIN_DEVICE_REDIRDEV: case VIR_DOMAIN_DEVICE_SMARTCARD: + case VIR_DOMAIN_DEVICE_TPMPROXY: /* These devices don't even have a DeviceInfo */ case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_GRAPHICS: diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1c7c87128d..57575b705f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7956,6 +7956,7 @@ qemuDomainAttachDeviceLive(virDomainObjPtr vm, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("live attach of device '%s' is not supported"), @@ -8090,6 +8091,7 @@ qemuDomainUpdateDeviceLive(virDomainObjPtr vm, case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_VSOCK: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("live update of device '%s' is not supported"), @@ -8311,6 +8313,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("persistent attach of device '%s' is not support= ed"), @@ -8513,6 +8516,7 @@ qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("persistent detach of device '%s' is not supporte= d"), @@ -8620,6 +8624,7 @@ qemuDomainUpdateDeviceConfig(virDomainDefPtr vmdef, case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_VSOCK: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("persistent update of device '%s' is not supporte= d"), diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 60d0729f1e..aba80c87d3 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -4980,6 +4980,7 @@ qemuDomainRemoveAuditDevice(virDomainObjPtr vm, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: /* libvirt doesn't yet support detaching these devices */ break; @@ -5078,6 +5079,7 @@ qemuDomainRemoveDevice(virQEMUDriverPtr driver, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("don't know how to remove a %s device"), @@ -5849,6 +5851,7 @@ qemuDomainDetachDeviceLive(virDomainObjPtr vm, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("live detach of device '%s' is not supported"), diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 9debac6b30..733850416a 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3326,6 +3326,38 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, } =20 =20 +static int +qemuValidateDomainDeviceDefTPMProxy(virDomainTPMProxyDef *tpmproxy, + const virDomainDef *def, + virQEMUCapsPtr qemuCaps) +{ + if (!ARCH_IS_PPC64(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("TPM Proxy device is only supported " + "for PPC64 guests")); + return -1; + } + + switch ((virDomainTPMProxyModel)tpmproxy->model) { + case VIR_DOMAIN_TPMPROXY_MODEL_DEFAULT: + case VIR_DOMAIN_TPMPROXY_MODEL_SPAPR: + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("TPM Proxy is not supported " + "with this QEMU binary")); + return -1; + } + break; + case VIR_DOMAIN_TPMPROXY_MODEL_LAST: + default: + virReportEnumRangeError(virDomainTPMProxyModel, + tpmproxy->model); + return -1; + } + + return 0; +} + static int qemuValidateDomainDeviceDefInput(const virDomainInputDef *input, const virDomainDef *def, @@ -3722,6 +3754,11 @@ qemuValidateDomainDeviceDef(const virDomainDeviceDef= *dev, ret =3D qemuValidateDomainDeviceDefMemory(dev->data.memory, qemuCa= ps); break; =20 + case VIR_DOMAIN_DEVICE_TPMPROXY: + ret =3D qemuValidateDomainDeviceDefTPMProxy(dev->data.tpmproxy, + def, qemuCaps); + break; + case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_SHMEM: case VIR_DOMAIN_DEVICE_PANIC: --=20 2.26.2 From nobody Sun Apr 28 17:45:02 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588939670; cv=none; d=zohomail.com; s=zohoarc; b=m12/A+FtJlHkKTyuxof5kGhz8aV34SZikFMfJonjvKJwHG/wOcM5m5vrXyei9oon+BDrzkbf0t3n4pR3ItA6qjDdph/ekmNFg+V2n9vzWpr2uRvtrWJITSdQq+gQekhwFvF9UMNayy6JFoSXjRT/prpWSlPUzSKPsOHjAdhjGNQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939670; 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=WlAE8kJDzVnHgKxKHgGfDrlw+o7Rp+ssCUoj16oJy1I=; b=PmvZHasubw53LTeWN753CPCloVQvI0NqNepPMcaF3YWXM7eq5j56PBgFwAaef7o9tFmHk2GJo2Cgk2mlluL9cNDwygaGVD1z9CPiwI+cFsCbpeUffkcuI80JB09mav8Kcuu1kmB5t+AA0fZOV2mgiD07LW+TRcx/T7Eqxis/GIg= 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 1588939670887396.46136443215744; Fri, 8 May 2020 05:07:50 -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-241-IUacae5-NdO2svJl-LrEig-1; Fri, 08 May 2020 08:07:47 -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 84B7884B8A1; Fri, 8 May 2020 12:07:42 +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 5B92D5D9CD; Fri, 8 May 2020 12:07:42 +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 1AB984E9E7; Fri, 8 May 2020 12:07:42 +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 048C7Jnl013108 for ; Fri, 8 May 2020 08:07:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7DC69103F271; Fri, 8 May 2020 12:07:19 +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 795F0103F270 for ; Fri, 8 May 2020 12:07:16 +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 AEAEB811E7A for ; Fri, 8 May 2020 12:07:16 +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-509-weZ0SzHkO_6QHj2AajEmHA-1; Fri, 08 May 2020 08:07:14 -0400 Received: by mail-qt1-f171.google.com with SMTP id v4so55816qte.3 for ; Fri, 08 May 2020 05:07:14 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939669; 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=WlAE8kJDzVnHgKxKHgGfDrlw+o7Rp+ssCUoj16oJy1I=; b=Lwf0fa5SBprfjl5wWEMip977HrtMHY1XXS7iCfFl3q1H7pPU78LY++JQf/28FmSrnZFTta ociYXEEm22ufs3iB7oA8qnVH5wMlgG6hu1QOytoxKF11qy5oFvI3HiF/Melwpdo1fyo/5h syvfnJCq9ZTCfnsT7/yV9DM0gmlUqAk= X-MC-Unique: IUacae5-NdO2svJl-LrEig-1 X-MC-Unique: weZ0SzHkO_6QHj2AajEmHA-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=UBTC1pugUG5gXXf8/aYPF3seffk7BVugpCKA2wrQqvQ=; b=NuTcxe15VB12oudiv+eAJ3arL9+1oPIfOEuwV95/S1mgQDtr/Rs4THB1ro56i0z7qX Ao4GEoWK/EcEjkqHkEvUw9J1tpkSwS2RHtMGbNqjDahACYaXyYnzt/d89L2NQFqz9TjT LXZ1hmmsMiyHjEHqlq01K5nOVpPahFt3MWtzrdg7dHhkSF25ONAtVzsXJhmRzqPztGub 8rLn3C3oAC+nKT1hoXgCGZo8iyE1aIeZmLHnNeZgmo+4ZGd1nbwz6nSk7rC751kFKvLc a1IwIGC1F4rJWYSj0Zk1eon/0nvQvTgI+jvPp8l44TLLKL1bE7Sgkom6JfznCc2oH4Ai D2XA== X-Gm-Message-State: AGi0PuZLA7mNbq/Lzh761de6WGjimq3pl+u9uF44k0ZWG5h/1cLEDRIh aSk55oXWpkT6d4U0/WsBfKzoTv1UkeM= X-Google-Smtp-Source: APiQypKp1eZC3YS+rvza8KI4POCJnlRXpFSFhhNt8zHICO8voRBzJQBMwRaZGd3ACIuVTywXPy11KQ== X-Received: by 2002:aed:34c6:: with SMTP id x64mr2801024qtd.66.1588939633501; Fri, 08 May 2020 05:07:13 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 4/8] domain_conf.c: XML parsing for VIR_DOMAIN_DEVICE_TPMPROXY Date: Fri, 8 May 2020 09:06:53 -0300 Message-Id: <20200508120657.970343-5-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7Jnl013108 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.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" Add virDomainTPMProxyDefParseXML() and virDomainTPMProxyDefFormat() to handle the creating of the TPM Proxy device via its XML description. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 94 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4c731b9f36..4f43dcddee 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13779,6 +13779,50 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlo= pt, return NULL; } =20 +static virDomainTPMProxyDefPtr +virDomainTPMProxyDefParseXML(virDomainXMLOptionPtr xmlopt, + xmlNodePtr node, + xmlXPathContextPtr ctxt, + unsigned int flags) +{ + virDomainTPMProxyDefPtr def; + VIR_XPATH_NODE_AUTORESTORE(ctxt); + g_autofree char *path =3D NULL; + g_autofree char *model =3D NULL; + + if (VIR_ALLOC(def) < 0) + return NULL; + + def->model =3D VIR_DOMAIN_TPMPROXY_MODEL_DEFAULT; + + model =3D virXMLPropString(node, "model"); + if (model !=3D NULL && + (def->model =3D virDomainTPMProxyModelTypeFromString(model)) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Unknown TPM Proxy frontend model '%s'"), model); + goto error; + } + + ctxt->node =3D node; + + path =3D virXPathString("string(./device/@path)", ctxt); + if (!path) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("missing TPM Proxy device path")); + goto error; + } + def->path =3D g_steal_pointer(&path); + + if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0) + goto error; + + return def; + + error: + virDomainTPMProxyDefFree(def); + return NULL; +} + static virDomainPanicDefPtr virDomainPanicDefParseXML(virDomainXMLOptionPtr xmlopt, xmlNodePtr node, @@ -17076,6 +17120,10 @@ virDomainDeviceDefParse(const char *xmlStr, return NULL; break; case VIR_DOMAIN_DEVICE_TPMPROXY: + if (!(dev->data.tpmproxy =3D virDomainTPMProxyDefParseXML(xmlopt, = node, + ctxt, flag= s))) + return NULL; + break; case VIR_DOMAIN_DEVICE_NONE: case VIR_DOMAIN_DEVICE_LAST: break; @@ -22024,6 +22072,23 @@ virDomainDefParseXML(xmlDocPtr xml, } VIR_FREE(nodes); =20 + /* Parse TPM Proxy device */ + if ((n =3D virXPathNodeSet("./devices/tpmproxy", ctxt, &nodes)) < 0) + goto error; + + if (n > 1) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("only a single TPM Proxy device is supported")); + goto error; + } + + if (n > 0) { + if (!(def->tpmproxy =3D virDomainTPMProxyDefParseXML(xmlopt, nodes= [0], + ctxt, flags))) + goto error; + } + VIR_FREE(nodes); + if ((n =3D virXPathNodeSet("./devices/nvram", ctxt, &nodes)) < 0) goto error; =20 @@ -27166,6 +27231,26 @@ virDomainTPMDefFormat(virBufferPtr buf, } =20 =20 +static int +virDomainTPMProxyDefFormat(virBufferPtr buf, + virDomainTPMProxyDefPtr def, + unsigned int flags) +{ + virBufferAsprintf(buf, "\n", + virDomainTPMProxyModelTypeToString(def->model)); + virBufferAdjustIndent(buf, 2); + virBufferEscapeString(buf, "\n", def->path); + + if (virDomainDeviceInfoFormat(buf, &def->info, flags) < 0) + return -1; + + virBufferAdjustIndent(buf, -2); + virBufferAddLit(buf, "\n"); + + return 0; +} + + static int virDomainSoundDefFormat(virBufferPtr buf, virDomainSoundDefPtr def, @@ -29853,6 +29938,11 @@ virDomainDefFormatInternalSetRootName(virDomainDef= Ptr def, goto error; } =20 + if (def->tpmproxy) { + if (virDomainTPMProxyDefFormat(buf, def->tpmproxy, flags) < 0) + goto error; + } + for (n =3D 0; n < def->ngraphics; n++) { if (virDomainGraphicsDefFormat(buf, def->graphics[n], flags) < 0) goto error; @@ -31038,13 +31128,15 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src, case VIR_DOMAIN_DEVICE_VSOCK: rc =3D virDomainVsockDefFormat(&buf, src->data.vsock); break; + case VIR_DOMAIN_DEVICE_TPMPROXY: + rc =3D virDomainTPMProxyDefFormat(&buf, src->data.tpmproxy, flags); + break; =20 case VIR_DOMAIN_DEVICE_NONE: case VIR_DOMAIN_DEVICE_SMARTCARD: case VIR_DOMAIN_DEVICE_MEMBALLOON: case VIR_DOMAIN_DEVICE_NVRAM: case VIR_DOMAIN_DEVICE_IOMMU: - case VIR_DOMAIN_DEVICE_TPMPROXY: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("Copying definition of '%d' type " --=20 2.26.2 From nobody Sun Apr 28 17:45:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1588939652; cv=none; d=zohomail.com; s=zohoarc; b=AzeK9SBapfP/h7DXxysE9bkfSMq5ifsz0t22bINMIzfmfSCw80pgrXyJiBbV5Hwy60kPIIpwNrRZWA13ISBldOFSwit7JYesKsT3uxR5rHH+tS8KPqOV3EHnclILTOycUi/4MMibpZzTVOhNdb2SrByQddIbBqeM90AP+g4bs50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939652; 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=ApY4QIhs0p2gvJzgnyjcw8yYK2ikxY9WbSeV5/RX7lA=; b=GnIr3t0Y8iPSDACHvXSR1hs1TrnTHZ6rGF1pNMyFj1H1RBOwsBM4sgoS5E3d4Dta/Rkp5m4bVa5+YhOHmYZppV4ej5kHQoIFI7CpZAGGHBgjubArmoc5PhQgyHxGxf+Y0VaA08jnvxYSr/ZWk8QAtF9CQbrIHGCMuQI+Q4RSpdw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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 [205.139.110.61]) by mx.zohomail.com with SMTPS id 1588939652373151.88268370416642; Fri, 8 May 2020 05:07:32 -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-162-yMQtTA50N_OrmlbVbWKAIA-1; Fri, 08 May 2020 08:07:27 -0400 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 066C546B; Fri, 8 May 2020 12:07:22 +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 1EBD910013BD; Fri, 8 May 2020 12:07: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 4D4D51809554; Fri, 8 May 2020 12:07:20 +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 048C7IY3013102 for ; Fri, 8 May 2020 08:07:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id C2E112156A2E; Fri, 8 May 2020 12:07:18 +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 BF2002166B28 for ; Fri, 8 May 2020 12:07:18 +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 9C050101A525 for ; Fri, 8 May 2020 12:07:18 +0000 (UTC) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-HJmu5QtePyiDAk4gCW-E0A-1; Fri, 08 May 2020 08:07:16 -0400 Received: by mail-qv1-f45.google.com with SMTP id w18so576235qvs.3 for ; Fri, 08 May 2020 05:07:16 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939650; 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=ApY4QIhs0p2gvJzgnyjcw8yYK2ikxY9WbSeV5/RX7lA=; b=aofg9FQ/MfMch5SSnE2A7suTyR/5ovL4+K8/4KYePRVG4jsjVqMwvZAGxQ1s0rYNu+n/YZ NQHFZkMbJNs4Xf1iCYdeE7LNt+Y/HPYI5UwdV/78UD88BGBYIFmMO3JbOI31xbbuqvd6OP 8jLLVsWlq64lSU/LLqyUNcrED27ufYc= X-MC-Unique: yMQtTA50N_OrmlbVbWKAIA-1 X-MC-Unique: HJmu5QtePyiDAk4gCW-E0A-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=BftVBDUdlRwG0YqWGTeMrH9wkgxNwOaICGhHSEd5L3s=; b=iVfuH9NxGBid9o3qMRode9+3uHD10XWaTzFYPX7JRXlL4pThFdFJVvMOXGzoBGC4V1 lhkYTajbkFd3YKXkJSk5j4Wu2mxZdS4LVoumXFPAoeOrEUS6gbBuixPuEWhc+ZFEClSD GMNBbkr/sT2WvnHWBdBOKY8971OL3oWZD+BxC2xgXYeT8rITfu9SUuxLRPz/dR2Pnhqb 1ONXRm53cE7BBfTZZ+KZuXvFG4t7lZyjIktTht3cY4xtxTMh+eZnqLfQXe6Xz4URHGAy tIfPl4o2UJ4pQwyhZMIijzd1fkjXCXCELr4WVQYN7RNnyXt9z9DEeyMSkz2Xfp/F8vkD jAmg== X-Gm-Message-State: AGi0PuZXO1qsrwcLBu3RiL2DQFnHVlkIEtVCph1uQc5cAOw2/NqTvnch noKkIbKAuI3R7bqaTvHvdHHl5oFsYfE= X-Google-Smtp-Source: APiQypJBOcjIkFp4eFrhfKY56kVpwuW6Lyg0nsV0/UjKIjUUmS20+T3HMU8ZQFwrM3dWPwCtpVNUgA== X-Received: by 2002:ad4:46b4:: with SMTP id br20mr2483479qvb.62.1588939635421; Fri, 08 May 2020 05:07:15 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 5/8] tests: add test for domain XML with TPM Proxy device model Date: Fri, 8 May 2020 09:06:54 -0300 Message-Id: <20200508120657.970343-6-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7IY3013102 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.84 on 10.5.11.22 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" Update qemuxml2xmltest.c to add tests to validate the XML parsing of the new TPM Proxy device type. Signed-off-by: Daniel Henrique Barboza --- tests/qemuxml2argvdata/ppc64-tpmproxy.xml | 31 +++++++++++++++++ tests/qemuxml2xmloutdata/ppc64-tpmproxy.xml | 37 +++++++++++++++++++++ tests/qemuxml2xmltest.c | 4 +++ 3 files changed, 72 insertions(+) create mode 100644 tests/qemuxml2argvdata/ppc64-tpmproxy.xml create mode 100644 tests/qemuxml2xmloutdata/ppc64-tpmproxy.xml diff --git a/tests/qemuxml2argvdata/ppc64-tpmproxy.xml b/tests/qemuxml2argv= data/ppc64-tpmproxy.xml new file mode 100644 index 0000000000..fef82bd5c7 --- /dev/null +++ b/tests/qemuxml2argvdata/ppc64-tpmproxy.xml @@ -0,0 +1,31 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-ppc64 + +

+ + + + + +
+ + + diff --git a/tests/qemuxml2xmloutdata/ppc64-tpmproxy.xml b/tests/qemuxml2xm= loutdata/ppc64-tpmproxy.xml new file mode 100644 index 0000000000..9ad1da9434 --- /dev/null +++ b/tests/qemuxml2xmloutdata/ppc64-tpmproxy.xml @@ -0,0 +1,37 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-ppc64 + +
+ + + + + + + + + +
+ + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 86f3d2c1f3..c9745ae337 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -610,6 +610,10 @@ mymain(void) DO_TEST("controller-usb-order", QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4); + DO_TEST("ppc64-tpmproxy", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY); =20 DO_TEST_FULL("seclabel-dynamic-baselabel", WHEN_INACTIVE, ARG_QEMU_CAPS, NONE); --=20 2.26.2 From nobody Sun Apr 28 17:45:02 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=1588939684; cv=none; d=zohomail.com; s=zohoarc; b=AJvxy3KxO7RSSSZb0dX/bMzntfgdXYAqOdwhaG7aFdCVjZTmXakDC8sYySiis2L0GpfZA19OBXIsz9aR/CUytNzU9m4mBshxRH4/psfO1+RJ02DMF3hiqk5FLnv/NwlcU1QjHS7rguk2zPMUiZJBW2TdKGIv+s5vLItljh5cawY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939684; 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=7yOnN6/UFkgrepttfuzSvU6JyQ0K80pf9uGIEudccFw=; b=ndOO7s6ef+EN5juNp4hiGWOYI9KDPOUqUUGBg6zs3MtzBmBmu7dqnMKNjAi4VQqTssi5YPPf1C4I2iSc6S9t5w7ORCL5Oy8PsKwSc6D/xFTZI02vgYyNQ8Ti0EHO3Jp6NO+o4DmjyJaBRGkE+hijsmIPCkluTEEjEvwQmJNhp5w= 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-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 158893968432061.981259880392486; Fri, 8 May 2020 05:08:04 -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-424-pVg3qfFRPD-jTJ-5Cs84dg-1; Fri, 08 May 2020 08:07:53 -0400 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 14A541902EA7; Fri, 8 May 2020 12:07:48 +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 DEEB81001DC2; Fri, 8 May 2020 12:07:47 +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 96CA44E9E7; Fri, 8 May 2020 12:07:47 +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 048C7KXe013117 for ; Fri, 8 May 2020 08:07:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 668CC103F271; Fri, 8 May 2020 12:07:20 +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 627DD103F270 for ; Fri, 8 May 2020 12:07:20 +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 41C111859160 for ; Fri, 8 May 2020 12:07:20 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-319-L2vFEk5FN8aF5qfxhsgeVQ-1; Fri, 08 May 2020 08:07:18 -0400 Received: by mail-qk1-f195.google.com with SMTP id i14so103547qka.10 for ; Fri, 08 May 2020 05:07:17 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939683; 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=7yOnN6/UFkgrepttfuzSvU6JyQ0K80pf9uGIEudccFw=; b=E54UheUi/ZyhZ1SoXZYpUFINNo64TH/WyFWFSxulU5tGOnDdzkk1eZssJZUvBUmeVoNiYS 2zU3JonCuyR11P1LGHyk84A5jFgd1fOPMS6nC4ntSYmzM2mPMZxuEadqciKERBdFQ0dh6W t0KSDuYCyOxnK48vncgAuyTIoPKrrKw= X-MC-Unique: pVg3qfFRPD-jTJ-5Cs84dg-1 X-MC-Unique: L2vFEk5FN8aF5qfxhsgeVQ-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=PLh9fCOcAGDz0MHXPC6uKYAL1w1j9HXjBHWUZdfb4Fs=; b=WBh0S6jGLyDNcigzhfJFcq8a5zXoQM+k9bAzVALdx0bibfvs6GBhEIZQGhsdrFVRR9 zy4AZ7uaCk5LZHzogaAnZXfR7p/n0t7FbkYJrTAvDZnfqKVuKrkb86lALFVLY5yrUNCe iRxjE8DGIl4lxjeHURSpjX+dtk6bkz2uPWL1Ztx/uzKKSpAvE4eghlj/Ix6iBiic4kWg 8Q4XWaM4GBNyNmhAJG9RE9nMG43A3qC4jsUoF07eZ0jRboVwb0eenIFrDgo+rhpYX+14 CaV2YzLvPXz/5h6oIV656pECBDE2ZKSCHyWhLK7GB40w9YTbKNk99aUDLfgERP6tq9YQ ohiA== X-Gm-Message-State: AGi0PuYVlMtZo2i8VRuCUJkv4I5/CkGsSWyXfBKnfB2nbiEGsucWDJLy lEBwyXCDQ3MskgkPhHSkeKTIOqVu3Ms= X-Google-Smtp-Source: APiQypLHDsWAz9UJ8O5xyY3orBoXLcai5XJNRcXr8bKRqYtNi7jkY3g6bQLM7ReM1HqlzhfZR2WoTA== X-Received: by 2002:a37:5941:: with SMTP id n62mr2354976qkb.419.1588939637244; Fri, 08 May 2020 05:07:17 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 6/8] qemu: build command line for the TPM Proxy device Date: Fri, 8 May 2020 09:06:55 -0300 Message-Id: <20200508120657.970343-7-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7KXe013117 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.84 on 10.5.11.22 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" This patch wraps it up all the wiring done in previous patches, enabling a PPC64 guest to launch a guest using a TPM Proxy device. Note that device validation is already being done in qemu_validate.c, qemuValidateDomainDeviceDefTPMProxy(), on domain define time. We don't need to verify QEMU capabilities for this device again in qemu_command.c Signed-off-by: Daniel Henrique Barboza --- src/libvirt_private.syms | 2 ++ src/qemu/qemu_alias.c | 16 ++++++++++++++++ src/qemu/qemu_command.c | 20 ++++++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 935ef7303b..b242c6164e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -636,6 +636,8 @@ virDomainTPMBackendTypeToString; virDomainTPMDefFree; virDomainTPMModelTypeFromString; virDomainTPMModelTypeToString; +virDomainTPMProxyModelTypeFromString; +virDomainTPMProxyModelTypeToString; virDomainUSBDeviceDefForeach; virDomainVideoDefaultRAM; virDomainVideoDefClear; diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index b0ea62af39..b21d5bb514 100644 --- a/src/qemu/qemu_alias.c +++ b/src/qemu/qemu_alias.c @@ -413,6 +413,18 @@ qemuAssignDeviceTPMAlias(virDomainTPMDefPtr tpm, } =20 =20 +static int +qemuAssignDeviceTPMProxyAlias(virDomainTPMProxyDefPtr tpmproxy, + int idx) +{ + if (tpmproxy->info.alias) + return 0; + + tpmproxy->info.alias =3D g_strdup_printf("tpmproxy%d", idx); + return 0; +} + + int qemuAssignDeviceRedirdevAlias(virDomainDefPtr def, virDomainRedirdevDefPtr redirdev, @@ -673,6 +685,10 @@ qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCa= psPtr qemuCaps) if (qemuAssignDeviceTPMAlias(def->tpm, 0) < 0) return -1; } + if (def->tpmproxy) { + if (qemuAssignDeviceTPMProxyAlias(def->tpmproxy, 0) < 0) + return -1; + } for (i =3D 0; i < def->nmems; i++) { if (qemuAssignDeviceMemoryAlias(NULL, def->mems[i], false) < 0) return -1; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9065164b1d..40a8505d24 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9318,6 +9318,23 @@ qemuBuildTPMCommandLine(virCommandPtr cmd, return 0; } =20 +static int +qemuBuildTPMProxyCommandLine(virCommandPtr cmd, + const virDomainDef *def) +{ + const virDomainTPMProxyDef *tpmproxy =3D def->tpmproxy; + + if (!tpmproxy) + return 0; + + virCommandAddArg(cmd, "-device"); + virCommandAddArgFormat(cmd, "%s,id=3D%s,host-path=3D%s", + virDomainTPMProxyModelTypeToString(tpmproxy->mo= del), + tpmproxy->info.alias, tpmproxy->path); + + return 0; +} + static int qemuBuildSEVCommandLine(virDomainObjPtr vm, virCommandPtr cmd, virDomainSEVDefPtr sev) @@ -9999,6 +10016,9 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildTPMCommandLine(cmd, def, qemuCaps) < 0) return NULL; =20 + if (qemuBuildTPMProxyCommandLine(cmd, def) < 0) + return NULL; + if (qemuBuildInputCommandLine(cmd, def, qemuCaps) < 0) return NULL; =20 --=20 2.26.2 From nobody Sun Apr 28 17:45:02 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=1588939680; cv=none; d=zohomail.com; s=zohoarc; b=EFIjPCkY41jYBt1kTil0RZA1I13UMOuVxXL+gtFQGGmly7OYWW7YnoGSMX31v5rLzmu+6D7GJAGr2sNyx29wxRMTfWtFlM9rxDpF2sxGPVvok9iK0Rz2xJcssa72hkasmskezYqNc1qL86Onz3VYZtz4EYNldzxIG5zQ/BEXgZw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939680; 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=ouibIqKbk3BNWbYGJiLMURcCJoE5cyEqbK37EQJsB4k=; b=WxXzrIxjQXbFaVCGXMTIapYHJJmBheLHSgX4XR3wZcQtMAxZkl4RwP5f52qvWRzv4kVj49SGPQgSc9rwEZgdPmoDno15lqiBEdVYYb7mQInuwUCaGvVhk4BWTUwAT0fnXstFoYmuNgBgbztw9JTJBmiaBNNdpNrHCdl0m+rv9V0= 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 1588939680479997.6223167313636; Fri, 8 May 2020 05:08:00 -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-366-AsP4B4R7MGiewBMFr56Evw-1; Fri, 08 May 2020 08:07:56 -0400 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 8F307BFC1; Fri, 8 May 2020 12:07:51 +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 63C6C1002380; Fri, 8 May 2020 12:07:51 +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 1BF431809547; Fri, 8 May 2020 12:07:51 +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 048C7NIb013140 for ; Fri, 8 May 2020 08:07:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id B6F742029F61; Fri, 8 May 2020 12:07:23 +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 B30AA2029F62 for ; Fri, 8 May 2020 12:07:23 +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 9823C88854A for ; Fri, 8 May 2020 12:07:23 +0000 (UTC) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-DU_pMIgINRWgKevKeUoWVg-1; Fri, 08 May 2020 08:07:21 -0400 Received: by mail-qk1-f196.google.com with SMTP id 23so218112qkf.0 for ; Fri, 08 May 2020 05:07:21 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939679; 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=ouibIqKbk3BNWbYGJiLMURcCJoE5cyEqbK37EQJsB4k=; b=hqZD9aDEp+Kgf1r1O0uo3y6coIl8pNAiR6zw2gN2+kqwPEvoOEvWKGs8NO5EYGhB3duEOm 66Ap/pM0z0iKxj+PmUx6VSwuCj20P8UeogVE1F5Xh5TdLB86+SazczoR2fHZUZvfdwxsPw +gyXhJX2hQah3L3lwjIP15nknQvhq4o= X-MC-Unique: AsP4B4R7MGiewBMFr56Evw-1 X-MC-Unique: DU_pMIgINRWgKevKeUoWVg-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=IDlitdrqA4dUIPJnKH3MNszBZFROh1/0JMdEjqYP1iM=; b=nHZaNomCXgmP806AR/BXXwuLqLV7mraK1YiebaGFB345TfzgHhzdHLaB9aJOkmo1dh bLDF69xMefmiSlrGAFAkEuStxjjj7upOJA21Njw5AlYoUiWZl3u6YdENTEUqJgbHZkWS QZiq7Nja1YsUAbNH6Iz220WPO+4O1yIvnLQv11ZEoIraJu3/Wb97q2/tBqQH9D2S1Gz4 1XBxdwNbUT49DULGncJevwMYILVDIvOQXyvte7PeZI4tIaeKMcNVzBBAxbek9WkAjvL/ /nsdz9QhodLE08Zhj8ABCYajJyx8LuoNldJCSp5Ooix6wqrx7tzWm9IexmTVw/D8BmCT qT3g== X-Gm-Message-State: AGi0PubY54Rf2GeiQzm2/4/Sc/ZPlJCrY8h/oEF13p2bqK1TLHHlVVL6 BvOJ/8NWdpo4kWdT2GuOsy3ZJGdsBzQ= X-Google-Smtp-Source: APiQypL20luG4JCDDTBMLb6WC1Bpd4SKxY4jSfauc/hHq5M1DGmRZCPHtQ/0uFyyU2cHiJno9hbv4A== X-Received: by 2002:a05:620a:1483:: with SMTP id w3mr2378022qkj.325.1588939639050; Fri, 08 May 2020 05:07:19 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 7/8] tests/qemuxml2argvtest.c: add TPM Proxy command line test Date: Fri, 8 May 2020 09:06:56 -0300 Message-Id: <20200508120657.970343-8-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7NIb013140 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.84 on 10.5.11.22 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" Add a new test to assert the QEMU command line being built for the TPM Proxy device. Signed-off-by: Daniel Henrique Barboza --- tests/qemuxml2argvdata/ppc64-tpmproxy.args | 28 ++++++++++++++++++++++ tests/qemuxml2argvtest.c | 4 ++++ 2 files changed, 32 insertions(+) create mode 100644 tests/qemuxml2argvdata/ppc64-tpmproxy.args diff --git a/tests/qemuxml2argvdata/ppc64-tpmproxy.args b/tests/qemuxml2arg= vdata/ppc64-tpmproxy.args new file mode 100644 index 0000000000..a296a962ce --- /dev/null +++ b/tests/qemuxml2argvdata/ppc64-tpmproxy.args @@ -0,0 +1,28 @@ +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 \ +-m 256 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-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 \ +-device pci-ohci,id=3Dusb,bus=3Dpci.0,addr=3D0x1 \ +-device spapr-tpm-proxy,id=3Dtpmproxy0,host-path=3D/dev/tpmrm0 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x6 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 04febd1b0c..1a9b197907 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2967,6 +2967,10 @@ mymain(void) QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_DEVICE_QEMU_XHCI); + DO_TEST("ppc64-tpmproxy", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY); =20 DO_TEST("aarch64-usb-controller-qemu-xhci", QEMU_CAPS_OBJECT_GPEX, --=20 2.26.2 From nobody Sun Apr 28 17:45:02 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=1588939676; cv=none; d=zohomail.com; s=zohoarc; b=n3AlTSYkPKLLgv3xPwATubNd4TMa9pcLlRyHcejX5bEagGxmWKE+1gB64pNGtvBCLZXclZ11xA5KjoXjv/Y7QC1xsu9n5CCowwVDPZvfu0An6suLjigkrMEQ0xCsli8lJJK8fsOX6bZ9pn18F2a0OteDp0/xOikAuITsCtKMs7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588939676; 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=ZbVNl7HFAA4yrqJ9bpZsXiRr2nFOLG9ud2jeo7BcW9g=; b=E2ExlaFCmf/Fn7v/nLS6F7MLUrKC5gcHoD7hh4RqV6G4Im7aTOIAOWyuXo2cg8/1uR14L99uSUGMBNI04MjFtcp+VgGb/72fTMaOmqXd04oKHlJShUCj986AmvlzXu8pBRwjgNaqd3fkVVw6oppjLw1h5Bc2n3w9dFQ9gpP3iz4= 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 15889396760101009.8721989966892; Fri, 8 May 2020 05:07:56 -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-226-ayFC7qVuO3mq8GCyOHPqzg-1; Fri, 08 May 2020 08:07:51 -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 5789B107ACF4; Fri, 8 May 2020 12:07:46 +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 2E5095C1BE; Fri, 8 May 2020 12:07:46 +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 D84BF180530C; Fri, 8 May 2020 12:07:45 +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 048C7QeI013158 for ; Fri, 8 May 2020 08:07:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 624CA120ECF; Fri, 8 May 2020 12:07:26 +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 5DBC6120ECC for ; Fri, 8 May 2020 12:07:23 +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 C47E4811E7A for ; Fri, 8 May 2020 12:07:23 +0000 (UTC) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-11-2Bl3OIqCNr6Usct-DLurGg-1; Fri, 08 May 2020 08:07:21 -0400 Received: by mail-qk1-f194.google.com with SMTP id b6so119602qkh.11 for ; Fri, 08 May 2020 05:07:21 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:36cf:9502:8dce:d28a:28e5]) by smtp.gmail.com with ESMTPSA id d9sm1195537qtj.77.2020.05.08.05.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 05:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588939674; 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=ZbVNl7HFAA4yrqJ9bpZsXiRr2nFOLG9ud2jeo7BcW9g=; b=iL9YY9EiqLcDh2h1/Gxv5KRxRCMkuaiQwXYNPxZjqkuNcOlY4CrMetqpzctvnUnZDACew0 fRpwUOMHVBTxPTt8++em04/s8x5FSCVMyGcCcGmaH1C+x7zByIy2aEPqgzJTicAM39xnDQ SFGetdn2tE0NlOCGvAmkvNYgoPGxsNg= X-MC-Unique: ayFC7qVuO3mq8GCyOHPqzg-1 X-MC-Unique: 2Bl3OIqCNr6Usct-DLurGg-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=s54cDLiFswUKeEj+jNImXrqgCXL7PaAa4Iluc1hRYkw=; b=Df6ZlFtIyrV04QLjrxX0wc3svYChzYkvgnPQo27Qtvltoo5nGYEfjIDVGJ1R6gKOX+ A1mY09GPscSNcDUwAT2dOdjielWk994X4SfbzrMSnIVHZspXqo0x+7VqBtOkKjIxW9H5 nhnnMfs8GLQF2W5vjKLZ2Vu/KQGTI5o44ldWxGncs03qFAbmLWfKEba5RIdur17bSMX5 v9obL8wb//6WZdR7BxIV0T4iRPOETEozAD6g7flmRrpSPs8ymJvQeDXQOA+f4duRPi95 dqsCByQCGtZN8mLP4X7ASzW9ITN/P6mBwAVX0eGfy2S32w1dmT59pzxFpDF9QBVedPpN XHPQ== X-Gm-Message-State: AGi0PuZisPtbTYXlEpN5oaQZH6/KEBm9AN3q50r41Qn1bWGYoLMJFx35 p52iWa8PPB058Ry4boU6sZN3ijP2G0k= X-Google-Smtp-Source: APiQypKHo5t9yQqIJGZVbpDtyXs1/P4D76bcz+/TqLs3lTLIFlWJRsRvq+GE/OLN7JcPWI52AdYjxA== X-Received: by 2002:a37:8902:: with SMTP id l2mr2301635qkd.127.1588939640873; Fri, 08 May 2020 05:07:20 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 8/8] docs/news.xml: update for the new TPM Proxy device Date: Fri, 8 May 2020 09:06:57 -0300 Message-Id: <20200508120657.970343-9-danielhb413@gmail.com> In-Reply-To: <20200508120657.970343-1-danielhb413@gmail.com> References: <20200508120657.970343-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 048C7QeI013158 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , stefanb@linux.ibm.com, 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.16 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4cef804aac..21ee98c45b 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,20 @@
+ + + qemu: add TPM Proxy device support + + + libvirt can now create guests using a new device type called + "TPM Proxy". This new device type connects with a TPM Resource + Manager in the host, which allows multiple processes to access + TPM features concurrently. Only one TPM Proxy is allowed per + guest. A guest using a TPM Proxy device can instantiate a vTPM + device at the same time. This device is supported only for pSeri= es + guests via the 'spapr-tpm-proxy' virtual device. + +
--=20 2.26.2