From nobody Mon Nov 25 23:25: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=1589581525; cv=none; d=zohomail.com; s=zohoarc; b=AM8Ncri5VTkzrBUITs9XxYv77NXlSTgdQIhPZXNrfHngHWq1bL64oDKt84Xd4KNcYN8W5bf4A6+lN9UIklBBliGx7njfG3au2DndnYnaLlQW0/XPnD/J98Dtm/e9yUySAvQ63ACoaMDUk5iMiS+EvVkFoH1he8F+hhztq2bbmCk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589581525; 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=npBK88VokU2T4owAKENHzsL9m8kGSAgzOm1x9QJxZyU=; b=fe0NzKv8frigfnetXDHlDEkiJs73UH/M0TyQYWuPXnZucajOn1npK6H0jmkxPE9YJZtsa/hJw8+neik+T36yXYSZT73A9m7b+vdv0PMlrslR8rs1plBnt3AMYXpCkPGn5AvKz7xzjZGNQA2cRBPl1nxM4UoQjHdW4VZYFmrzl0o= 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 1589581525197927.9477562364256; Fri, 15 May 2020 15:25:25 -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-306-gA9AH_0pMzaSXVDIWcZ55w-1; Fri, 15 May 2020 18:25:21 -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 5FC40107ACCA; Fri, 15 May 2020 22:25:16 +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 3D32F1C8; Fri, 15 May 2020 22:25:16 +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 064C61809543; Fri, 15 May 2020 22:25:16 +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 04FMPCvG015266 for ; Fri, 15 May 2020 18:25:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2272D10913DA; Fri, 15 May 2020 22:25:12 +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 1D47B100B8A5 for ; Fri, 15 May 2020 22:25:10 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 03342101A525 for ; Fri, 15 May 2020 22:25:10 +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-442-sh5WQSXyMiqgDZtbkVm2tw-1; Fri, 15 May 2020 18:25:05 -0400 Received: by mail-qv1-f67.google.com with SMTP id v15so1893952qvr.8; Fri, 15 May 2020 15:25:05 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:fbf2:bc5e:c314:af31:7070]) by smtp.gmail.com with ESMTPSA id o18sm3181386qtb.7.2020.05.15.15.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2020 15:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589581523; 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=npBK88VokU2T4owAKENHzsL9m8kGSAgzOm1x9QJxZyU=; b=blalPDIyPwHWbZFlqbYEeIV5A6y/XvF5KLbgmDeaGIn/UoXLeKcudEAStP+vnw27N8vdK8 skSHSBVkfSuT4JtpXNpAOYQf0sqhd7iFbjij1pAHwjMGZzSYBO/dsksDQyx3vyTdFn4mRC 7Fxrppr2T/tWxnejFPZ9Ha+yZUCpAeQ= X-MC-Unique: gA9AH_0pMzaSXVDIWcZ55w-1 X-MC-Unique: sh5WQSXyMiqgDZtbkVm2tw-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=npBK88VokU2T4owAKENHzsL9m8kGSAgzOm1x9QJxZyU=; b=YX4xeAVNnhWXLNvI7s5JEBmbPuGL6vgdB2bbEcOeV1NY6Q1BhF57DCxqnEScCTpOfB j+EACrZPjC1YEx7KRN5djL3ponTeb4uro+8t6/NLePn4NpeNwZul7KkCrHOlbVckgloG XyH1VD/7lYJfWGzM4qfjMxSAENq8Nkr2ulWg8dfNfiAZpLHMFyPQbURlqsj7E3b2U6Cf W4Oe7Eag0CCRn7xvP7MagMUw4EB6W3z7H4LHYUZzKKs/py3ySq8M+xhPqfBEfIeVpGWw kOgMZJqykVejZ5Zr9ADefyiXX7/3gF8FgHnAJa/nCHgE0hxwlGNpP7/zxjhNqKCHocYw aVCw== X-Gm-Message-State: AOAM532ix1w3ydbfN0JRRXW7QiZZoswoHr+NFUdcqWSQjxEpjwN3hPPM ERiNlDSG6rEcOsEuEDJrki8MFpjW X-Google-Smtp-Source: ABdhPJy8osBhEm+TjLEE/S5cnRbwGcuPbQvcghRK/9yu0LEqaHTZlWWdVqG/D841dKCWhDOjCHrxJQ== X-Received: by 2002:a0c:eb11:: with SMTP id j17mr5712050qvp.197.1589581504665; Fri, 15 May 2020 15:25:04 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v4 02/10] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' Date: Fri, 15 May 2020 19:24:05 -0300 Message-Id: <20200515222413.1231605-3-danielhb413@gmail.com> In-Reply-To: <20200515222413.1231605-1-danielhb413@gmail.com> References: <20200515222413.1231605-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, jtomko@redhat.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. 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 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