From nobody Sun Feb 8 01:33:19 2026 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=1591104722; cv=none; d=zohomail.com; s=zohoarc; b=RJpslvSOjZDQYnvnBOCA56wI7E0TUEl0McMyDLiUfGFUVKmpHHQMoXWScWOudRDXlAtaMQb1Ae9DnGi4gU1IFJwP6abq2DNN2WJM3wWw5zT9krFPbhlnYCgV9ozrmUxHrLzRQvpPJAsWDZkb3Uobd9z3j3HKX4+czIPpciGimAQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591104722; 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=YdMzy8q3rDIy20XXT/tbOsLbHZqLPMA2JyWCMq3bFZ0=; b=WkABkI/ESFHgX4JLM8deDaLq+A0e93FQn2E8nbWBkwibyolktHXm2qWmAhzMk581s8VPr4Q6DrXx3f7txNaBlAO6JEKXCxLyS6zH/W5ha9VIoEL79hVIxh6cno3hkLUyREMut2bfxgf6VoIHjEGLqioXjfGjksq9G/4fktlDL60= 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1591104722660627.451275585459; Tue, 2 Jun 2020 06:32:02 -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-48-kpj45rcbMSO5nUZ5pwZvPg-1; Tue, 02 Jun 2020 09:31:57 -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 C9F86107ACCA; Tue, 2 Jun 2020 13:31:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E24A10016E8; Tue, 2 Jun 2020 13:31: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 8C63F97017; Tue, 2 Jun 2020 13:31:49 +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 052DVlse007266 for ; Tue, 2 Jun 2020 09:31:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 18FB52156A4D; Tue, 2 Jun 2020 13:31:47 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E69802156A2D for ; Tue, 2 Jun 2020 13:31:46 +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 308E28007A4 for ; Tue, 2 Jun 2020 13:31:46 +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-120-7uqz-h4wMMe8E0ItoJAMPQ-1; Tue, 02 Jun 2020 09:31:44 -0400 Received: by mail-qk1-f194.google.com with SMTP id 205so12473922qkg.3; Tue, 02 Jun 2020 06:31:43 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:9da7:da03:b92e:aafb:831c]) by smtp.gmail.com with ESMTPSA id c58sm2735424qtd.27.2020.06.02.06.31.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 06:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591104721; 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=YdMzy8q3rDIy20XXT/tbOsLbHZqLPMA2JyWCMq3bFZ0=; b=ewATOCE3Jl8YM2LKC8Cn0frhMpDKnDSRCG95GRBXrB+XMzIjBBlIjIYXpKRSRmh9BD/mFE mzdABICIEVOygy6iSCHDmO75Ei8wBLgp6lYo1KyQcXUq2NazYMpefNzhQl+czuhARM8yjM 4mh9wCkGVIngSODTr546WcsIMD2cHHs= X-MC-Unique: kpj45rcbMSO5nUZ5pwZvPg-1 X-MC-Unique: 7uqz-h4wMMe8E0ItoJAMPQ-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=YdMzy8q3rDIy20XXT/tbOsLbHZqLPMA2JyWCMq3bFZ0=; b=CHhNEwDN+kM49ZLVfAEjtXCQ4hIDj2m05ZQmiPURbpcRZzqLkjZ8A/D8huXYELMkkz bATdceVNg78LselgIps/+xKzGD1txcdWypG16N6xVD7Tg2QkFVf2UTOB0eYxcePVWEEI /yAIHT/N9d9qFo7sJxUSvBwDF3Fyh9IR5aIql4dlWmHpDPvX10oSP9mAZOmGpFF4nS1Z 3ayC902Y2YlaO9JJ73tCxQvjapjo5XlCyiNBy1swHXXuKBWLOki6F3ae3OoMkEdfwCBU /YmlvebArzA2nzOwOOID0q3Qu+bM0xdEBRuH2kBsUfcgxyt85ev8AoDoMoECBLqHseZt +Dsw== X-Gm-Message-State: AOAM533uFsnWbQX1dyoh2x9ylu1fRcmPoSQeqE9nMk5hev+OhFUdBN94 ort2v18WKTcon3WNTPNZGypt1KCe X-Google-Smtp-Source: ABdhPJy2RJ3fiOk5PCME1tHdBHcznHOPLaC99HwKaMULdBAqxQpsvq1Se8swIlPQy1bAm7t0Jg/Spw== X-Received: by 2002:a37:a056:: with SMTP id j83mr27125086qke.329.1591104703107; Tue, 02 Jun 2020 06:31:43 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v6 02/10] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' Date: Tue, 2 Jun 2020 10:30:59 -0300 Message-Id: <20200602133107.1987182-3-danielhb413@gmail.com> In-Reply-To: <20200602133107.1987182-1-danielhb413@gmail.com> References: <20200602133107.1987182-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , jtomko@redhat.com, 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.84 on 10.5.11.22 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 | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + 4 files changed, 9 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f12769635a..1b40735b6c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -582,6 +582,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "tcg", "virtio-blk-pci.scsi.default.disabled", "pvscsi", + + /* 370 */ + "spapr-tpm-proxy", ); =20 =20 @@ -1306,6 +1309,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 076ecad0f7..478cd2398f 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -564,6 +564,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_VIRTIO_BLK_SCSI_DEFAULT_DISABLED, /* virtio-blk-pci.scsi dis= abled by default */ QEMU_CAPS_SCSI_PVSCSI, /* -device pvscsi */ =20 + /* 370 */ + QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY, /* -device spapr-tpm-proxy */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; =20 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.ppc64.xml index eeec181f62..b6b226da51 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -185,6 +185,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 69e5b4c8fa..ee5ab416aa 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -201,6 +201,7 @@ + 5000000 0 42900241 --=20 2.26.2