[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot
From: |
Stefan Berger |
Subject: |
[Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline |
Date: |
Thu, 02 Aug 2018 12:05:03 -0000 |
Another patch that seems to work tries to remember the old surface:
diff --git a/hw/display/vga.c b/hw/display/vga.c
index ed476e4e80..1aae6a6d3b 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1554,7 +1554,8 @@ static void vga_draw_graphic(VGACommonState *s, int
full_update)
height != s->last_height ||
s->last_depth != depth ||
s->last_byteswap != byteswap ||
- share_surface != is_buffer_shared(surface)) {
+ share_surface != is_buffer_shared(surface) ||
+ s->last_surface != surface) {
/* display parameters changed -> need new display surface */
s->last_scr_width = disp_width;
s->last_scr_height = height;
@@ -1563,8 +1564,10 @@ static void vga_draw_graphic(VGACommonState *s, int
full_update)
s->last_line_offset = s->line_offset;
s->last_depth = depth;
s->last_byteswap = byteswap;
+ s->last_surface = surface;
full_update = 1;
}
+ fprintf(stderr, "%p vs %p share_surface: %d surface: %p\n",
surface_data(surface), s->vram_ptr + (s->start_addr * 4), share_surface,
surface);
if (surface_data(surface) != s->vram_ptr + (s->start_addr * 4)
&& is_buffer_shared(surface)) {
/* base address changed (page flip) -> shared display surfaces
diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
index f8fcf62a56..91afc52b0e 100644
--- a/hw/display/vga_int.h
+++ b/hw/display/vga_int.h
@@ -122,6 +122,7 @@ typedef struct VGACommonState {
uint32_t last_width, last_height; /* in chars or pixels */
uint32_t last_scr_width, last_scr_height; /* in pixels */
uint32_t last_depth; /* in bits */
+ void *last_surface;
bool last_byteswap;
bool force_shadow;
uint8_t cursor_start, cursor_end;
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1784900
Title:
QEMU (frontend) crashes upon warm reboot with virtio-gpu device and
vga=775 on Linux cmdline
Status in QEMU:
New
Bug description:
With vga=775 on the Linux command line a first boot of the VM running
Linux works fine. After a warm reboot it crashes during Linux boot.
The VM was used remotely via virt-manager and VNC.
Bisecting the code lead to the following patch that introduced the
bug:
commit 1fccd7c5a9a722a9cbf1bc91693f4618034f01ac (HEAD, refs/bisect/bad)
Author: Gerd Hoffmann <address@hidden>
Date: Mon Jul 2 18:24:43 2018 +0200
virtio-gpu: disable scanout when backing resource is destroyed
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-id: address@hidden
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 336dc59007..08cd567218 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -430,6 +430,16 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, int
scanout_id)
static void virtio_gpu_resource_destroy(VirtIOGPU *g,
struct virtio_gpu_simple_resource
*res)
{
+ int i;
+
+ if (res->scanout_bitmask) {
+ for (i = 0; i < g->conf.max_outputs; i++) {
+ if (res->scanout_bitmask & (1 << i)) {
+ virtio_gpu_disable_scanout(g, i);
+ }
+ }
+ }
+
pixman_image_unref(res->image);
virtio_gpu_cleanup_mapping(res);
QTAILQ_REMOVE(&g->reslist, res, next);
Reported backtraces can be found here:
https://paste.fedoraproject.org/paste/OUDEfCk1IY7xiy0I0PDlkw
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1784900/+subscriptions
- [Qemu-devel] [Bug 1784900] [NEW] QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, Stefan Berger, 2018/08/01
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, Daniel Berrange, 2018/08/01
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, Dr. David Alan Gilbert, 2018/08/01
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, Stefan Berger, 2018/08/01
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, Stefan Berger, 2018/08/01
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline,
Stefan Berger <=
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, Stefan Berger, 2018/08/02
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, elmarco, 2018/08/06
- [Qemu-devel] [Bug 1784900] Re: QEMU (frontend) crashes upon warm reboot with virtio-gpu device and vga=775 on Linux cmdline, Thomas Huth, 2018/08/15