From: Stefano Stabellini <sstabellini@kernel.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Michal Orzel" <michal.orzel@amd.com>,
"Doug Goldstein" <cardoe@cardoe.com>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Roger Pau Monné" <roger@xenproject.org>,
"Teddy Astie" <teddy.astie@vates.tech>,
"Daniel P . Smith" <dpsmith@apertussolutions.com>,
"Frediano Ziglio" <freddy77@gmail.com>
Subject: Re: [PATCH 4/4] CI: Add an EFI/StrictNX test
Date: Mon, 30 Nov 2026 12:10:06 -0800 (PST) [thread overview]
Message-ID: <dd7caafc-dec5-d270-17e4-5607ccec1640@kernel.org> (raw)
In-Reply-To: <20261126210337.746228-5-andrew.cooper3@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 5565 bytes --]
On Thu, 26 Nov 2026, Andrew Cooper wrote:
> From: Roger Pau Monné <roger.pau@citrix.com>
>
> While most of our testing of this nature happens in a Debian container,
> Debian's strictnx build of OVMF is buggy at the time of writing. See:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1154178
>
> Fedora have non-strict StrictNX enabled in their SecureBoot build of OVMF, but
> by default it prints a warning on failure and then relaxes permissions. It
> can be turned into strict StrictNX mode with an extra -fw_cfg setting, making
> it actually usable in a CI scenario.
>
> Unlike Debian, Fedora has no equivalent of the enrolled snake-oil key, so for
> simplicity sake just turn off SecureBoot for now.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> CC: Anthony PERARD <anthony.perard@vates.tech>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Doug Goldstein <cardoe@cardoe.com>
> CC: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> CC: Jan Beulich <jbeulich@suse.com>
> CC: Roger Pau Monné <roger@xenproject.org>
> CC: Teddy Astie <teddy.astie@vates.tech>
> CC: Daniel P. Smith <dpsmith@apertussolutions.com>
> CC: Frediano Ziglio <freddy77@gmail.com>
>
> As Fedora 45 is new this series, I've already deployed the container with
> these additions.
> ---
> automation/build/fedora/45-x86_64.dockerfile | 7 ++
> automation/gitlab-ci/test.yaml | 9 +++
> .../scripts/include/xtf-x86_64-efi-strictnx | 64 +++++++++++++++++++
> 3 files changed, 80 insertions(+)
> create mode 100644 automation/scripts/include/xtf-x86_64-efi-strictnx
>
> diff --git a/automation/build/fedora/45-x86_64.dockerfile b/automation/build/fedora/45-x86_64.dockerfile
> index 5a1764c7ee55..e470f19eedb4 100644
> --- a/automation/build/fedora/45-x86_64.dockerfile
> +++ b/automation/build/fedora/45-x86_64.dockerfile
> @@ -67,6 +67,13 @@ RUN <<EOF
> glib2-devel
> pixman-devel
> ninja-build
> +
> + # for test phase, qemu-* jobs
> + edk2-ovmf
> + expect
> + python3-virt-firmware
> + qemu-img
> + qemu-system-x86
> )
>
> dnf -y --setopt=install_weak_deps=False install "${DEPS[@]}"
> diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
> index cf4b7ed416b0..cfde4d05c6e8 100644
> --- a/automation/gitlab-ci/test.yaml
> +++ b/automation/gitlab-ci/test.yaml
> @@ -783,6 +783,15 @@ qemu-smoke-x86_64-gcc-efi-uki:
> needs:
> - debian-13-x86_64-gcc-debug
>
> +qemu-smoke-x86_64-gcc-efi-strictnx:
> + extends: .qemu-smoke-x86_64
> + variables:
> + CONTAINER: fedora:45-x86_64
> + script:
> + - ./automation/scripts/qemu-xtf.sh x86_64-efi-strictnx pv64 example 2>&1 | tee ${LOGFILE}
> + needs:
> + - fedora-45-x86_64-gcc-debug
> +
> qemu-xtf-argo-x86_64-gcc-debug:
> extends: .qemu-smoke-x86_64
> variables:
> diff --git a/automation/scripts/include/xtf-x86_64-efi-strictnx b/automation/scripts/include/xtf-x86_64-efi-strictnx
> new file mode 100644
> index 000000000000..49a87c7dd91f
> --- /dev/null
> +++ b/automation/scripts/include/xtf-x86_64-efi-strictnx
> @@ -0,0 +1,64 @@
> +#!/bin/bash
> +#
> +# XTF test utilities (x86_64, EFI).
> +#
> +
> +# Arch-specific environment overrides.
> +function xtf_arch_prepare()
> +{
> + export FW_PREFIX="${FW_PREFIX:-/usr/share/edk2/ovmf}"
> + export QEMU_PREFIX="${QEMU_PREFIX:-}"
> + export XEN_BINARY="${XEN_BINARY:-${WORKDIR}/xen.efi}"
> + export XEN_CMDLINE="${XEN_CMDLINE:-loglvl=all noreboot console_timestamps=boot console=com1}"
> + export XTF_SRC_BRANCH="${XTF_SRC_BRANCH:-master}"
> + export XTF_SRC_URI="${XTF_SRC_URI:-https://xenbits.xen.org/git-http/xtf.git}"
> + export XTF_SRC_VARIANTS="hvm64 pv64"
> +}
> +
> +# Perform arch-specific XTF environment setup.
> +function xtf_arch_setup()
> +{
> + local esp_dir="${WORKDIR}/boot-esp"
> + local efi_dir="${esp_dir}/EFI/BOOT"
> +
> + # Generate EFI boot environment
> + mkdir -p ${efi_dir}
> + cp ${XEN_BINARY} ${efi_dir}/BOOTX64.EFI
> + cp ${XTF_BINARY} ${efi_dir}/kernel
> +
> + cat > ${efi_dir}/BOOTX64.cfg <<EOF
> +[global]
> +default=test
> +
> +[test]
> +options=${XEN_CMDLINE}
> +kernel=kernel
> +EOF
> +
> + # Fedora has StrictNX built into in the SecureBoot image, but by default
> + # it is permissive and only prints a warning. It's made strict by an
> + # extra -fw_cfg setting.
> + local ovmf_code=${FW_PREFIX}/OVMF_CODE_4M.secboot.qcow2
> + local ovmf_vars=${FW_PREFIX}/OVMF_VARS_4M.secboot.qcow2
> + local ovmf_format=qcow2
> +
> + cp $ovmf_code ${WORKDIR}/OVMF_CODE
> + cp $ovmf_vars ${WORKDIR}/OVMF_VARS
> +
> + # Xen.efi isn't signed, so turn SecureBoot off.
> + virt-fw-vars --inplace ${WORKDIR}/OVMF_VARS --set-false SecureBootEnable
> +
> + export TEST_CMD="${QEMU_PREFIX}qemu-system-x86_64 \
> + -no-reboot \
> + -nographic \
> + -monitor none \
> + -serial stdio \
> + -m 2048 \
> + -smp 2 \
> + -M q35,kernel-irqchip=split \
> + -drive if=pflash,format=${ovmf_format},readonly=on,file=${WORKDIR}/OVMF_CODE \
> + -drive if=pflash,format=${ovmf_format},file=${WORKDIR}/OVMF_VARS \
> + -drive file=fat:rw:${esp_dir},media=disk,index=0,format=raw \
> + -fw_cfg name=opt/org.tianocore/StrictNX,string=yes \
> + "
> +}
> --
> 2.39.5
>
prev parent reply other threads:[~2026-11-30 20:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 21:03 [PATCH 0/4] CI: Add an EFI/StrictNX test Andrew Cooper
2026-11-26 21:03 ` [PATCH 1/4] CI: Update Fedora to 45 Andrew Cooper
2026-11-30 20:10 ` Stefano Stabellini
2026-11-26 21:03 ` [PATCH 2/4] x86/efi: Move the trampoline into .init.data for EFI builds Andrew Cooper
2026-11-30 9:34 ` Jan Beulich
2026-11-30 17:04 ` [PATCH v2 " Andrew Cooper
2026-12-01 7:49 ` Jan Beulich
2026-11-26 21:03 ` [PATCH 3/4] x86/efi: Split .init section to satisfy Microsoft UEFI signing requirements Andrew Cooper
2026-11-30 9:41 ` Jan Beulich
2026-11-30 17:07 ` Andrew Cooper
2026-11-26 21:03 ` [PATCH 4/4] CI: Add an EFI/StrictNX test Andrew Cooper
2026-11-30 20:10 ` Stefano Stabellini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd7caafc-dec5-d270-17e4-5607ccec1640@kernel.org \
--to=sstabellini@kernel.org \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=cardoe@cardoe.com \
--cc=dpsmith@apertussolutions.com \
--cc=freddy77@gmail.com \
--cc=jbeulich@suse.com \
--cc=marmarek@invisiblethingslab.com \
--cc=michal.orzel@amd.com \
--cc=roger@xenproject.org \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.