From nobody Tue Feb 10 07:41:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1624631298; cv=none; d=zohomail.com; s=zohoarc; b=iWQsyFxlF3FQQ4Ix3KjReu5eHaAIATDPkxOydPCq5ziKxACnQsBF/agZQ+DMeIXjcWhhp3yRWV+rAZccR0LGi+P0QpXazvWXYPGldKWm6JscSqk4sPODt0uoGjN7n0jqFapINV00xdVzshg0jtQj3lArWXwLHSRnUjwym5leSoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624631298; h=Content-Type:Content-Transfer-Encoding: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=CAb7PUos4lru42Ebv3u1L1Q3+udOgEEas9kxUrP8DAE=; b=Xk1NIzujUdklXP02Fh/3B0XK8DL2C2KumzwXE897ehPvOdY2Zo4ygz/ZfWMZxWM8ZCpzcwdofF24z3i+AmOnPacBV6zpQzRO66mYLExWHHUnqW01b8dFXBHyLSztMLu7wWH9ATf63kZvPYmlw1rMfG08CSloVOmEBSdJ5PN1bHk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1624631298275736.5282518401472; Fri, 25 Jun 2021 07:28:18 -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-OXVhwf4JOLie4fPtWLnq_A-1; Fri, 25 Jun 2021 10:28:15 -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 8D55E1084F5B; Fri, 25 Jun 2021 14:28:09 +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 41F655C1D5; Fri, 25 Jun 2021 14:28:09 +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 1231C4EA38; Fri, 25 Jun 2021 14:28:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15PES79M017813 for ; Fri, 25 Jun 2021 10:28:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5286F5C1D5; Fri, 25 Jun 2021 14:28:07 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6D805C1B4 for ; Fri, 25 Jun 2021 14:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624631297; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=CAb7PUos4lru42Ebv3u1L1Q3+udOgEEas9kxUrP8DAE=; b=UhJNu2wckdnUbxRl5YKbHjcyHg4rR/zd7Cz8yJP9uFGFkQdzxBJgQklsjOqqFe0FvXa68g tvUZA5xbtFq8+G6jkFVZvtKbujfNb5CPemufv8cnkv7+nMg2A7MVg9GJ4JP5g786WvBC9K MlLxFJIZ5+iapi7uiuxYvPfOTD3l9pI= X-MC-Unique: OXVhwf4JOLie4fPtWLnq_A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 5/5] qemu: Reject TPM 1.2 for ARM virt guests Date: Fri, 25 Jun 2021 16:27:45 +0200 Message-Id: <20210625142745.117287-6-abologna@redhat.com> In-Reply-To: <20210625142745.117287-1-abologna@redhat.com> References: <20210625142745.117287-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" We already reject TPM 1.2 in a number of scenarios; let's add ARM virt guests to the list. https://bugzilla.redhat.com/show_bug.cgi?id=3D1970310 Signed-off-by: Andrea Bolognani Tested-by: liuyd.fnst@fujitsu.com --- src/qemu/qemu_validate.c | 6 ++++++ .../qemuxml2argvdata/aarch64-tpm-wrong-model.err | 1 + .../qemuxml2argvdata/aarch64-tpm-wrong-model.xml | 15 +++++++++++++++ tests/qemuxml2argvtest.c | 1 + 4 files changed, 23 insertions(+) create mode 100644 tests/qemuxml2argvdata/aarch64-tpm-wrong-model.err create mode 100644 tests/qemuxml2argvdata/aarch64-tpm-wrong-model.xml diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 382473d03b..b133ce3cd6 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4517,6 +4517,12 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, _("TPM 1.2 is not supported with the SPAPR devi= ce model")); return -1; } + /* TPM 1.2 + ARM does not work */ + if (qemuDomainIsARMVirt(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("TPM 1.2 is not supported on ARM")); + return -1; + } break; case VIR_DOMAIN_TPM_VERSION_2_0: case VIR_DOMAIN_TPM_VERSION_DEFAULT: diff --git a/tests/qemuxml2argvdata/aarch64-tpm-wrong-model.err b/tests/qem= uxml2argvdata/aarch64-tpm-wrong-model.err new file mode 100644 index 0000000000..a3a82fdcf5 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-tpm-wrong-model.err @@ -0,0 +1 @@ +unsupported configuration: TPM 1.2 is not supported on ARM diff --git a/tests/qemuxml2argvdata/aarch64-tpm-wrong-model.xml b/tests/qem= uxml2argvdata/aarch64-tpm-wrong-model.xml new file mode 100644 index 0000000000..9441c4d05a --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-tpm-wrong-model.xml @@ -0,0 +1,15 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1 + + hvm + + + /usr/bin/qemu-system-aarch64 + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 9df28658b9..16236f0331 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2565,6 +2565,7 @@ mymain(void) DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-pstate"); DO_TEST_CAPS_LATEST_PPC64("tpm-emulator-spapr"); DO_TEST_CAPS_ARCH_LATEST("aarch64-tpm", "aarch64"); + DO_TEST_PARSE_ERROR("aarch64-tpm-wrong-model", "aarch64"); =20 DO_TEST_PARSE_ERROR("pci-domain-invalid", NONE); DO_TEST_PARSE_ERROR("pci-bus-invalid", NONE); --=20 2.31.1