aboutsummaryrefslogtreecommitdiff
path: root/hw/qxl.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-07-20 12:20:55 +0300
committerGerd Hoffmann <kraxel@redhat.com>2011-08-01 12:43:49 +0200
commit2bce0400579f58ccb33d201cde9e63c39750faf4 (patch)
treed8dfaf0fc5a24355c3fe9b7b328f72d6df3191fc /hw/qxl.h
parent8b92e2989eddaca0bef5076135d2dee3c06f6700 (diff)
downloadqemu-2bce0400579f58ccb33d201cde9e63c39750faf4.zip
qemu-2bce0400579f58ccb33d201cde9e63c39750faf4.tar.gz
qemu-2bce0400579f58ccb33d201cde9e63c39750faf4.tar.bz2
qxl: error handling fixes and cleanups.
Add qxl_guest_bug() function which is supposed to be called in case sanity checks of guest requests fail. It raises an error IRQ and logs a message in case guest debugging is enabled. Make PANIC_ON() abort instead of exit. That macro should be used for qemu bugs only, any guest-triggerable stuff should use the new qxl_guest_bug() function instead. Convert a few easy cases from PANIC_ON() to qxl_guest_bug() to show intended usage. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qxl.h')
-rw-r--r--hw/qxl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/qxl.h b/hw/qxl.h
index 5d0e85e..5db9aae 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -86,7 +86,7 @@ typedef struct PCIQXLDevice {
#define PANIC_ON(x) if ((x)) { \
printf("%s: PANIC %s failed\n", __FUNCTION__, #x); \
- exit(-1); \
+ abort(); \
}
#define dprint(_qxl, _level, _fmt, ...) \
@@ -99,6 +99,7 @@ typedef struct PCIQXLDevice {
/* qxl.c */
void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
+void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg);
void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
struct QXLRect *area, struct QXLRect *dirty_rects,