[Ubuntu 21.04] QEMU is missing virtio-9p-ccw

Bug #1916230 reported by bugproxy on 2021-02-19
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Medium
Skipper Bug Screeners
qemu (Ubuntu)
Medium
Christian Ehrhardt 

Bug Description

---Problem Description---
QEMU 5.2.0 (Ubuntu 21.04) does not have the virtio-9p-ccw device.
Following patch should be used at
https://lists.nongnu.org/archive/html/qemu-devel/2021-02/msg05793.html.
This should be back-ported.

---Steps to Reproduce---
Build QEMU from https://download.qemu.org/qemu-5.2.0.tar.xz and try qemu-system-s390x -device virtio-9p-ccw

Userspace tool common name: QEMU

The userspace tool has the following bit modes: 64-bit

Userspace rpm: qemu-system-s390x

Userspace tool obtained from project website: 5.2.0

Commit 2c44220d05 ("meson: convert hw/arch*"), which migrated the old
Makefile.objs to meson.build accidentally excluded virtio-ccw-9p.c and
thus the virtio-9p-ccw device from the build (and potentially also
included the file virtio-ccw-blk.c twice in the source set). And since
CONFIG_VIRTFS can't be used the way it was used here (see commit
2c9dce0196 ("meson: do not use CONFIG_VIRTFS")), the preconditions have
to be written differently.

Let's fix this!

Signed-off-by: Halil Pasic <email address hidden>
Fixes: 2c44220d05 ("meson: convert hw/arch*")
Reported-by: Jakob Naucke <email address hidden>
Cc: <email address hidden>
---
 hw/s390x/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build
index 2a7818d94b..91495b5631 100644
--- a/hw/s390x/meson.build
+++ b/hw/s390x/meson.build
@@ -40,7 +40,9 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_NET', if_true:
files('virtio-ccw-net.c'))
 virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-ccw-rng.c'))
 virtio_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio-ccw-scsi.c'))
 virtio_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true:
files('virtio-ccw-serial.c'))
-virtio_ss.add(when: ['CONFIG_VIRTIO_9P', 'CONFIG_VIRTFS'], if_true:
files('virtio-ccw-blk.c'))
+if have_virtfs
+ virtio_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-ccw-9p.c'))
+endif
 virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-ccw.c'))
 virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true:
files('vhost-user-fs-ccw.c'))
 s390x_ss.add_all(when: 'CONFIG_VIRTIO_CCW', if_true: virtio_ss)

base-commit: 1af5629673bb5c1592d993f9fb6119a62845f576
--
2.25.1

Related branches

