[22.04 FEAT] KVM: Allow long kernel command lines for QEMU

Bug #1959984 reported by bugproxy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Skipper Bug Screeners
qemu (Ubuntu)
Fix Released
High
Skipper Bug Screeners

Bug Description

KVM: Allow long kernel command lines for QEMU

Description:
Originally, the kernel command line length was limited to 896 bytes, due to its fixed size in the kernel image. Recent kernels can support larger command lines by checking out the position and length using new fields in the kernel image. This feature allows QEMU direct kernel boot to use larger command lines.

Related branches

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-196326 severity-high targetmilestone-inin2204
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Revision history for this message
Frank Heimes (fheimes) wrote :

Changing to Incomplete for now, until kernel version and/or commits are shared for integration.

Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
importance: Undecided → High
Changed in linux (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Changed in ubuntu-z-systems:
status: New → Incomplete
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2022-02-04 08:17 EDT-------
There are only changes in QEMU and the commit is b2173046a64b ("s390x/ipl: support extended kernel command line size"). Of course, to make use of this feature the guest kernel has to support extended kernel cmdline sizes.

Revision history for this message
Frank Heimes (fheimes) wrote :

Updating the affected component from kernel to qemu.

affects: linux (Ubuntu) → qemu (Ubuntu)
tags: added: qemu-22.04
Revision history for this message
Frank Heimes (fheimes) wrote :

But the kernelsupport for long command lines is not in place yet for jammy.
I think it's kernel commit "s390: support command lines longer than 896 bytes" 5ecb2da660ab,
and that went upstream with 5.16, hence it's not in jammy's 5.15 master-next yet (I just double checked).
Hence I'm adding here again kernel as affected component.

Changed in qemu (Ubuntu):
status: Incomplete → New
Changed in ubuntu-z-systems:
status: Incomplete → New
Revision history for this message
Frank Heimes (fheimes) wrote :

Unfortunately, "s390: support command lines longer than 896 bytes" 5ecb2da660ab does not apply while tying to cherry pick, hence a backport for kernel 5.15 is needed.

Changed in linux (Ubuntu):
status: New → Incomplete
Frank Heimes (fheimes)
Changed in qemu (Ubuntu):
status: New → Incomplete
Changed in ubuntu-z-systems:
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for the report, since this isn't in a released qemu version so far I've added it to the qemu 6.2 that I'm preparing right now.

Changed in qemu (Ubuntu):
status: Incomplete → Fix Committed
Frank Heimes (fheimes)
information type: Private → Public
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2022-02-08 07:17 EDT-------
FWIW: Backporting the long kernel command line is not a pre-req for adding this to QEMU. This change is required to support *guests* which have the necessary kernel support(e.g. future Ubuntu 22.10 or upcoming HWE kernels).

Revision history for this message
Frank Heimes (fheimes) wrote :

@Viktor, yes sure - and Christian already started to get it in (#7).
But since jammy is an LTS I think it would just make sense to have the kernel patch in 5.15 as well.

Revision history for this message
Frank Heimes (fheimes) wrote :

So just for the records:
with first picking:
277c8389386e ("390/kexec_file: move kernel image size check")
before
5ecb2da660ab ("s390: support command lines longer than 896 bytes")
I get the code into jammy's master-next.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI: If you want/need a test - builds of the qemu that have that are in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4753

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Incomplete → Fix Committed
Frank Heimes (fheimes)
Changed in linux (Ubuntu):
status: Incomplete → New
Revision history for this message
Frank Heimes (fheimes) wrote :

Since a separate ticket got opened for the kernel part here: LP#1960580
I'm removing the 'affects kernel' portion from this one.

no longer affects: linux (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (12.8 KiB)

This bug was fixed in the package qemu - 1:6.2+dfsg-2ubuntu5

---------------
qemu (1:6.2+dfsg-2ubuntu5) jammy; urgency=medium

  * d/p/u/tcg-Remove-dh_alias-indirection-for-dh_typecode.patch: fix 32bit
    tcg on s390x.

qemu (1:6.2+dfsg-2ubuntu4) jammy; urgency=medium

  * No-change rebuild to update maintainer scripts, see LP: 1959054

qemu (1:6.2+dfsg-2ubuntu3) jammy; urgency=medium

  * Merge with Debian unstable, remaining changes:
    - qemu-kvm to systemd unit
      - d/qemu-kvm-init: script for QEMU KVM preparation modules, ksm,
        hugepages and architecture specifics
      - d/qemu-system-common.qemu-kvm.service: systemd unit to call
        qemu-kvm-init
      - d/qemu-system-common.install: install helper script
      - d/qemu-system-common.qemu-kvm.default: defaults for
        /etc/default/qemu-kvm
      - d/rules: call dh_installinit and dh_installsystemd for qemu-kvm
    - Distribution specific machine type
      (LP: 1304107 1621042 1776189 1761372 1761372 1776189)
      - d/p/ubuntu/define-ubuntu-machine-types.patch: define distro machine
        types containing release versioned machine attributes
      - d/qemu-system-x86.NEWS Info on fixed machine type defintions
        for host-phys-bits=true
      - Add an info about -hpb machine type in debian/qemu-system-x86.NEWS
      - ubuntu-q35 alias added to auto-select the most recent q35 ubuntu type
    - Enable nesting by default
      - d/p/ubuntu/enable-svm-by-default.patch: Enable nested svm by default
        in qemu64 on amd
        [ No more strictly needed, but required for backward compatibility ]
    - tolerate ipxe size change on migrations to >=18.04 (LP: 1713490)
      - d/p/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch: old machine types
        reference 256k path
      - d/control-in: depend on ipxe-qemu-256k-compat-efi-roms to be able to
        handle incoming migrations from former releases.
    - d/qemu-system-x86.README.Debian: add info about updated nesting changes
    - d/p/lp-1952448-relax-skiboot-gcc-deprecation-errors.patch:
      add patch to workaround FTBFS when building against OpenSSL 3.0.
    - d/optionrom.mak, d/p/u/avoid-fcf-clashing-with-i486.patch: fix
      -fcf-protection being unavailble on -march=i486 (LP 1940029)
    - Ease the use of module retention on upgrades (LP 1913421)
      - debian/qemu-block-extra.postinst: enable mount unit on install/upgrade
    - Make qemu-system-x86-microvm a transitional package as the binary is now
      in qemu-system-x86 itself.
  * Dropped Changes [now part of 1:6.1+dfsg-8]:
    - updated debian/patches/linux-user-binfmt-P.diff to work with in-kernel code
      (#993658) (LP 1947860)
    - improved dependencies
      - Make qemu-system-common depend on qemu-block-extra
      - Make qemu-utils depend on qemu-block-extra
    - d/control*, d/rules: disable xen by default, but provide universe
      package qemu-system-x86-xen as alternative
      [includes compat links changes of 5.0-5ubuntu4]
    - d/p/ubuntu/lp-1929926-*: avoid segfaults by uretprobes (LP 1929926)
  * Dropped Changes [now part of upstream]
    - d/p/u/lp-1932175-s390x-cpumodel-add-3931-and-3932.patch: add new 3931
      and 3932 mac...

Changed in qemu (Ubuntu):
status: Fix Committed → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.