kernel-5.13.0-23-generic : Unable to boot when Secure Encrypted Virtualization( SEV) is enabled without setting swiotlb boot param
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Invalid
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Invalid
|
Undecided
|
Unassigned |
Bug Description
While investigating LP: #1955395 by using the -generic kernel image, it appeared that it is impossible to boot the kernel unless the boot parameter swiotlb is set to 512M (swiotlb=262144).
Wnen not set, the kernel tries to adjust the bounce buffer to 1024Mb it fails and later trigger a kernel panic with the following trace :
$ grep TLB /tmp/console.log
[ 0.003665] software IO TLB: SWIOTLB bounce buffer size adjusted to 1024MB
[ 0.034219] kvm-guest: KVM setup pv remote TLB flush
[ 0.037063] software IO TLB: Cannot allocate buffer
[ 0.223009] Last level iTLB entries: 4KB 512, 2MB 255, 4MB 127
[ 0.223634] Last level dTLB entries: 4KB 512, 2MB 255, 4MB 127, 1GB 0
[ 0.297424] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.297424] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 1.018860] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 1.019552] software IO TLB: No low mem
[ 1.451497] Kernel panic - not syncing: Can not allocate SWIOTLB buffer earlier and can't now provide you with the DMA bounce buffer
[ 1.491589] ---[ end Kernel panic - not syncing: Can not allocate SWIOTLB buffer earlier and can't now provide you with the DMA bounce buffer ]---
The SWIOTLB adjustment comes from the following kernel commit : https:/
For some reason, the LowMem allocation fails (as seen by the "software IO TLB: No low mem" msg),hence the SWIOTLB adjustment cannot be completed.
When booting with the swiotlb=262144 value, we get the following output :
$ grep TLB /tmp/console.log
[ 0.050908] kvm-guest: KVM setup pv remote TLB flush
[ 0.308896] Last level iTLB entries: 4KB 512, 2MB 255, 4MB 127
[ 0.309494] Last level dTLB entries: 4KB 512, 2MB 255, 4MB 127, 1GB 0
[ 0.373162] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.373162] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 1.071136] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 1.071837] software IO TLB: mapped [mem 0x000000005bebe
[ 1.529804] software IO TLB: Memory encryption is active and system is using DMA bounce buffers
For comparaison, the Fedora 34 kernel (5.15.4-
The SWIOTLB buffer adjustment has been introduced in kernel 5.11.
We can make SEV enabled resources available for testing if needed.
...Louis
---
ProblemType: Bug
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Dec 23 13:32 seq
crw-rw---- 1 root audio 116, 33 Dec 23 13:32 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.20.11-0ubuntu74
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
CasperMD5CheckR
DistroRelease: Ubuntu 22.04
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb: Error: command ['lsusb'] failed with exit code 1:
Lsusb-t:
Lsusb-v: Error: command ['lsusb', '-v'] failed with exit code 1:
MachineType: Scaleway SCW-ENT1-S
Package: linux (not installed)
PciMultimedia:
ProcEnviron:
TERM=screen
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
ProcFB:
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
Tags: jammy uec-images
Uname: Linux 5.13.0-23-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A
_MarkForUpload: True
dmi.bios.date: 02/06/2015
dmi.bios.release: 0.0
dmi.bios.vendor: EFI Development Kit II / OVMF
dmi.bios.version: 0.0.0
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.
dmi.modalias: dmi:bvnEFIDevel
dmi.product.name: SCW-ENT1-S
dmi.product.
dmi.sys.vendor: Scaleway
Changed in linux (Ubuntu Impish): | |
status: | New → Invalid |
Changed in linux (Ubuntu Jammy): | |
status: | Confirmed → Invalid |
tags: | added: rls-jj-incoming |
tags: | removed: rls-jj-incoming |
apport information