New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 741886 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jul 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

[regression] virtio-gpu no longer working

Project Member Reported by norvez@chromium.org, Jul 12 2017

Issue description

When running a VM image (e.g. board "novato") in qemu with '-vga virtio', it bootloops when the UI starts.

To repro, use qemu >= 2.6 (i.e. the one in the chroot) with virtio:


${CHROOT}/usr/bin/qemu-system-x86_64 -smp 4 --enable-kvm -vnc 127.0.0.1:0,ipv4 -m 4096 -usbdevice tablet -vga virtio -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:9222-:22 -drive file=/path/to/vm/image/chromiumos_qemu_image.bin

With a VNC client, observe bootloop.

If '-vga cirrus' is used instead of '-vga virtio', graphics start.


I bisected quickly, CrOS version 9735 works, version 9736 fails.

Looking at CLs go/crosland/log/9735.0.0..9736.0.0, it's probably a regression somewhere in the long list of upstream CLs that were committed between the two.

 
@norvez, I tried setting up board for *novato* but that board option wasn't available. Do I need to use a special tree to be able to set up novato ?

Additionally, I tried booting a *reef* vm with -vga virtio but found out that it doesn't works with the old ToT itself (when none of the i915 CLs were merged). 

P.S: https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/running-chromeos-image-under-virtual-machines mentions this "WARNING: After crbug/710629, 'betty' is the only board regularly run through pre-CQ and CQ VMTest and so is the most likely to work at ToT. 'betty' is based on 'amd64-generic', though, so 'amd64-generic' is likely to also work."
I'll try --board=amd64-generic and see if that works with the old ToT.

Comment 3 by norvez@chromium.org, Jul 13 2017

Ah yes, novato is a private overlay but amd64-generic should have the exact same behaviour, though I haven't tried to repro with amd64-generic.

Not sure about reef, it's possible that it never worked with virtio even though it has the right kernel version, I can look into that.

betty and amd64-generic should also have the same behaviour (betty and novato are both derived from amd64-generic). However the CQ only tests '-vga cirrus' at the moment, because '-vga virtio' is not supported on kernels < 4.4, i.e. by most boards. So a regression that only impacts virtio-gpu could still sneak in. We're working on expanding that test coverage to catch virtio-gpu regressions in the CQ.
@norvez, @seanpaul, https://chromium-review.googlesource.com/c/570926/ should fix this issue.
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 14 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/111294332b13bf0e965365951fd62ef1c2fd27ca

commit 111294332b13bf0e965365951fd62ef1c2fd27ca
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Fri Jul 14 02:46:14 2017

UPSTREAM: drm/virtio: Call drm_helper_mode_fill_fb_struct() before drm_framebuffer_init()

We want framebuffers to be mostly useable already before
drm_framebuffer_init() get called, and so we will start demanding that
all the interesting format/size/etc. information be filled in before
drm_framebuffer_init(). drm_helper_mode_fill_fb_struct() will do that
for us, so let's make sure it gets called before drm_framebuffer_init().

Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-17-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 9d020467a1c2f79a3efa3eeefcebdfdda2c1c625)
from drm-intel-next-2017-01-09
Signed-off-by: Tarun <tarun.vyas@intel.com>

BUG= chromium:741886 
TEST=QEMU image with '-vga virtio-gpu' option boots fine with --board=amd64-generic

Change-Id: I43f1db0f2b4cfa67104f2f26ec2f4ba038abe8b4
Reviewed-on: https://chromium-review.googlesource.com/570926
Commit-Ready: Sean Paul <seanpaul@google.com>
Tested-by: Sean Paul <seanpaul@google.com>
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/111294332b13bf0e965365951fd62ef1c2fd27ca/drivers/gpu/drm/virtio/virtgpu_display.c

Status: Fixed (was: Unconfirmed)
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosutils/+/83ee731349654af87677f72816e60dfd4526a358

commit 83ee731349654af87677f72816e60dfd4526a358
Author: Nicolas Norvez <norvez@chromium.org>
Date: Sat Jul 15 06:22:08 2017

cros_vm_lib: use virtio-gpu if supported

VM images for most boards only support cirrus, in particular when the
kernel is 3.18 or older.
Some boards, particularly the ones dedicated to VM targets, do support
virtio-gpu and are expected to use it to avoid being limited to 800x600
resolution.

betty, newbie and novato support virtio-gpu and their use case requires
it, so make them use virtio-gpu to catch regressions.

amd64-generic is not specifically a VM target but use virtio-gpu anyway
to provide a simple test case for external contributors.

BUG= chromium:709712 
BUG= chromium:741886 
TEST=./bin/cros_start_vm --board=novato starts qemu with '-vga virtio'
TEST=./bin/cros_start_vm --board=cyan starts qemu with '-vga cirrus'

Change-Id: I2f67347fde71c3cbfb25f5820d7df72daa936a4a
Reviewed-on: https://chromium-review.googlesource.com/572042
Commit-Ready: Nicolas Norvez <norvez@chromium.org>
Tested-by: Nicolas Norvez <norvez@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/83ee731349654af87677f72816e60dfd4526a358/lib/cros_vm_lib.sh

Comment 8 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment