From nobody Tue May 21 23:01:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1641284977; cv=none; d=zohomail.com; s=zohoarc; b=VYG71/MnGshUtwJN0F/OLBzNnIbQS9a47sDqU9jC4MkaglvKeX5GjsfClx2sD/VZ7NTZqT2sYa0LArJrYINX67DCh/QQUajRvRo5KHaN3bXovrZihHFHXRfG14GEFGVmTOfocEfx666U5PpY7GOdK6zENYt/rte80I9mt01P4AE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641284977; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=C2qr8mRzhCXQzg3m2hYv2C+iAShyEM1a6XNhnv7qYpg=; b=D4u8xqQiPri3QJ3rsQWrhDjD8fNMSqz/l+LV154gPV5IL/js1Rl0RDcTZn+DMtjKx2hwLnlucbsdwawG1MiLXGodQ6VXmC6PnTBR8nEIZc8kSY8jczrTOIowNO/mGRQAjwYUC6+UwYYncSmmR1hBPLm1TSKy+NUIUD/m+yGKHrY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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 [170.10.129.124]) by mx.zohomail.com with SMTPS id 1641284977180566.7743342355743; Tue, 4 Jan 2022 00:29:37 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-vOXRWDXZNgW36XO8hvHYeg-1; Tue, 04 Jan 2022 03:29:32 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1053D6408E; Tue, 4 Jan 2022 08:29:27 +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 5013316A4A; Tue, 4 Jan 2022 08:29:26 +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 62AFB1809CB8; Tue, 4 Jan 2022 08:29:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 2048TOwY028314 for ; Tue, 4 Jan 2022 03:29:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 976046F95F; Tue, 4 Jan 2022 08:29:24 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2180D6F95D for ; Tue, 4 Jan 2022 08:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641284976; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=C2qr8mRzhCXQzg3m2hYv2C+iAShyEM1a6XNhnv7qYpg=; b=Ei+k0+Q5uCc5kJeo9mri1EgUdTlBaWhIgLlAZnGHSvz0Ng5QJqi+XJFReObMqAgQc3TAfl 5t5L/yqe6HD1FLbkbUcasnrR9pJ/g6NgoW+sMDZPIbzpr+f6b96q2UXVlQD8+qK/pHFiND Ui5QP/4zxVDGe5+e5z1cEtIzj4Xx7ws= X-MC-Unique: vOXRWDXZNgW36XO8hvHYeg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] conf: Extend TPM ABI stability check for Date: Tue, 4 Jan 2022 09:29:15 +0100 Message-Id: <25576ac816337214cda23441b23b63f17c636ebd.1641284947.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.84 on 10.5.11.23 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) X-ZM-MESSAGEID: 1641284979245100001 Content-Type: text/plain; charset="utf-8" Changing means changing the guest ABI and as such must be prevented on both restoring from a file or migration. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2035888 Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/conf/domain_conf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 716c6d2240..bba662bf4c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21994,6 +21994,20 @@ virDomainTPMDefCheckABIStability(virDomainTPMDef *= src, return false; } =20 + switch (src->type) { + case VIR_DOMAIN_TPM_TYPE_EMULATOR: + if (src->data.emulator.activePcrBanks !=3D dst->data.emulator.acti= vePcrBanks) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Target active PCR banks doesn't match source= ")); + return false; + } + break; + + case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH: + case VIR_DOMAIN_TPM_TYPE_LAST: + break; + } + return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info); } =20 --=20 2.34.1