diff -Nru seabios-1.13.0/debian/changelog seabios-1.13.0/debian/changelog --- seabios-1.13.0/debian/changelog 2019-12-12 16:51:50.000000000 +0000 +++ seabios-1.13.0/debian/changelog 2020-03-19 12:10:10.000000000 +0000 @@ -1,3 +1,10 @@ +seabios (1.13.0-1ubuntu1) focal; urgency=medium + + * d/p/lp-1866870-build-use-fcf-protection-none-when-available.patch + fix breakage on older chips due to fcf-protection (LP: #1866870) + + -- Christian Ehrhardt Thu, 19 Mar 2020 13:10:10 +0100 + seabios (1.13.0-1) unstable; urgency=medium * new upstream release 1.13.0 (Closes: #931346) diff -Nru seabios-1.13.0/debian/control seabios-1.13.0/debian/control --- seabios-1.13.0/debian/control 2019-12-12 16:50:48.000000000 +0000 +++ seabios-1.13.0/debian/control 2020-03-19 12:10:10.000000000 +0000 @@ -1,7 +1,8 @@ Source: seabios Section: misc Priority: optional -Maintainer: Debian QEMU Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian QEMU Team Uploaders: Aurelien Jarno , Riku Voipio , Michael Tokarev diff -Nru seabios-1.13.0/debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch seabios-1.13.0/debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch --- seabios-1.13.0/debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch 1970-01-01 00:00:00.000000000 +0000 +++ seabios-1.13.0/debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch 2020-03-19 12:10:10.000000000 +0000 @@ -0,0 +1,63 @@ +From 7bc5e4dff67636adb76c2b59a15a082a060ff68f Mon Sep 17 00:00:00 2001 +From: Christian Ehrhardt +Date: Thu, 19 Mar 2020 12:25:24 +0100 +Subject: [PATCH] build: use -fcf-protection=none when available + +Some hardened gcc v9 compilers (such as the one in Ubuntu) +default this option which for seabios leads to emulation errors +when running in KVM (does not trigger in TCG) on older intel +chips of the Penryn generation (~2006-2008). + +Symptom in KVM looks like: + KVM internal error. Suberror: 1 + emulation failure + EAX=00000000 EBX=00000000 ECX=000086d4 EDX=00000000 + ESI=00000000 EDI=00000000 EBP=000086d4 ESP=00006d7c + EIP=00007acf EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 + ES =0000 00000000 ffffffff 00809300 + CS =f000 000f0000 ffffffff 00809b00 + SS =0000 00000000 ffffffff 00809300 + DS =0000 00000000 ffffffff 00809300 + FS =0000 00000000 ffffffff 00809300 + GS =0000 00000000 ffffffff 00809300 + LDT=0000 00000000 0000ffff 00008200 + TR =0000 00000000 0000ffff 00008b00 + GDT= 000f6200 00000037 + IDT= 00000000 000003ff + CR0=00000010 CR2=00000000 CR3=00000000 CR4=00000000 + DR0=0000000000000000 DR1=0000000000000000 + DR2=0000000000000000 DR3=0000000000000000 + DR6=00000000ffff0ff0 DR7=0000000000000400 + EFER=0000000000000000 + Code=b8 90 d9 00 00 66 e8 6b f7 ff ff 66 b8 0a 00 00 + 00 e9 61 f2 0f 1e fb 66 57 66 56 66 53 66 53 + 66 89 c7 67 66 89 14 24 66 89 ce 66 e8 15 f8 ff ff 88 + +Also see https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-fcf-protection + +URL: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1866870 +Signed-off-by: Christian Ehrhardt + +Forwarded: yes (https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/IXAWMA2HWW75LSR3NBBYQKWT3TI5WVVP/) +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1866870 +Last-Update: 2020-03-19 + +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 5f7d5370..9e8188e5 100644 +--- a/Makefile ++++ b/Makefile +@@ -69,6 +69,7 @@ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) + COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,) + COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,) + COMMONCFLAGS += $(call cc-option,$(CC),-Wno-address-of-packed-member,) ++COMMONCFLAGS += $(call cc-option,$(CC),-fcf-protection=none,) + COMMA := , + + CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0 +-- +2.25.1 + diff -Nru seabios-1.13.0/debian/patches/series seabios-1.13.0/debian/patches/series --- seabios-1.13.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ seabios-1.13.0/debian/patches/series 2020-03-19 12:10:10.000000000 +0000 @@ -0,0 +1 @@ +lp-1866870-build-use-fcf-protection-none-when-available.patch