diff options
| author | Alon Levy <alevy@redhat.com> | 2014-03-24 11:35:24 +0200 |
|---|---|---|
| committer | Alon Levy <alevy@redhat.com> | 2014-03-24 11:38:31 +0200 |
| commit | 20a4f8b80ee0029187277089ffa911c5a94af59f (patch) | |
| tree | 4bf2cf17e709bc228e765390733ec780bd7f5737 | |
| parent | 3a87f8b6859e6221b827ab4737779dddb37553ec (diff) | |
display/qxl: don't abort on reset with non empty rings
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>
| -rw-r--r-- | hw/display/qxl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 47bbf1f1f..abe7a18a8 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) |
