Blame 0003-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch

Paolo Bonzini 44cf4a
From 4d08ebd4f8dc19dfc36495473b34c34d53650632 Mon Sep 17 00:00:00 2001
Paolo Bonzini 44cf4a
From: Ladi Prosek <lprosek@redhat.com>
Paolo Bonzini 44cf4a
Date: Mon, 31 Oct 2016 19:33:05 +0100
Paolo Bonzini 44cf4a
Subject: vgabios: Reorder video modes to work around a Windows bug
Paolo Bonzini 44cf4a
Paolo Bonzini 44cf4a
RH-Author: Ladi Prosek <lprosek@redhat.com>
Paolo Bonzini 44cf4a
Message-id: <1477924385-6169-1-git-send-email-lprosek@redhat.com>
Paolo Bonzini 44cf4a
Patchwork-id: 72677
Paolo Bonzini 44cf4a
O-Subject: [RHEL-7.4/7.3.z seabios PATCH] vgabios: Reorder video modes to work around a Windows bug
Paolo Bonzini 44cf4a
Bugzilla: 1392028
Paolo Bonzini 44cf4a
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
Paolo Bonzini 44cf4a
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Paolo Bonzini 44cf4a
RH-Acked-by: vrozenfe <vrozenfe@redhat.com>
Paolo Bonzini 44cf4a
Paolo Bonzini 44cf4a
Windows Server 2016 and Windows 10 RS1 come with a bug in its blue screen
Paolo Bonzini 44cf4a
of death rendering logic which prevents it from generating crash dumps.
Paolo Bonzini 44cf4a
Paolo Bonzini 44cf4a
The bug does not manifest if Windows sees a suitable 32 bpp video mode
Paolo Bonzini 44cf4a
before a suitable 24 bpp video mode in the list of modes returned from
Paolo Bonzini 44cf4a
vgabios. This commit moves all 32 bpp modes to the front of the list to
Paolo Bonzini 44cf4a
make sure that this is always the case.
Paolo Bonzini 44cf4a
Paolo Bonzini 44cf4a
Upstream patch:
Paolo Bonzini 44cf4a
https://www.coreboot.org/pipermail/seabios/2016-October/010963.html
Paolo Bonzini 44cf4a
Paolo Bonzini 44cf4a
There are valid concerns upstream about the breaking nature of the fix
Paolo Bonzini 44cf4a
but for the limited set of operating systems supported by RHEL/RHEV we
Paolo Bonzini 44cf4a
can easily verify that they are unaffected. So as things stand now, this
Paolo Bonzini 44cf4a
is a downstream-only patch which will be reverted in the near future;
Paolo Bonzini 44cf4a
the exact time will depend on Windows 10 RS2 schedule and other factors.
Paolo Bonzini 44cf4a
The goal is to make sure that our customers running Windows 10 VMs can
Paolo Bonzini 44cf4a
generate crash dumps.
Paolo Bonzini 44cf4a
Paolo Bonzini 44cf4a
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Paolo Bonzini 44cf4a
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Paolo Bonzini 44cf4a
a9b600
diff --git a/vgasrc/svgamodes.c b/vgasrc/svgamodes.c
a9b600
index 6e494c7..008f1b9 100644
a9b600
--- a/vgasrc/svgamodes.c
a9b600
+++ b/vgasrc/svgamodes.c
a9b600
@@ -12,6 +12,25 @@
a9b600
 #include "svgamodes.h"
a9b600
 
