vga_fb.patch

diff --git a/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp b/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp
index a21fe7e..5b3b9b3 100644
--- a/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp
+++ b/src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp
@@ -3494,9 +3494,15 @@ static DECLCALLBACK(int) vgaR3LFBAccessHandler(PVM pVM, RTGCPHYS GCPhys, void *p
     int         rc;
     Assert(pThis);
     Assert(GCPhys >= pThis->GCPhysVRAM);
+    Assert(GCPhys - pThis->GCPhysVRAM + cbBuf <= pThis->vram_size);
     NOREF(pvPhys); NOREF(pvBuf); NOREF(cbBuf); NOREF(enmAccessType);
 
-    rc = vgaLFBAccess(pVM, pThis, GCPhys, 0);
+    rc = VINF_SUCCESS;
+    size_t offset = 0;
+    while (RT_SUCCESS(rc) && offset < cbBuf) {
+        rc = vgaLFBAccess(pVM, pThis, GCPhys + offset, 0);
+        offset += 1UL << PAGE_SHIFT;
+    }
     if (RT_SUCCESS(rc))
         return VINF_PGM_HANDLER_DO_DEFAULT;
     AssertMsg(rc <= VINF_SUCCESS, ("rc=%Rrc\n", rc));
