Ubuntu 22.04 doesn't boot with xen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xen (Ubuntu) |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Focal |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Impish |
Won't Fix
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Kinetic |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira |
Bug Description
[Note]
* This bug addresses Dom0 on Focal and later,
plus DomU pv/pvh/pygrub on Focal _only_
(unintended inconsistency).
* For DomU pv/pvh/pygrub on Jammy and later,
see bug 1998026.
[Impact]
* Xen fails to boot as Dom0 and DomU PV (Dom0 HVM works)
with the HWE kernel from Jammy (5.15) on Focal.
* Xen 4.11 doesn't have support zstd kernel compression,
which was added in Xen 4.15, but it backports nicely.
(First 3 patches for Dom0, and 2 patches for DomU PV).
~/git/xen$ git log --oneline RELEASE-
...
8169f82049ef libxenguest: support zstd compressed kernels
d8099d94dfaa libxenguest: add get_unaligned_
...
d6627cf1b63c x86/Dom0: support zstd compressed kernels
35d2960ae65f lib: introduce xxhash
7c9f81687ad6 introduce unaligned.h
...
[Test Plan]
* On Focal, test Xen with the 5.15 HWE kernel from Jammy,
on the 3 modes (Dom0, DomU PV, and DomU HVM).
* Likewise, check for regressions with the 5.4 GA kernel.
* Basically (full steps in comment #14), on a KVM guest
with serial console enabled for grub/xen/linux kernel:
$ sudo apt install --yes xen-hypervisor-
Before:
* Dom0:
- Boot 'Ubuntu GNU/Linux, with Xen 4.11-amd64 and Linux 5.15.0-33-generic'
...
(XEN) Brought up 2 CPUs
(XEN) Dom0 has maximum 400 PIRQs
(XEN) ELF: not an ELF binary
...
(XEN) Could not set up DOM0 guest OS
* DomU PV:
$ sudo xl create -c xen-5.15-vm.pv
Parsing config from xen-5.15-vm.pv
xc: error: panic: xc_dom_
...
* DomU HVM: (works; it runs in QEMU)
$ sudo xl create -c xen-5.15-vm.hvm
Parsing config from xen-5.15-vm.hvm
[ 0.000000] Linux version 5.15.0-33-generic ...
...
[ 0.000000] DMI: Xen HVM domU, BIOS 4.11.4-pre 07/04/2022
...
After: (ppa:mfo/lp1956166)
* Dom0:
- Boot 'Ubuntu GNU/Linux, with Xen 4.11-amd64 and Linux 5.15.0-33-generic'
...
(XEN) Brought up 2 CPUs
(XEN) Dom0 has maximum 400 PIRQs
(XEN) Xen kernel: 64-bit, lsb, compat32
(XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x4000000
...
[ 0.000000] Linux version 5.15.0-33-generic ...
* DomU PV:
$ sudo xl create -c xen-5.15-vm.pv
Parsing config from xen-5.15-vm.pv
[ 0.000000] Linux version 5.15.0-33-generic ...
...
[ 0.000000] Hypervisor detected: Xen PV
...
* DomU HVM: (still work)
$ sudo xl create -c xen-5.15-vm.hvm
Parsing config from xen-5.15-vm.hvm
[ 0.000000] Linux version 5.15.0-33-generic ...
...
[ 0.000000] DMI: Xen HVM domU, BIOS 4.11.4-pre 07/04/2022
...
[Where problems could occur]
* Even though the patches _add a lot_ of code to support zstd
(ie, read/decompress), the actual _changes_ to existing code
are usually just calling its decompression functions after
the other compression methods. (And some helper factor-out).
* Regressions would likely manifest in the kernel decompression
functions, i.e., _boot_, so should be quick/easy to find out
(with older/non-zstd compressed kernel versions; eg, GA/5.4).
[Other Info]
* Only Focal needs a SRU. The patches are applied in Xen 4.15,
so Kinetic and Jammy (4.16) already have it, and Impish and
Focal (4.11) don't; but Impish is almost EOL, so, only Focal.
* The DomU PV mode hits kernel errors during early boot, and
doesn't get to the initramfs. These issues seem related to
the PV mode only (seen elsewhere, and regardless of kernel
version, 5.4 or 5.15), but it looks like the DomU HVM mode
is more used in practice?
So, theoretically, Ubuntu support for DomU PV wouldn't be
needed, but maybe let's just add it all at once, in case
users are booting other kernels that are patched to work.
[Original Bug Description]
Ubuntu 22.04 doesn't boot with xen
kernels compressed using zstd are only supported in upstream xen 4.15 but xen-4.11 is installed in ubuntu 22.04 together with zstd compressed kernel 5.13.0-19
Either compression needs to be changed to one that is supported by xen or xen packages needs to be upgraded to 4.15 or higher.
Related branches
- Christian Ehrhardt (community): Approve
-
Diff: 80 lines (+58/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/lp1956166-0006-fix-ftbfs-arm-lzo-unaligned.h.patch (+50/-0)
debian/patches/series (+1/-0)
- Stefan Bader: Pending requested
- Canonical Server Core Reviewers: Pending requested
- Christian Ehrhardt : Pending requested
-
Diff: 8480 lines (+8423/-0)8 files modifieddebian/changelog (+12/-0)
debian/control (+1/-0)
debian/patches/lp1956166-0001-introduce-unaligned.h.patch (+284/-0)
debian/patches/lp1956166-0002-lib-introduce-xxhash.patch (+888/-0)
debian/patches/lp1956166-0003-x86-Dom0-support-zstd-compressed-kernels.patch (+6404/-0)
debian/patches/lp1956166-0004-libxenguest-add-get_unaligned_le32.patch (+112/-0)
debian/patches/lp1956166-0005-libxenguest-support-zstd-compressed-kernels.patch (+717/-0)
debian/patches/series (+5/-0)
- Stefan Bader (community): Approve (test)
- Canonical Server Core Reviewers: Pending requested
- Christian Ehrhardt : Pending requested
-
Diff: 24455 lines (+23727/-106)35 files modified.gitignore (+0/-6)
Config.mk (+1/-1)
config.guess (+1658/-0)
config.sub (+1798/-0)
config/Paths.mk.in (+0/-1)
config/Tools.mk.in (+1/-1)
configure (+3630/-0)
debian/changelog (+1526/-0)
debian/control (+3/-2)
docs/Makefile (+1/-7)
docs/configure (+3442/-0)
docs/man/xen-vbd-interface.7.pandoc (+0/-5)
m4/paths.m4 (+1/-8)
tools/Makefile (+1/-0)
tools/Rules.mk (+0/-2)
tools/configure (+11485/-0)
tools/firmware/Makefile (+4/-8)
tools/fuzz/Makefile (+1/-4)
tools/hotplug/Linux/init.d/sysconfig.xencommons.in (+79/-3)
tools/hotplug/Linux/vif-common.sh (+0/-3)
tools/hotplug/Linux/xen-hotplug-common.sh.in (+1/-0)
tools/include/Makefile (+2/-0)
tools/libfsimage/Rules.mk (+1/-2)
tools/libfsimage/common/Makefile (+7/-9)
tools/pygrub/Makefile (+1/-2)
tools/pygrub/setup.py (+0/-5)
tools/pygrub/src/pygrub (+50/-3)
tools/xl/bash-completion (+1/-1)
xen/Makefile (+3/-5)
xen/arch/x86/Makefile (+1/-1)
xen/common/kernel.c (+4/-4)
xen/common/version.c (+11/-11)
xen/drivers/char/console.c (+7/-4)
xen/include/xen/compile.h.in (+4/-4)
xen/include/xen/version.h (+3/-4)
CVE References
- 2020-0543
- 2020-15563
- 2020-15564
- 2020-15565
- 2020-15567
- 2020-25595
- 2020-25596
- 2020-25597
- 2020-25598
- 2020-25599
- 2020-25600
- 2020-25601
- 2020-25602
- 2020-25603
- 2020-25604
- 2020-27670
- 2020-27671
- 2020-27672
- 2020-27674
- 2020-28368
- 2020-29040
- 2020-29479
- 2020-29480
- 2020-29481
- 2020-29482
- 2020-29483
- 2020-29484
- 2020-29485
- 2020-29486
- 2020-29566
- 2020-29567
- 2020-29570
- 2020-29571
- 2021-0089
- 2021-26313
- 2021-26933
- 2021-28687
- 2021-28690
- 2021-28692
- 2021-28693
- 2021-28694
- 2021-28695
- 2021-28696
- 2021-28697
- 2021-28698
- 2021-28699
- 2021-28700
- 2021-28701
- 2021-28702
- 2021-28704
- 2021-28705
- 2021-28706
- 2021-28707
- 2021-28708
- 2021-28709
- 2021-28710
- 2021-3308
tags: | added: server-triage-discuss |
tags: | removed: server-triage-discuss |
tags: | added: sts |
Changed in xen (Ubuntu Kinetic): | |
status: | Fix Released → In Progress |
importance: | Undecided → Medium |
assignee: | Stefan Bader (smb) → Mauricio Faria de Oliveira (mfo) |
Changed in xen (Ubuntu Jammy): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
description: | updated |
This affect Dom0 boot and DomU