video/vesa: unmap frame buffer when relinquishing console
authorJan Beulich <jbeulich@suse.com>
Fri, 18 Feb 2022 13:44:32 +0000 (14:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 18 Feb 2022 13:44:32 +0000 (14:44 +0100)
There's no point in keeping the VA space occupied when no further output
will occur.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/video/lfb.c
xen/drivers/video/vesa.c

index 75b749b3303be6e25bc8c2e775d9f03d15720c65..9254b5e9022a8879a90a696bddfd99564830b889 100644 (file)
@@ -168,4 +168,5 @@ void lfb_free(void)
     xfree(lfb.lbuf);
     xfree(lfb.text_buf);
     xfree(lfb.line_len);
+    lfb.lfbp.lfb = ZERO_BLOCK_PTR;
 }
index f9169f701f15e9f37f1c729c0547a370cbd7aa24..b9bdfc167017fe0290587d073b99f0deb81ef276 100644 (file)
@@ -197,5 +197,7 @@ void __init vesa_endboot(bool_t keep)
                    vlfb_info.width * bpp);
         lfb_flush();
         lfb_free();
+        iounmap(lfb);
+        lfb = ZERO_BLOCK_PTR;
     }
 }