From 5c891aab54f1432f2afe75bf0dee0027fbb2e4bd Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 19 Feb 2026 22:35:54 +0000 Subject: xen: fix x86-64 boot and guest bundling issues Fix several issues found during x86-64 Xen testing: - xen-image-minimal: use -cpu host for KVM to avoid Xen CPUID filtering stripping AVX/AVX2 from x86-64-v3 builds, causing illegal instruction crashes in Dom0 - xen-image-minimal: use QB_MEM_VALUE (not QB_MEM) to properly override the hard assignment in qemuboot-xen-defaults.bbclass - xen-image-minimal: set dom0_mem=512M via QB_XEN_CMDLINE_EXTRA - qemuboot-xen-x86-64.cfg: add dom0_mem=512M to static syslinux config so guest autostart has memory available - vgabios: use ${SAVANNAH_GNU_MIRROR} for reliable downloads - alpine-xen-guest-bundle: add per-architecture checksums for aarch64 and x86_64 tarballs, fix S variable warning Signed-off-by: Bruce Ashfield --- recipes-extended/images/xen-image-minimal.bb | 10 ++++++++-- recipes-extended/vgabios/vgabios_0.8a.bb | 2 +- .../xen-guest-bundles/alpine-xen-guest-bundle_3.23.bb | 7 +++++-- wic/qemuboot-xen-x86-64.cfg | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/recipes-extended/images/xen-image-minimal.bb b/recipes-extended/images/xen-image-minimal.bb index 68b5b029..f4ab99d8 100644 --- a/recipes-extended/images/xen-image-minimal.bb +++ b/recipes-extended/images/xen-image-minimal.bb @@ -92,8 +92,14 @@ WKS_FILE:x86-64 = "directdisk-xen.wks" WKS_FILE_DEPENDS_DEFAULT:x86-64 = "syslinux-native" WKS_FILE:qemux86-64 = "qemuboot-xen-x86-64.wks" WKS_FILE_DEPENDS_DEFAULT:qemux86-64 = "syslinux-native" -# Dom0 needs enough memory for containerd + vxn DomU management -QB_MEM ?= "-m 1024" +# Xen Dom0 needs the full host CPU feature set (AVX, AVX2, etc.) since +# the machine default Skylake-Client model can lose features through Xen's +# nested CPUID filtering, causing illegal instruction crashes with x86-64-v3. +QB_CPU_KVM:qemux86-64 = "-cpu host -machine q35,i8042=off" +# Dom0 needs enough memory for containerd + vxn DomU management. +# QB_MEM_VALUE overrides the ??= default in qemuboot-xen-defaults; +# QB_MEM itself is a hard assign in the class so ?= here won't work. +QB_MEM_VALUE = "1024" QB_XEN_CMDLINE_EXTRA = "dom0_mem=512M" QB_DEFAULT_KERNEL ?= "none" QB_DEFAULT_FSTYPE ?= "wic" diff --git a/recipes-extended/vgabios/vgabios_0.8a.bb b/recipes-extended/vgabios/vgabios_0.8a.bb index 044bb4ec..9a996955 100644 --- a/recipes-extended/vgabios/vgabios_0.8a.bb +++ b/recipes-extended/vgabios/vgabios_0.8a.bb @@ -7,7 +7,7 @@ DEPENDS = "dev86-native" LIC_FILES_CHKSUM = "file://COPYING;md5=fae731a3adbc92fd8bb1730d1f2455bc" -SRC_URI = "http://savannah.gnu.org/download/vgabios/${BP}.tgz \ +SRC_URI = "${SAVANNAH_GNU_MIRROR}/vgabios/${BP}.tgz \ file://build-cc.patch" SRC_URI[sha256sum] = "481042240ef0f1c918780c92a6bb42ad4d3f5d989b29502fa7ee7faf13a041b9" diff --git a/recipes-extended/xen-guest-bundles/alpine-xen-guest-bundle_3.23.bb b/recipes-extended/xen-guest-bundles/alpine-xen-guest-bundle_3.23.bb index 6b9c9d79..8d45cd8d 100644 --- a/recipes-extended/xen-guest-bundles/alpine-xen-guest-bundle_3.23.bb +++ b/recipes-extended/xen-guest-bundles/alpine-xen-guest-bundle_3.23.bb @@ -23,12 +23,15 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda inherit xen-guest-bundle +S = "${UNPACKDIR}" + ALPINE_VERSION = "3.23.3" ALPINE_ARCH = "aarch64" ALPINE_ARCH:x86-64 = "x86_64" -SRC_URI = "https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz;subdir=alpine-rootfs" -SRC_URI[sha256sum] = "f219bb9d65febed9046951b19f2b893b331315740af32c47e39b38fcca4be543" +SRC_URI = "https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz;subdir=alpine-rootfs;name=${ALPINE_ARCH}" +SRC_URI[aarch64.sha256sum] = "f219bb9d65febed9046951b19f2b893b331315740af32c47e39b38fcca4be543" +SRC_URI[x86_64.sha256sum] = "42d0e6d8de5521e7bf92e075e032b5690c1d948fa9775efa32a51a38b25460fb" # Guest definition: name is "alpine", autostart, external (no Yocto image dep) XEN_GUEST_BUNDLES = "alpine:autostart:external" diff --git a/wic/qemuboot-xen-x86-64.cfg b/wic/qemuboot-xen-x86-64.cfg index 94fb0890..eb3a4736 100644 --- a/wic/qemuboot-xen-x86-64.cfg +++ b/wic/qemuboot-xen-x86-64.cfg @@ -5,4 +5,4 @@ SERIAL 0 115200 LABEL boot KERNEL mboot.c32 - APPEND /xen.gz console=com1,vga com1=115200,8n1 loglvl=all guest_loglvl=all --- /bZimage console=hvc0 earlyprintk=xen root=/dev/sda2 pmtmr=0 + APPEND /xen.gz dom0_mem=512M console=com1,vga com1=115200,8n1 loglvl=all guest_loglvl=all --- /bZimage console=hvc0 earlyprintk=xen root=/dev/sda2 pmtmr=0 -- cgit v1.2.3-54-g00ecf