bugproxy (bugproxy) on 2021-02-19
tags: added: architecture-all bugnameltc-191588 severity-medium targetmilestone-inin2104
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → qemu (Ubuntu)
Frank Heimes (fheimes) on 2021-02-19
Changed in qemu (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Skipper Bug Screeners (skipper-screen-team)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in qemu (Ubuntu):
importance: Undecided → Medium
Changed in ubuntu-z-systems:
importance: Undecided → Medium
tags: added: qemu-21.04
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Indeed this isn't built properly, thanks for the report!
I've asked Cornelia to also push it to GH to pick from there as she has already called it applied in https://lists.nongnu.org/archive/html/qemu-devel/2021-02/msg05910.html

Changed in qemu (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → Christian Ehrhardt  (paelzer)
status: New → Triaged
Frank Heimes (fheimes) on 2021-02-22
Changed in ubuntu-z-systems:
status: New → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI: as-is this triggers
  ../../hw/s390x/meson.build:43:3: ERROR: Unknown variable "have_virtfs".
So we might need more from master than just this one.

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

69202b406e3 "virtfs: convert to meson" isn't present yet in 5.2

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

Instead of all the
  meson.build:1058:have_virtfs = (targetos == 'linux' and
and similar, the old code did configure -> meson
  -Dvirtiofsd=$virtiofsd
And now lower level split yet.

The old one was:
tools/meson.build:1:have_virtiofsd = (targetos == 'linux' and

So let us try to use this one here.

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

Hmm, since 69202b406e3 moved it to the top (to be available in th esubdir to hw/s390x that won't work without doing something similar. I don't want to drag all the chain with me, as-is that would also need c87ea116 "configure: add --without-default-features" and 0a189110 "meson: cleanup Kconfig.host handling" and who knows what else.
I've taken just the define for have_virtfs of 69202b406e3 and nothing else to keep the delta small.
Since in 5.2 nothing else uses that variable that should be save.

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

PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4471/+packages
MP: https://code.launchpad.net/~paelzer/ubuntu/+source/qemu/+git/qemu/+merge/398447

Build log:

[1023/8456] cc -Ilibqemu-s390x-softmmu.fa.p -I. -I../.. -Itarget/s390x -I../../target/s390x -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -std=gnu99 -O2 -g -U_FORTIFY_SOURCE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -g -O2 -ffile-prefix-map=/<<BUILDDIR>>/qemu-5.2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -isystem /<<BUILDDIR>>/qemu-5.2+dfsg/linux-headers -isystem linux-headers -iquote /<<BUILDDIR>>/qemu-5.2+dfsg/tcg/s390 -iquote . -iquote /<<BUILDDIR>>/qemu-5.2+dfsg -iquote /<<BUILDDIR>>/qemu-5.2+dfsg/accel/tcg -iquote /<<BUILDDIR>>/qemu-5.2+dfsg/include -iquote /<<BUILDDIR>>/qemu-5.2+dfsg/disas/libvixl -pthread -fPIE -isystem../../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="s390x-softmmu-config-target.h"' '-DCONFIG_DEVICES="s390x-softmmu-config-devices.h"' -MD -MQ libqemu-s390x-softmmu.fa.p/hw_s390x_virtio-ccw-9p.c.o -MF libqemu-s390x-softmmu.fa.p/hw_s390x_virtio-ccw-9p.c.o.d -o libqemu-s390x-softmmu.fa.p/hw_s390x_virtio-ccw-9p.c.o -c ../../hw/s390x/virtio-ccw-9p.c

LGTM, If you want feel free to check out the MP or the PPA in advance to the final upload.

Changed in qemu (Ubuntu):
status: Triaged → Fix Committed
Frank Heimes (fheimes) on 2021-02-22
Changed in ubuntu-z-systems:
status: Triaged → Fix Committed
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-02-24 08:44 EDT-------
LGTM & works for me. Awesome, thank you!

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2021-02-24 09:04 EDT-------
Sorry, I was unaware the address would be hidden.
LGTM & works for me. Awesome, thank you!
Jakob Naucke

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.1 KiB)

This bug was fixed in the package qemu - 1:5.2+dfsg-6ubuntu2

---------------
qemu (1:5.2+dfsg-6ubuntu2) hirsute; urgency=medium

  * d/p/u/lp-1916705-disas-Fix-build-with-glib2.0-2.67.3.patch: Fix FTFBS due
    to glib2.0 >=2.67.3 (LP: #1916705)

qemu (1:5.2+dfsg-6ubuntu1) hirsute; urgency=medium

  * Merge with Debian unstable, includes fixes for
    - build operates differently if source is a git repo (LP: #1887535)
    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)
      - d/p/ubuntu/define-ubuntu-machine-types.patch: distro machine types
      - d/qemu-system-x86.NEWS Info on fixed machine type definitions
        for host-phys-bits=true (LP: 1776189)
      - add an info about -hpb machine type in debian/qemu-system-x86.NEWS
      - provide pseries-bionic-2.11-sxxm type as convenience with all
        meltdown/spectre workarounds enabled by default. (LP: 1761372).
      - 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 ]
    - improved dependencies
      - Make qemu-system-common depend on qemu-block-extra
      - Make qemu-utils depend on qemu-block-extra
      - let qemu-utils recommend sharutils
    - 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/control-in: Disable capstone disassembler library support (universe)
    - d/qemu-system-x86.README.Debian: add info about updated nesting changes
    - 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]
    - allow qemu to load old modules post upgrade (LP 1847361)
      - Drop d/qemu-block-extra.*.in, d/qemu-system-gui.*.in
      - d/rules: Drop generating package version into maintainer scripts
      - d/qemu-system-gui.prerm: add no-op prerm to overcome upgrade issues on
        the bad old prerm (LP 1906245 1905377)
    - d/p/ubuntu/lp-1907789-build-no-pie-is-no-functional-liker-flag.patch: fix
      ld usage of -no-pie (LP 1907789)
  * Added changes
    - d/p/u/lp-1916230-hw-s390x-fix-build-for-virtio-9p-ccw.patch: fix
      virtio-9p-ccw being missing (LP: #1916230)

qemu (1:5.2+dfsg-6) unstable; urgency=medium

  * deprecate qemu-debootstrap. It is not needed anymore with
    binfmt F flag, since eve...

Read more...

Changed in qemu (Ubuntu):
status: Fix Committed → Fix Released
Frank Heimes (fheimes) on 2021-03-08
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2021-03-08 06:19 EDT-------
IBM bugzilla status-> closed, Fix Released by hirsuite

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers