From nobody Mon Sep 8 17:04:34 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=1753976811; cv=none; d=zohomail.com; s=zohoarc; b=ekn8PSR+wzJKlUALwS/PjhKdBlTkdkMoiwiRfNwrMGjpF1dTiH4C0eEvcs1VkXrTJwgdi0QmtAwTVmZaMtwFqTNzIp9vMEd03uUWMPo8c25aCc800XjePRcURI4WzkXsj0A0pICV7dzNS9BnhG96ju+znyQcQZKjB1lS2S1mBJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753976811; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post: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=WhA5uhIr5gHabgFbJ5/c3U/SOhoD/Qw5m9IicPsmdX0=; b=kcBSLD2oBiD6nwnS4xW998Gb5ygHqn9xShUEHlf0hQ5tM6nxywssQQ5VIQNVj9OsT/OKsC60Ct0wH3YhjcmNADRWhw2TwOcEmcgj599VwBc+POS6J95/C3hfweKGcEpquq2en53FWUOe6WhFBVGroLoXee/b1/QjuA/Wr+1XwxA= 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 1753976810722169.89236425386378; Thu, 31 Jul 2025 08:46:50 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9F85E1262; Thu, 31 Jul 2025 11:46:49 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BD9671287; Thu, 31 Jul 2025 11:45:58 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BC99FA92; Thu, 31 Jul 2025 11:45:52 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 400D9A74 for ; Thu, 31 Jul 2025 11:45:52 -0400 (EDT) Received: from mx-prod-mc-08.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-617-48OE5LFRMWmlkZlb9cjOHg-1; Thu, 31 Jul 2025 11:45:49 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 74715180056F for ; Thu, 31 Jul 2025 15:45:48 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.44.33.228]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A08D11800B4F for ; Thu, 31 Jul 2025 15:45:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753976751; 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=RU4A1lvST21o07yGizn1bmhiKF5/HLcMC9S2C/KnZco=; b=JF1in3KN4WviFn/YW5G50ehxJm3jp4F1OA58kfy5f6P4UoHxYgOi85kDu8TQ0k6+xk0OdB cjdutNX63HROp8s9JgZzzLZqq9C9Rp4PmLXwQp5x2k4Zrc6ahgzHjP7vRimXoXyqUcJKEq BydEdWK3IuwcVgpUm2LVB236PGAdJd0= X-MC-Unique: 48OE5LFRMWmlkZlb9cjOHg-1 X-Mimecast-MFC-AGG-ID: 48OE5LFRMWmlkZlb9cjOHg_1753976748 To: devel@lists.libvirt.org Subject: [PATCH 1/5] tests: Tweak descriptor for combined firmware Date: Thu, 31 Jul 2025 17:45:38 +0200 Message-ID: <20250731154542.109878-2-abologna@redhat.com> In-Reply-To: <20250731154542.109878-1-abologna@redhat.com> References: <20250731154542.109878-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Whf5PdA1uxpYWezlqg93i_IcygqGnsMyy_6cZwyHzGc_1753976748 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4SCVPOSNQ34SQMOWAVDK5VBWHLEQSAGF X-Message-ID-Hash: 4SCVPOSNQ34SQMOWAVDK5VBWHLEQSAGF X-MailFrom: abologna@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: 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: 1753976811736116600 Content-Type: text/plain; charset="utf-8"; x-default="true" This kind of firmware build is not shipped in Fedora, where most descriptors in our test suite come from, so we had to make it up. It was based off the Secure Boot-enabled edk2 build, and the filename it points to is the same. That has been fine so far since it's not actually being picked up by any of the test cases, but that's going to change soon and when it does we want to be able to avoid any confusion. Signed-off-by: Andrea Bolognani Reviewed-by: Jim Fehlig --- .../qemufirmwaredata/usr/share/qemu/firmware/90-combined.json | 4 ++-- tests/qemufirmwaretest.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemufirmwaredata/usr/share/qemu/firmware/90-combined.jso= n b/tests/qemufirmwaredata/usr/share/qemu/firmware/90-combined.json index 2c8381adf7..8ecac440b4 100644 --- a/tests/qemufirmwaredata/usr/share/qemu/firmware/90-combined.json +++ b/tests/qemufirmwaredata/usr/share/qemu/firmware/90-combined.json @@ -1,5 +1,5 @@ { - "description": "OVMF with SB+SMM, SB enabled, MS certs enrolled", + "description": "OVMF with SB+SMM, SB enabled, MS certs enrolled (combi= ned)", "interface-types": [ "uefi" ], @@ -7,7 +7,7 @@ "device": "flash", "mode": "combined", "executable": { - "filename": "/usr/share/edk2/ovmf/OVMF.secboot.fd", + "filename": "/usr/share/edk2/ovmf/OVMF.combined.fd", "format": "raw" } }, diff --git a/tests/qemufirmwaretest.c b/tests/qemufirmwaretest.c index f16ea526ff..a4fb5c9b9c 100644 --- a/tests/qemufirmwaretest.c +++ b/tests/qemufirmwaretest.c @@ -317,7 +317,7 @@ mymain(void) "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd:/usr/shar= e/edk2/ovmf/OVMF_VARS.fd:" "/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2:/usr/share/= edk2/ovmf/OVMF_VARS_4M.qcow2:" "/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/o= vmf/OVMF_VARS.fd:" - "/usr/share/edk2/ovmf/OVMF.secboot.fd:NULL:" + "/usr/share/edk2/ovmf/OVMF.combined.fd:NULL:" "/usr/share/edk2/ovmf/OVMF.amdsev.fd:NULL:" "/usr/share/edk2/ovmf/OVMF.inteltdx.secboot.fd:NULL", VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS, --=20 2.50.1 From nobody Mon Sep 8 17:04:34 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=1753976843; cv=none; d=zohomail.com; s=zohoarc; b=jTJkvbU7/cUTZoH6pmXVceTZR7zec1KvPTuW4bGlpFkhualkqZqupGX7aeqmRo4HPcRTZZTXzNTQN6ch1/zDR2pqhxeVmqtiIDdLL2QRO5IbtuYs4AH0t0GkW6KENSGuwUv+HhhKWa1ZM3cFofTFP2PIxYf/8oMm2to7HfqMXc4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753976843; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post: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=83TmXnunzNsbH74IvLCQpGTKDDEUX4Ky2opc4IUZp6s=; b=R/GnbejdWO3GNndFcbz2b9xFW8AC5PVZSaP2gDjWMy8yXrNL4709tiZyv17oczeWnFF10Bb3ch+3hw0TfdqnzrB+9eVO6WFIQZu2hDai75wA4a3oM3Wd9VsJfxxjkBkMDW4DmZpU1lgcEQpc+MA/f3WUHG8p4NJ8Ero9slqmhwQ= 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 17539768437381004.1937252776918; Thu, 31 Jul 2025 08:47:23 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9289A12BF; Thu, 31 Jul 2025 11:47:22 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id CCE081324; Thu, 31 Jul 2025 11:46:01 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BF1C7A74; Thu, 31 Jul 2025 11:45:53 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 39C72A4E for ; Thu, 31 Jul 2025 11:45:53 -0400 (EDT) Received: from mx-prod-mc-08.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-681-3E2LYRfFPnS7D_heUakTjg-1; Thu, 31 Jul 2025 11:45:50 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C73C0180036F for ; Thu, 31 Jul 2025 15:45:49 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.44.33.228]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F370F180035E for ; Thu, 31 Jul 2025 15:45:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753976752; 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=ATjeJIscSAt1SE/eeTHh0GGhOtKw8CzJkJhi+zaBtV8=; b=MXzZZvHjZA1m1iKv6ui6a8AxQbj47q935WRVBHlFSoyU8I/lweUE4xXOmxSGAWHoAYAvQ3 k/7lIoagc6eHerdrSdluzqwDekGFOm1EWCN4EDR05XWRyvEUHjHDSnYRLOBDyb14Vg3P4a ga7n5q6djmPG+PhO9ixFawfDbpLTpDc= X-MC-Unique: 3E2LYRfFPnS7D_heUakTjg-1 X-Mimecast-MFC-AGG-ID: 3E2LYRfFPnS7D_heUakTjg_1753976749 To: devel@lists.libvirt.org Subject: [PATCH 2/5] tests: Add firmware-auto-efi-sev-snp Date: Thu, 31 Jul 2025 17:45:39 +0200 Message-ID: <20250731154542.109878-3-abologna@redhat.com> In-Reply-To: <20250731154542.109878-1-abologna@redhat.com> References: <20250731154542.109878-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ufuyMDFAJyXT7IBey7SAGj83MYjoZFn9PzsrmpweETs_1753976749 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: EESN7HGVXCPDGNEXD6LSSGMCVRZFXKWB X-Message-ID-Hash: EESN7HGVXCPDGNEXD6LSSGMCVRZFXKWB X-MailFrom: abologna@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: 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: 1753976845903116600 Content-Type: text/plain; charset="utf-8"; x-default="true" This test case 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. 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 ++++++++++ tests/qemuxmlconftest.c | 5 +++ 4 files changed, 64 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 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 + + +
+ + + + +