a9b600
 struct generic_svga_mode svga_modes[] VAR16 = {
Paolo Bonzini 44cf4a
+    /* 32 bpp BOCHS modes */
Paolo Bonzini 44cf4a
+    { 0x140, { MM_DIRECT, 320,  200,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x141, { MM_DIRECT, 640,  400,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x142, { MM_DIRECT, 640,  480,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x143, { MM_DIRECT, 800,  600,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x144, { MM_DIRECT, 1024, 768,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x145, { MM_DIRECT, 1280, 1024, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x147, { MM_DIRECT, 1600, 1200, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x14c, { MM_DIRECT, 1152, 864,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x177, { MM_DIRECT, 1280, 768,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x17a, { MM_DIRECT, 1280, 800,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x17d, { MM_DIRECT, 1280, 960,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x180, { MM_DIRECT, 1440, 900,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x183, { MM_DIRECT, 1400, 1050, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x186, { MM_DIRECT, 1680, 1050, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x189, { MM_DIRECT, 1920, 1200, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x18c, { MM_DIRECT, 2560, 1600, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x18f, { MM_DIRECT, 1280, 720,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    { 0x192, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     /* standard modes */
Paolo Bonzini 44cf4a
     { 0x100, { MM_PACKED, 640,  400,  8,  8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x101, { MM_PACKED, 640,  480,  8,  8, 16, SEG_GRAPH } },
a9b600
@@ -41,49 +60,32 @@ struct generic_svga_mode svga_modes[] VAR16 = {
Paolo Bonzini 44cf4a
     { 0x11E, { MM_DIRECT, 1600, 1200, 16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x11F, { MM_DIRECT, 1600, 1200, 24, 8, 16, SEG_GRAPH } },
a9b600
     /* other modes */
Paolo Bonzini 44cf4a
-    { 0x140, { MM_DIRECT, 320,  200,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x141, { MM_DIRECT, 640,  400,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x142, { MM_DIRECT, 640,  480,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x143, { MM_DIRECT, 800,  600,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x144, { MM_DIRECT, 1024, 768,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x145, { MM_DIRECT, 1280, 1024, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
+    /* 8, 15, 16, and 24 bpp BOCHS modes */
Paolo Bonzini 44cf4a
     { 0x146, { MM_PACKED, 320,  200,  8,  8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x147, { MM_DIRECT, 1600, 1200, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x148, { MM_PACKED, 1152, 864,  8,  8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x149, { MM_DIRECT, 1152, 864,  15, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x14a, { MM_DIRECT, 1152, 864,  16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x14b, { MM_DIRECT, 1152, 864,  24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x14c, { MM_DIRECT, 1152, 864,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x175, { MM_DIRECT, 1280, 768,  16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x176, { MM_DIRECT, 1280, 768,  24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x177, { MM_DIRECT, 1280, 768,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x178, { MM_DIRECT, 1280, 800,  16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x179, { MM_DIRECT, 1280, 800,  24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x17a, { MM_DIRECT, 1280, 800,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x17b, { MM_DIRECT, 1280, 960,  16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x17c, { MM_DIRECT, 1280, 960,  24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x17d, { MM_DIRECT, 1280, 960,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x17e, { MM_DIRECT, 1440, 900,  16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x17f, { MM_DIRECT, 1440, 900,  24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x180, { MM_DIRECT, 1440, 900,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x181, { MM_DIRECT, 1400, 1050, 16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x182, { MM_DIRECT, 1400, 1050, 24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x183, { MM_DIRECT, 1400, 1050, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x184, { MM_DIRECT, 1680, 1050, 16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x185, { MM_DIRECT, 1680, 1050, 24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x186, { MM_DIRECT, 1680, 1050, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x187, { MM_DIRECT, 1920, 1200, 16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x188, { MM_DIRECT, 1920, 1200, 24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x189, { MM_DIRECT, 1920, 1200, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x18a, { MM_DIRECT, 2560, 1600, 16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x18b, { MM_DIRECT, 2560, 1600, 24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x18c, { MM_DIRECT, 2560, 1600, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x18d, { MM_DIRECT, 1280, 720,  16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x18e, { MM_DIRECT, 1280, 720,  24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x18f, { MM_DIRECT, 1280, 720,  32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x190, { MM_DIRECT, 1920, 1080, 16, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
     { 0x191, { MM_DIRECT, 1920, 1080, 24, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
-    { 0x192, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } },
Paolo Bonzini 44cf4a
 
a9b600
     /* custom resolutions for 16:9 displays */
a9b600
     { 0x193, { MM_DIRECT, 1600,  900, 16, 8, 16, SEG_GRAPH } },