Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtio-dev@lists.oasis-open.org, dri-devel@lists.freedesktop.org
Subject: [virtio-dev] Sleeping while atomic in virtio-gpu edid handling
Date: Tue, 25 Jun 2019 17:15:41 +0200	[thread overview]
Message-ID: <20190625171541.05528049.cohuck@redhat.com> (raw)

Hi Gerd,

flipping the virtio-gpu edid support in QEMU to default enabled exposed
the following backtrace in my guest (from my bisect run down to the
initial commit in Linux):

[drm] virgl 3d acceleration not supported by guest
[drm] EDID support available.
[drm] number of scanouts: 1
[drm] number of cap sets: 0
BUG: sleeping function called from invalid context at mm/slab.h:421
in_atomic(): 1, irqs_disabled(): 0, pid: 7, name: kworker/0:1
3 locks held by kworker/0:1/7:
 #0: (____ptrval____) ((wq_completion)"events"){+.+.}, at: process_one_work+0x1c8/0x618
 #1: (____ptrval____) ((work_completion)(&vgvq->dequeue_work)){+.+.}, at: process_one_work+0x1c8/0x618
 #2: (____ptrval____) (&(&vgdev->display_info_lock)->rlock){+.+.}, at: virtio_gpu_cmd_get_edid_cb+0x6e/0xc0
CPU: 0 PID: 7 Comm: kworker/0:1 Tainted: G        W         4.20.0-rc1+ #142
Hardware name: QEMU 2964 QEMU (KVM/Linux)
Workqueue: events virtio_gpu_dequeue_ctrl_func
Call Trace:
([<0000000000112a2c>] show_stack+0x54/0xd0)
 [<0000000000ba7bd0>] dump_stack+0x90/0xc8 
 [<00000000001a8cf8>] ___might_sleep+0x240/0x258 
 [<00000000003560e6>] __kmalloc_node+0x2de/0x478 
 [<00000000007e0f64>] drm_property_create_blob.part.0+0x3c/0x138 
 [<00000000007e1bfe>] drm_property_replace_global_blob+0xb6/0x118 
 [<00000000007dedac>] drm_connector_update_edid_property+0x8c/0xb0 
 [<00000000007febe8>] virtio_gpu_cmd_get_edid_cb+0x88/0xc0 
 [<00000000007ff03a>] virtio_gpu_dequeue_ctrl_func+0x142/0x200 
 [<000000000018fdbc>] process_one_work+0x284/0x618 
 [<000000000019019a>] worker_thread+0x4a/0x3f0 
 [<0000000000197c92>] kthread+0x152/0x170 
 [<0000000000bcac76>] kernel_thread_starter+0x6/0xc 
 [<0000000000bcac70>] kernel_thread_starter+0x0/0xc 
3 locks held by kworker/0:1/7:
 #0: (____ptrval____) ((wq_completion)"events"){+.+.}, at: process_one_work+0x1c8/0x618
 #1: (____ptrval____) ((work_completion)(&vgvq->dequeue_work)){+.+.}, at: process_one_work+0x1c8/0x618
 #2: (____ptrval____) (&(&vgdev->display_info_lock)->rlock){+.+.}, at: virtio_gpu_cmd_get_edid_cb+0x6e/0xc0
virtio_gpu virtio5: fb1: virtiodrmfb frame buffer device
[drm] Initialized virtio_gpu 0.1.0 0 for virtio5 on minor 1

This is an s390x guest, run via tcg; the stack trace is triggered both
for virtio-gpu-ccw and virtio-gpu-pci devices, so it's probably
something generic. The device seems to initialize fine, but I have not
tried to actually use it (I simply keep a virtio-gpu device in my QEMU
command line for sanity checking.)

As said, I bisected this down to the initial commit

commit b4b01b4995fb15b55a2d067eb405917f5ab32709 (refs/bisect/bad)
Author: Gerd Hoffmann <kraxel@redhat.com>
Date:   Tue Oct 30 07:32:06 2018 +0100

    drm/virtio: add edid support
    
    linux guest driver implementation of the VIRTIO_GPU_F_EDID feature.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Acked-by: Daniel Vetter <daniel@ffwll.ch>
    Link: http://patchwork.freedesktop.org/patch/msgid/20181030063206.19528-3-kraxel@redhat.com

so it seems to have always been present, but I just noticed it now that
the default for edid in QEMU has changed.

I have not tried it with a non-s390x guest, though.

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


             reply	other threads:[~2019-06-25 15:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 15:15 Cornelia Huck [this message]
2019-06-26  0:00 ` [virtio-dev] Re: Sleeping while atomic in virtio-gpu edid handling Gerd Hoffmann
2019-06-26  7:52   ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190625171541.05528049.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox