From ca3180a4e2852dc0b5c5826f6eda86b1ad6ac138 Mon Sep 17 00:00:00 2001 From: Daniel Rossier Date: Tue, 17 Nov 2026 18:42:16 +0100 Subject: [PATCH] bsp/virt64: expose EL2 for AVZ on the bare-U-Boot chain The bare-U-Boot path (no ATF) wrote the QEMU machine as a plain "virt,gic-version=2", omitting virtualization=on even for an AVZ guest. Without EL2 the hypervisor faults on its first EL2 system-register access (msr VPIDR_EL2) as a synchronous abort, and the machine resets in a loop. The from-card path already guarded this; the bare path now does too. --- build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc index 12192d56c..0a741ffad 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc @@ -194,8 +194,15 @@ def __do_platform_boot_chain(d): if os.path.exists(flash_path): os.remove(flash_path) - __write_boot_conf(d, fs_dir, chain, "virt,gic-version=2", - "-kernel u-boot/u-boot") + machine = "virt,gic-version=2" + if hyp == "avz": + # AVZ is an EL2 hypervisor, so the machine has to expose EL2. + # Without it AVZ faults on its first EL2 system-register access, + # which surfaces as a synchronous abort and a reset. + + machine += ",virtualization=on" + + __write_boot_conf(d, fs_dir, chain, machine, "-kernel u-boot/u-boot") return # ATF chains: build flash0.img. "atf+uboot" and "atf+optee+uboot"