Blame 0001-qxl-fix-pre-save-logic.patch

Adam Williamson b34716
From eb94846280df3f1e2a91b6179fc05f9890b7e384 Mon Sep 17 00:00:00 2001
Adam Williamson b34716
From: Gerd Hoffmann <kraxel@redhat.com>
Adam Williamson b34716
Date: Fri, 10 Sep 2021 11:42:03 +0200
Adam Williamson b34716
Subject: [PATCH 1/1] qxl: fix pre-save logic
Adam Williamson b34716
MIME-Version: 1.0
Adam Williamson b34716
Content-Type: text/plain; charset=UTF-8
Adam Williamson b34716
Content-Transfer-Encoding: 8bit
Adam Williamson b34716
Adam Williamson b34716
Oops.  Logic is backwards.
Adam Williamson b34716
Adam Williamson b34716
Fixes: 39b8a183e2f3 ("qxl: remove assert in qxl_pre_save.")
Adam Williamson b34716
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/610
Adam Williamson b34716
Resolves: https://bugzilla.redhat.com//show_bug.cgi?id=2002907
Adam Williamson b34716
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Adam Williamson b34716
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Adam Williamson b34716
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Adam Williamson b34716
Message-Id: <20210910094203.3582378-1-kraxel@redhat.com>
Adam Williamson b34716
---
Adam Williamson b34716
 hw/display/qxl.c | 2 +-
Adam Williamson b34716
 1 file changed, 1 insertion(+), 1 deletion(-)
Adam Williamson b34716
Adam Williamson b34716
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
Adam Williamson b34716
index 43482d4364..29c80b4289 100644
Adam Williamson b34716
--- a/hw/display/qxl.c
Adam Williamson b34716
+++ b/hw/display/qxl.c
Adam Williamson b34716
@@ -2252,7 +2252,7 @@ static int qxl_pre_save(void *opaque)
Adam Williamson b34716
     } else {
Adam Williamson b34716
         d->last_release_offset = (uint8_t *)d->last_release - ram_start;
Adam Williamson b34716
     }
Adam Williamson b34716
-    if (d->last_release_offset < d->vga.vram_size) {
Adam Williamson b34716
+    if (d->last_release_offset >= d->vga.vram_size) {
Adam Williamson b34716
         return 1;
Adam Williamson b34716
     }
Adam Williamson b34716
 
Adam Williamson b34716
-- 
Adam Williamson b34716
2.33.1
Adam Williamson b34716