On 10/12/2014 03:24 PM, Marc-André Lureau wrote: > From: Marc-Andre Lureau <marcandre.lur...@redhat.com> > > When qemu qxl device reaches a guest bug, it might set the > QXL_INTERRUPT_ERROR interrupt flag, and stops processing guest > commands. Therefore, it makes sense to check that flag in the guest and > quit, instead of running in infinite loop in X and consuming CPU. > > Related to: > https://bugzilla.redhat.com/show_bug.cgi?id=1151559
ACK both. Not sure about the assert though. > --- > src/qxl_io.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/qxl_io.c b/src/qxl_io.c > index 8fa90b6..15fd678 100644 > --- a/src/qxl_io.c > +++ b/src/qxl_io.c > @@ -43,9 +43,12 @@ qxl_wait_for_io_command (qxl_screen_t *qxl) > > ram_header = (void *)((unsigned long)qxl->ram + > qxl->rom->ram_header_offset); > > - while (!(ram_header->int_pending & QXL_INTERRUPT_IO_CMD)) > + while (!(ram_header->int_pending & > + (QXL_INTERRUPT_IO_CMD | QXL_INTERRUPT_ERROR))) > usleep (1); > > + assert(!(ram_header->int_pending & QXL_INTERRUPT_ERROR)); > + > ram_header->int_pending &= ~QXL_INTERRUPT_IO_CMD; > } > > _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel