From nobody Sun Feb 8 07:52:49 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=1589398282; cv=none; d=zohomail.com; s=zohoarc; b=AlejemK2z4IvEEPCqexNJQcI8eOEhNwlSyeHGBLSOLGn4ghlaNqXikbAjaSAgQKOoZVY/NChto216tE7s+KHZun+C+cvjNx+6fSLwFWTVqE33PjZNRJoe7BFBQhaPSm5td7arWt4bWRibhqDvBMhSxiD/vt04zFclRMxIZRtaao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589398282; 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=vRUaZZEnHN1eeDkhQOMTwTXA5NE/HD02rJq8NfOYpb0=; b=SNNL1H+NXZQhy+xfvop51mHG3VLvesASVuHdQy5rB5Gs+QTw2lV72faxShtDPrccwFYDpRvuYPCxc2sd6b0r8fn2HO92gyEB0mWTtyJlvL/1TGK3ppNq/VzuKo6yNKL1J3Zr5ViZyxi+yp9DA46q2k7woOdr1KoeISz3aj+EeE0= 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 1589398282348109.41400161637534; Wed, 13 May 2020 12:31:22 -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-480-zwlY68DuOGWDiLvOuhcbyA-1; Wed, 13 May 2020 15:31:18 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 49984801504; Wed, 13 May 2020 19:31:13 +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 D4C3560C87; Wed, 13 May 2020 19:31:11 +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 729164CA95; Wed, 13 May 2020 19:31:11 +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 04DJV80a021912 for ; Wed, 13 May 2020 15:31:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 91E65104FA97; Wed, 13 May 2020 19:31:08 +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 81272104FAA5 for ; Wed, 13 May 2020 19:31:06 +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 2461B8007C8 for ; Wed, 13 May 2020 19:31:06 +0000 (UTC) Received: from mail-qv1-f67.google.com (mail-qv1-f67.google.com [209.85.219.67]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-195-w0mrKAR8P3uvxg3wi5Kw7Q-1; Wed, 13 May 2020 15:31:04 -0400 Received: by mail-qv1-f67.google.com with SMTP id 59so471565qva.13 for ; Wed, 13 May 2020 12:31:03 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:fbf2:bc5e:c314:af31:7070]) by smtp.gmail.com with ESMTPSA id n20sm478880qtk.89.2020.05.13.12.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 12:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589398281; 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=vRUaZZEnHN1eeDkhQOMTwTXA5NE/HD02rJq8NfOYpb0=; b=W6lPD76LiMBvuvW0Q3IlnxYadhT0DqJaWgd5ZIoGw6oRZzhyiidZF1+24vr4KFJjp2QT3a daLN/vEHxIyxanETgOHVBD/fHqzENnGdOu+P2U2Hl84//Yde2BZjfQ/5v2/hY/O7WPVoDB n/iyXL3dpetrGO5fYIreE2Nxm1kVEB0= X-MC-Unique: zwlY68DuOGWDiLvOuhcbyA-1 X-MC-Unique: w0mrKAR8P3uvxg3wi5Kw7Q-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=vRUaZZEnHN1eeDkhQOMTwTXA5NE/HD02rJq8NfOYpb0=; b=kq2QkY4MDWhP501c0T2wbSM2v/4RFC8FOA08h+U0bjWL3j6glD0u8Fa+vMqTXGDvw+ N/z6l+YZ0Pr7A0MqRWhRlH6RvsaIO5mMz4MUmX0b9JeUgfmQ+8y5uO++Elo/z7hhxOx4 J+fDnXhTOHst0IgOZT4Ghl7V9baklZAIswObj4ApG7tafc8iCqzvikBzrewCBH1ggtx0 k3PcYPsvX63lBdK3xf6AElvZ7ZCK1Ov2p3d/dyiq49hiaiMISG4QGjE8wyeBmairTmJn 2btY0m2+4ewffyapXMKFhZRJyLnZJR1vuYE2maUTJ9jz2Nx+B/47d8/JWf/vvE2x9+ZT dzsg== X-Gm-Message-State: AOAM533DQwkYHADcSDjFk7YuC8mibtFnrbL8RGVaV530Syp42gAgqmB2 s9OYQ0uT7GRiDGKE/2CsaCzO4xM1 X-Google-Smtp-Source: ABdhPJxvUKfUQDGpsdkDgiHq5o9DHW5F5FqVr1cXQawr5pF5dlAkD3woeQsKaB4sFTbVIkou91mzJQ== X-Received: by 2002:ad4:42c7:: with SMTP id f7mr1241934qvr.127.1589398263122; Wed, 13 May 2020 12:31:03 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 2/9] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' Date: Wed, 13 May 2020 16:30:37 -0300 Message-Id: <20200513193044.3401170-3-danielhb413@gmail.com> In-Reply-To: <20200513193044.3401170-1-danielhb413@gmail.com> References: <20200513193044.3401170-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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.12 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. 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. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 7e711f22f8..d0d8b1ebf5 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 @@ -1304,6 +1307,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 6bfc7386e3..fa22856e12 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 a68786ddc8..9df68ebfc1 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 c8cc07d954..77f51fe4d8 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