From nobody Mon Sep 8 02:40:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1756140368; cv=none; d=zohomail.com; s=zohoarc; b=INoj5r+0NTF+eJFJd7Pl7Go1G/7JkdfMnvj3ZYfzA90EiZSyBFS/e4Fw8q+aV7aoOHJbLYfwk9U4RKYRuMIApnyvcWqlooCMbkrKGzQea4/sf6CbZWrRS1EMR/b3KamI1l/uM289b0+3gHa7H+jzQzQPOd/7R0XbH9wsjhxxdjg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756140368; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=mS0MEQLi+ztfG/GExdA0V7rYY6pns+gVszRm72newmA=; b=kqcFynJy3gNpP/XElxwZDOMxNniR3CYX5A7Z8qzZPZvPsUZZJ7wZ1FdHBuNCQ3lNuJcvu0hsGKRtUfkGsEGnE6ERMU6kSwjC1ChZh2UC7D/5DeHy6nEc/ZiMeu1B/0QSHxw8qdmlhhJcJgFd4Rk52jNNKX8QYkA3M7eTPQSdw1Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1756140368680528.0587039433801; Mon, 25 Aug 2025 09:46:08 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A8C6843EBF; Mon, 25 Aug 2025 12:46:07 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 03A1F43E99; Mon, 25 Aug 2025 12:22:41 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A382E43EFB; Mon, 25 Aug 2025 12:22:29 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B111A43F22 for ; Mon, 25 Aug 2025 12:19:55 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-350-XUptDzW5O4qZcD86BHCmbg-1; Mon, 25 Aug 2025 12:19:52 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8BA7818002A2 for ; Mon, 25 Aug 2025 16:19:42 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.224.68]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BD24F30001A5 for ; Mon, 25 Aug 2025 16:19:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756138795; h=from:from: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; bh=mS0MEQLi+ztfG/GExdA0V7rYY6pns+gVszRm72newmA=; b=PK2xfotDsOcMCNMo2C05UouWdFMIyr/7eZAcEyFMr1bTG+KPtVLw0F0lVapaHdt4tyq1e8 CwNYYu0wVaXbV2qqKLwhTYuIyoZeMrSYup8E0eaM0hJabUyaiiMdHE4Tgn9m2JK82fdBVa 5mmwA65IjMagJ6EC/TFHHtxA8ckLtsU= X-MC-Unique: XUptDzW5O4qZcD86BHCmbg-1 X-Mimecast-MFC-AGG-ID: XUptDzW5O4qZcD86BHCmbg_1756138791 To: devel@lists.libvirt.org Subject: [PATCH v2 04/10] tests: Add tests for SEV firmware selection Date: Mon, 25 Aug 2025 18:19:27 +0200 Message-ID: <20250825161933.228626-5-abologna@redhat.com> In-Reply-To: <20250825161933.228626-1-abologna@redhat.com> References: <20250825161933.228626-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: mHOvjby5VWnKowcInOeDEkUCGtGUBL23MudYjZ5Isz8_1756138791 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MWHUR6FU5OYBEETKH435NH47NT64M325 X-Message-ID-Hash: MWHUR6FU5OYBEETKH435NH47NT64M325 X-MailFrom: abologna@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Andrea Bolognani via Devel Reply-To: Andrea Bolognani X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1756140370772116600 Content-Type: text/plain; charset="utf-8"; x-default="true" One of the new test cases demonstrates how firmware autoselection doesn't currently work correctly for domains using SEV-SNP: the descriptor for a suitable firmware exists, and yet it doesn't get picked up. The other test cases shows that, while firmware autoselection succeeds for non-SNP SEV domains, the results are not the expected ones: the generic (stateful) edk2 build is used instead of the SEV-specific (stateless) one. Signed-off-by: Andrea Bolognani --- ...-auto-efi-sev-snp.x86_64-latest+amdsev.err | 1 + ...-auto-efi-sev-snp.x86_64-latest+amdsev.xml | 38 ++++++++++++++++ .../firmware-auto-efi-sev-snp.xml | 20 +++++++++ ...are-auto-efi-sev.x86_64-latest+amdsev.args | 37 ++++++++++++++++ ...ware-auto-efi-sev.x86_64-latest+amdsev.xml | 43 +++++++++++++++++++ .../qemuxmlconfdata/firmware-auto-efi-sev.xml | 20 +++++++++ tests/qemuxmlconftest.c | 8 ++++ 7 files changed, 167 insertions(+) create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-= latest+amdsev.err create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-= latest+amdsev.xml create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.xml create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev.x86_64-late= st+amdsev.args create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev.x86_64-late= st+amdsev.xml create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev.xml diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-latest+= amdsev.err b/tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-latest+= amdsev.err new file mode 100644 index 0000000000..3edb2b3451 --- /dev/null +++ b/tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-latest+amdsev.= err @@ -0,0 +1 @@ +operation failed: Unable to find 'efi' firmware that is compatible with th= e current configuration diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-latest+= amdsev.xml b/tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-latest+= amdsev.xml new file mode 100644 index 0000000000..81ac7888ea --- /dev/null +++ b/tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-latest+amdsev.= xml @@ -0,0 +1,38 @@ + + guest + 63840878-0deb-4095-97e6-fc444d9bc9fa + 1048576 + 1048576 + 1 + + hvm + + + + + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + +
+ + + + +