* [Qemu-devel] [PATCH] display/qxl: don't abort on reset with non empty rings
@ 2014-03-24 9:39 Alon Levy
2014-03-26 10:35 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2014-03-24 9:39 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel
The command ring and cursor rings are pushed to by the guest, and
cleared asynchronously by qemu's spice thread. It is easy to have
them non empty by bad guest behaviour, and we must never abort on bad
guest behaviour.
Signed-off-by: Alon Levy <alevy@redhat.com>
---
hw/display/qxl.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 47bbf1f..abe7a18 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1111,8 +1111,12 @@ static void qxl_check_state(PCIQXLDevice *d)
QXLRam *ram = d->ram;
int spice_display_running = qemu_spice_display_is_running(&d->ssd);
- assert(!spice_display_running || SPICE_RING_IS_EMPTY(&ram->cmd_ring));
- assert(!spice_display_running || SPICE_RING_IS_EMPTY(&ram->cursor_ring));
+ if (spice_display_running && !SPICE_RING_IS_EMPTY(&ram->cmd_ring)) {
+ fprintf(stderr, "qxl: cmd ring not empty on reset\n");
+ }
+ if (spice_display_running && !SPICE_RING_IS_EMPTY(&ram->cursor_ring)) {
+ fprintf(stderr, "qxl: cursor ring not empty on reset\n");
+ }
}
static void qxl_reset_state(PCIQXLDevice *d)
--
1.8.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] display/qxl: don't abort on reset with non empty rings
2014-03-24 9:39 [Qemu-devel] [PATCH] display/qxl: don't abort on reset with non empty rings Alon Levy
@ 2014-03-26 10:35 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2014-03-26 10:35 UTC (permalink / raw)
To: Alon Levy; +Cc: qemu-devel
On Mo, 2014-03-24 at 11:39 +0200, Alon Levy wrote:
> The command ring and cursor rings are pushed to by the guest, and
> cleared asynchronously by qemu's spice thread. It is easy to have
> them non empty by bad guest behaviour, and we must never abort on bad
> guest behaviour.
I think we should either use the qxl_guest_bug trace point if we want
report this for troubleshooting reasons. Or simply drop qxl_check_state
altogether ...
cheers,
Gerd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-26 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 9:39 [Qemu-devel] [PATCH] display/qxl: don't abort on reset with non empty rings Alon Levy
2014-03-26 10:35 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).