From nobody Sun Feb 8 06:05:25 2026 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=1591812757; cv=none; d=zohomail.com; s=zohoarc; b=HpiFBBLdBEA4VHpMT9zc21BmzVIp+wKkwnc7f3B8xlk+fL3Q6+eUxKy9V7zWZdI2vmxbPBUZ8a6eG4bvk3Bh3PDMtcYRct0HFjBQ8240zmziJhLbN8aIWfHUlVms/QMXY0l7Ay8XyLfm22Bs6XuZQFc/nlSktvqVspnZPlDTAAg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591812757; 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=5LqEfl++3Sb/Rah8806fKcVpA+ZyvW3Q6SarcZwRVI0=; b=L8f+0aDotQKqZTb9W008CyMRjIWcXY1gmfasesGau91YU9FJZVcC6sMvPi2gXnXxJPwQCpuhUZW/Xgjma8N30RuY+IqWileoc/rXEv7dnMZbrN8fHsEQ68HjoW9a5IbPs1AXpUrk3H+kXYLX83sTY/A6x4hcp5+rDVo5iBoQgQE= 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 1591812757040178.86430953052877; Wed, 10 Jun 2020 11:12:37 -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-341-KqGHpyUuPE6zWVT3Y9zEew-1; Wed, 10 Jun 2020 14:12:33 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 19FD3BFC3; Wed, 10 Jun 2020 18:12:28 +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 EDAD88929A; Wed, 10 Jun 2020 18:12:27 +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 BFBF61809554; Wed, 10 Jun 2020 18:12:27 +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 05AICDSf020137 for ; Wed, 10 Jun 2020 14:12:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7FEFB33246; Wed, 10 Jun 2020 18:12:13 +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 7B9B033244 for ; Wed, 10 Jun 2020 18:12:10 +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 9B1EA8316EA for ; Wed, 10 Jun 2020 18:12:10 +0000 (UTC) Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-8h_BbbKwNwKa1cv9djvAow-1; Wed, 10 Jun 2020 14:12:08 -0400 Received: by mail-qt1-f193.google.com with SMTP id d27so2535634qtg.4; Wed, 10 Jun 2020 11:12:07 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:b081:e954:9388:2ec6:d6f4]) by smtp.gmail.com with ESMTPSA id z4sm569415qtu.33.2020.06.10.11.12.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 11:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591812755; 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=5LqEfl++3Sb/Rah8806fKcVpA+ZyvW3Q6SarcZwRVI0=; b=HdSbeuWBQk16qPvGeg4xZPgAR2z05bzglpX+Lh/udWToM7pD8BeriAZ/igMPIOAkumey+g 5XWCfIbF6f+egNbljnKuNYFrPSUfgvO1/9F3aLzFZ3ESfpgFZSp6IxF+rba6IjCmbuLeBU f7XULe5wdB27E3MyM6f5T1INa8SZxzM= X-MC-Unique: KqGHpyUuPE6zWVT3Y9zEew-1 X-MC-Unique: 8h_BbbKwNwKa1cv9djvAow-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=5LqEfl++3Sb/Rah8806fKcVpA+ZyvW3Q6SarcZwRVI0=; b=ZZD4cU9WJEWAEUdhOGz6Mh7JQ3+ai+Vlk33C+/t+Vn+A3SsWE8oakWIH6DTcFtkn81 AQHOzPlZnhcvXknVXlWT0pKE5RznC9x3eJr/qvvhPMvkZzJXd6HuzmT9xtXu6FGUpQ+X X4Q3sSxpKGb3gMQXdli5NNf1p2cX1ZZMw8uHKIWYXv5LNiEGMtp6KM+QUmoBTczk6aIP SqWx+YeKN7+HWWZ2/Ql4Zw5qW2XkqE+CO0o8x8xR0a5lo5gtuAwBxkLqV0hWA2N0LpUe 661+i3Jq/kQcNOgnyvnrZXltuCmi7JJZhcNeSM4Ymu74pxvGwd/tlINSTNRpSAKaqerA Jp5w== X-Gm-Message-State: AOAM533BghjIHnwhicj2TAGCg+NCgujs3F3+StT5mB+/32vhvj0PiVpv WomOa6XsdLIowqpZjOMNEVaN+ypZ X-Google-Smtp-Source: ABdhPJxe+irLibPCPADy2XMY1nxX+hpq3xDyavB/FNku7cH8FGNcyNgmvgizy4jj+HOeWAcslhSGvg== X-Received: by 2002:ac8:6bc6:: with SMTP id b6mr4647408qtt.101.1591812726375; Wed, 10 Jun 2020 11:12:06 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v7 02/10] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' Date: Wed, 10 Jun 2020 15:11:44 -0300 Message-Id: <20200610181152.374479-3-danielhb413@gmail.com> In-Reply-To: <20200610181152.374479-1-danielhb413@gmail.com> References: <20200610181152.374479-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Daniel Henrique Barboza , stefanb@linux.ibm.com, sathnaga@linux.vnet.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.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Expose the TPM Proxy support for PPC64 guests by creating a new cap called QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY. This device is part of the machinery the guest need to orchestrate with the PPC64 Ultravisor the transition to the Secure VM (SVM) mode. Inside QEMU, this device will be used with the H_TPM_COMM hypercall to connect with the TPM Resource Manager, enabling the guest to open and close TPM sessions with the host TPM. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Reviewed-by: J=C3=A1n Tomko 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 aa90eab229..7d52d9725a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -587,6 +587,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "cpu.migratable", "query-cpu-model-expansion.migratable", "fw_cfg", + "spapr-tpm-proxy", ); =20 =20 @@ -1311,6 +1312,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS }, { "tcg-accel", QEMU_CAPS_TCG }, { "pvscsi", QEMU_CAPS_SCSI_PVSCSI }, + { "spapr-tpm-proxy", QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY }, }; =20 =20 diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 0839c50bc4..f868330511 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -568,6 +568,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_CPU_MIGRATABLE, /* -cpu ...,migratable=3Don|off */ QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_MIGRATABLE, /* query-cpu-model-exp= ansion supports migratable:false */ QEMU_CAPS_FW_CFG, /* -fw_cfg command line option */ + 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 4d44cd4ac6..bdf29dcc39 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -186,6 +186,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 409120262e..5c69d1c1dc 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -202,6 +202,7 @@ + 5000000 0 42900241 --=20 2.26.2