From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 642D31FF13B for ; Wed, 20 May 2026 16:20:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id F3404B9F1; Wed, 20 May 2026 16:20:52 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 3/4] ovmf: honor pre-enrolled-keys setting for aarch64 Date: Wed, 20 May 2026 16:20:34 +0200 Message-ID: <20260520142044.502304-4-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260520142044.502304-1-f.ebner@proxmox.com> References: <20260520142044.502304-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779286832189 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: B47T5NKVS3Q5OU5C7SFLLSABYEWRQLWQ X-Message-ID-Hash: B47T5NKVS3Q5OU5C7SFLLSABYEWRQLWQ X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; 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: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: pve-edk2-firmware-aarch64 <= 4.2025.05-2 did not ship the secure-boot-enabled CODE image yet. If it is present, honor the pre-enrolled-keys option for the EFI drive. If it does not exist, because it's a too old version, fall back to the old behavior, but warn the user. Signed-off-by: Fiona Ebner --- src/PVE/QemuServer/OVMF.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/PVE/QemuServer/OVMF.pm b/src/PVE/QemuServer/OVMF.pm index 7a765fad..1b625e33 100644 --- a/src/PVE/QemuServer/OVMF.pm +++ b/src/PVE/QemuServer/OVMF.pm @@ -49,6 +49,9 @@ my $OVMF = { ], }, aarch64 => { + ms => [ + "$EDK2_FW_BASE/AAVMF_CODE.secboot.fd", "$EDK2_FW_BASE/AAVMF_VARS.ms.fd", + ], default => [ "$EDK2_FW_BASE/AAVMF_CODE.fd", "$EDK2_FW_BASE/AAVMF_VARS.fd", ], @@ -83,6 +86,21 @@ my sub get_ovmf_files($$$$) { } else { # TODO: log_warn about use of legacy images for x86_64 with Promxox VE 9 } + } elsif ($arch eq 'aarch64') { + if ($efidisk->{'pre-enrolled-keys'}) { + # FIXME: MAJOR VERSION: drop this check and expect that the secure-boot-enabled CODE + # image is present. pve-edk2-firmware-aarch64 <= 4.2025.05-2 didn't ship it. + if (file_exists("$EDK2_FW_BASE/AAVMF_CODE.secboot.fd")) { + $type = 'ms'; + } else { + log_warn( + "requested EFI image with pre-enrolled-keys, but ignoring because" + . " $EDK2_FW_BASE/AAVMF_CODE.secboot.fd' file is missing - check that" + . " pve-edk2-firmware-aarch64 is correctly installed with version > 4.2025.05-2" + ); + delete($efidisk->{'pre-enrolled-keys'}); + } + } } my ($ovmf_code, $ovmf_vars) = $types->{$type}->@*; -- 2.47.3