apport information

** Attachment added: "CurrentDmesg.txt"
   
https://bugs.launchpad.net/bugs/1955655/+attachment/5549367/+files/CurrentDmesg.txt

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1955655

Title:
  kernel-5.13.0-23-generic : Unable to boot when Secure Encrypted
  Virtualization( SEV) is enabled without setting swiotlb boot param

Status in linux package in Ubuntu:
  Confirmed

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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e998879d4fb7991856916972168cf27c0d86ed12

  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 
0x000000005bebe000-0x000000007bebe000] (512MB)
  [    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-101.fc34.x86_64) with the same 
adjustment mechanism does correctly adjust the SWIOTLB bounce buffer, without 
the need to set the swiotlb= value at boot time.

  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
  CasperMD5CheckResult: unknown
  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_DIR=<set>
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcFB:
   
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.13.0-23-generic 
root=UUID=1f577236-6bf2-48ef-998a-ba45f71aca7f ro console=tty1 console=ttyS0 
swiotlb=262144
  ProcVersionSignature: Ubuntu 5.13.0-23.23-generic 5.13.19
  RelatedPackageVersions:
   linux-restricted-modules-5.13.0-23-generic N/A
   linux-backports-modules-5.13.0-23-generic  N/A
   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.version: pc-q35-3.0
  dmi.modalias: 
dmi:bvnEFIDevelopmentKitII/OVMF:bvr0.0.0:bd02/06/2015:br0.0:svnScaleway:pnSCW-ENT1-S:pvrpc-q35-3.0:cvnQEMU:ct1:cvrpc-q35-3.0:sku:
  dmi.product.name: SCW-ENT1-S
  dmi.product.version: pc-q35-3.0
  dmi.sys.vendor: Scaleway

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1955655/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to