From dfc48eda8272e5fcb565aac3654da03e4f83898e Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 22 Jan 2013 17:33:22 +0100 Subject: [PATCH 4/5] qxl: stop using non revision 4 rom fields for revision < 4 RH-Author: Alon Levy Message-id: <1358876003-30877-2-git-send-email-alevy@redhat.com> Patchwork-id: 47627 O-Subject: [PATCHv2 RHEL-6.4 qemu-kvm 1/2] qxl: stop using non revision 4 rom fields for revision < 4 Bugzilla: 869981 RH-Acked-by: Hans de Goede RH-Acked-by: Gerd Hoffmann RH-Acked-by: Markus Armbruster interface_set_client_capabilities is only usable if the revision is >=4, when both a new interrupt notifies of any changes and a new field in the ROM contains the capabilities. A guest would not expect this interrupt if it knows the device is revision <= 3. Instead of issueing the interrupt ignore the API call and log it by a new trace event. Signed-off-by: Alon Levy upstream: acked but not committed. --- hw/qxl.c | 6 ++++++ trace-events | 1 + 2 files changed, 7 insertions(+) Signed-off-by: Miroslav Rezanina --- hw/qxl.c | 6 ++++++ trace-events | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 89d855a..a68dac9 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -960,6 +960,12 @@ static void interface_set_client_capabilities(QXLInstance *sin, { PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl); + if (qxl->revision < 4) { + trace_qxl_set_client_capabilities_unsupported_by_revision(qxl->id, + qxl->revision); + return; + } + if (runstate_check(RUN_STATE_INMIGRATE) || runstate_check(RUN_STATE_POSTMIGRATE)) { return; diff --git a/trace-events b/trace-events index 42d29fd..94e999c 100644 --- a/trace-events +++ b/trace-events @@ -276,6 +276,7 @@ disable qxl_spice_reset_memslots(int qid) "%d" disable qxl_spice_update_area(int qid, uint32_t surface_id, uint32_t left, uint32_t right, uint32_t top, uint32_t bottom) "%d sid=%d [%d,%d,%d,%d]" disable qxl_spice_update_area_rest(int qid, uint32_t num_dirty_rects, uint32_t clear_dirty_region) "%d #d=%d clear=%d" disable qxl_surfaces_dirty(int qid, int surface, int addr, int offset, int size) "%d surface=%d addr=%d offset=%d size=%d" +disable qxl_set_client_capabilities_unsupported_by_revision(int qid, int revision) "%d revision=%d" # hw/qxl-render.c disable qxl_render_blit_guest_primary_initialized(void) "" -- 1.7.1