[Spice-devel] [PATCH 34/35] qxl: add guestdebug property
alexl at redhat.com
alexl at redhat.com
Thu Sep 9 10:16:17 PDT 2010
From: Gerd Hoffmann <kraxel at redhat.com>
---
hw/qxl.c | 6 +++++-
hw/qxl.h | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 991858e..63a96e8 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -140,6 +140,7 @@ static void init_qxl_rom(PCIQXLDevice *d)
rom->magic = cpu_to_le32(QXL_ROM_MAGIC);
rom->id = cpu_to_le32(d->id);
+ rom->log_level = cpu_to_le32(d->guestdebug);
rom->modes_offset = cpu_to_le32(sizeof(QXLRom));
rom->slot_gen_bits = MEMSLOT_GENERATION_BITS;
@@ -920,7 +921,9 @@ static void ioport_write(void *opaque, uint32_t addr, uint32_t val)
qxl_set_mode(d, val);
break;
case QXL_IO_LOG:
- dprint(d, 1, "log %s", d->ram->log_buf);
+ if (d->guestdebug) {
+ fprintf(stderr, "qxl/guest: %s", d->ram->log_buf);
+ }
break;
case QXL_IO_RESET:
dprint(d, 1, "QXL_IO_RESET\n");
@@ -1500,6 +1503,7 @@ static PCIDeviceInfo qxl_info = {
DEFINE_PROP_UINT32("vram_size", PCIQXLDevice, vram_size, 64 * 1024 * 1024),
DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 2),
DEFINE_PROP_UINT32("debug", PCIQXLDevice, debug, 0),
+ DEFINE_PROP_UINT32("guestdebug", PCIQXLDevice, guestdebug, 0),
DEFINE_PROP_UINT32("cmdlog", PCIQXLDevice, cmdlog, 0),
DEFINE_PROP_END_OF_LIST(),
}
diff --git a/hw/qxl.h b/hw/qxl.h
index 91fef48..8c0c928 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -18,6 +18,7 @@ typedef struct PCIQXLDevice {
SimpleSpiceDisplay ssd;
int id;
uint32_t debug;
+ uint32_t guestdebug;
uint32_t cmdlog;
enum qxl_mode mode;
uint32_t cmdflags;
--
1.7.0.1
More information about the Spice-devel
mailing list