diff --git a/.gitignore b/.gitignore index e859e52..42d717f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/seabios-1.10.2.tar.gz +SOURCES/seabios-1.11.0.tar.gz diff --git a/.seabios.metadata b/.seabios.metadata index e89212d..9f8ab76 100644 --- a/.seabios.metadata +++ b/.seabios.metadata @@ -1 +1 @@ -a0d4c4ed618919c7dd7bcef9757dab74b4df819c SOURCES/seabios-1.10.2.tar.gz +ad679df075d888cbdb1233817c8bd101e8c8303e SOURCES/seabios-1.11.0.tar.gz diff --git a/SOURCES/0002-allow-1TB-of-RAM.patch b/SOURCES/0002-allow-1TB-of-RAM.patch index 0eac29f..9d84af4 100644 --- a/SOURCES/0002-allow-1TB-of-RAM.patch +++ b/SOURCES/0002-allow-1TB-of-RAM.patch @@ -1,4 +1,4 @@ -From 771b0509836828093091cfcf9bae8954928b6a02 Mon Sep 17 00:00:00 2001 +From f14103535394ff9d803ec64dfd8b11dd753a45f1 Mon Sep 17 00:00:00 2001 From: Andrea Arcangeli Date: Tue, 8 Oct 2013 17:07:23 +0200 Subject: allow >1TB of RAM @@ -28,10 +28,10 @@ Signed-off-by: Miroslav Rezanina 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c -index 707502d..5df3e00 100644 +index 9674ab8..2de1405 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c -@@ -481,9 +481,10 @@ qemu_cfg_e820(void) +@@ -492,9 +492,10 @@ qemu_cfg_e820(void) } // Check for memory over 4Gig in cmos diff --git a/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch b/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch index ed32750..58cc9a7 100644 --- a/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch +++ b/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch @@ -1,4 +1,4 @@ -From 2bcdafa98a14ac600bde1e4e9cb5bc07c01fd366 Mon Sep 17 00:00:00 2001 +From dc14406bae91025709995342c1297d4e2c325498 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 28 Jul 2014 12:14:11 +0200 Subject: smbios: set bios vendor/version fields to Seabios/0.5.1 diff --git a/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch b/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch index 0075979..a61d140 100644 --- a/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch +++ b/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch @@ -1,4 +1,4 @@ -From 18be18890b42ad842b421bc82af75a86eae5580a Mon Sep 17 00:00:00 2001 +From 0c1e0d59ceb3c4c8909d7a7b6e62d19c7ad81bef Mon Sep 17 00:00:00 2001 From: Radim Krcmar Date: Mon, 10 Mar 2014 15:14:27 +0100 Subject: Workaround for a win8.1-32 S4 resume bug @@ -51,10 +51,10 @@ Signed-off-by: Miroslav Rezanina 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/clock.c b/src/clock.c -index e83e0f3..bca5cd7 100644 +index e44e112..298a722 100644 --- a/src/clock.c +++ b/src/clock.c -@@ -308,7 +308,13 @@ handle_08(void) +@@ -309,7 +309,13 @@ handle_08(void) struct bregs br; memset(&br, 0, sizeof(br)); br.flags = F_IF; diff --git a/SOURCES/0005-redhat-reserve-more-memory-on-fseg.patch b/SOURCES/0005-redhat-reserve-more-memory-on-fseg.patch index fba32da..859d418 100644 --- a/SOURCES/0005-redhat-reserve-more-memory-on-fseg.patch +++ b/SOURCES/0005-redhat-reserve-more-memory-on-fseg.patch @@ -1,4 +1,4 @@ -From 4dcafd1a32949713abe7b5842cfebf851934ecb7 Mon Sep 17 00:00:00 2001 +From cd088ce3bc68a6986637c0cd77b94ebff729b89b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 19 Apr 2016 11:27:50 +0200 Subject: redhat: reserve more memory on fseg diff --git a/SOURCES/0006-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch b/SOURCES/0006-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch index 88e9277..6394b1f 100644 --- a/SOURCES/0006-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch +++ b/SOURCES/0006-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch @@ -1,4 +1,4 @@ -From 2857f5445ef55ece7011d49937e6c3fd7444a1dc Mon Sep 17 00:00:00 2001 +From 4d08ebd4f8dc19dfc36495473b34c34d53650632 Mon Sep 17 00:00:00 2001 From: Ladi Prosek Date: Mon, 31 Oct 2016 19:33:05 +0100 Subject: vgabios: Reorder video modes to work around a Windows bug diff --git a/SOURCES/config.base b/SOURCES/config.base index e06bba6..d8948a4 100644 --- a/SOURCES/config.base +++ b/SOURCES/config.base @@ -11,3 +11,10 @@ CONFIG_USB_XHCI=n CONFIG_USB_UAS=n CONFIG_TCGBIOS=n CONFIG_USE_SMM=n +CONFIG_NVME=n +CONFIG_VGAHOOKS=n +CONFIG_NVME=n +CONFIG_VGAHOOKS=n +CONFIG_SERCON=n +CONFIG_SDCARD=n +CONFIG_MPT_SCSI=n diff --git a/SOURCES/seabios-blockcmd-accept-only-disks-and-CD-ROMs.patch b/SOURCES/seabios-blockcmd-accept-only-disks-and-CD-ROMs.patch deleted file mode 100644 index 3367a56..0000000 --- a/SOURCES/seabios-blockcmd-accept-only-disks-and-CD-ROMs.patch +++ /dev/null @@ -1,47 +0,0 @@ -From a40b8bfb775945aa62510f0a3f4a3301aa3d65fc Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 9 May 2017 11:24:34 +0200 -Subject: [PATCH 1/4] blockcmd: accept only disks and CD-ROMs - -RH-Author: Paolo Bonzini -Message-id: <20170509112437.30666-2-pbonzini@redhat.com> -Patchwork-id: 75050 -O-Subject: [RHEL7.4 seabios PATCH 1/4] blockcmd: accept only disks and CD-ROMs -Bugzilla: 1020622 -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Fam Zheng - -From: Roman Kagan - -Luns that report to INQUIRY with a type other than CD-ROM are considered -disks. This isn't necessarily the case; working with such luns as disks -may lead to unpredictable results. - -So bail out if the lun is neither CD-ROM nor disk. - -Signed-off-by: Roman Kagan -Signed-off-by: Paolo Bonzini -(cherry picked from commit 177aecfcf4161c53f503782e68608284b198c0f9) -Signed-off-by: Miroslav Rezanina ---- - src/hw/blockcmd.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c -index f147100..5ad128e 100644 ---- a/src/hw/blockcmd.c -+++ b/src/hw/blockcmd.c -@@ -217,6 +217,9 @@ scsi_drive_setup(struct drive_s *drive, const char *s, int prio) - return 0; - } - -+ if (pdt != SCSI_TYPE_DISK) -+ return -1; -+ - ret = scsi_is_ready(&dop); - if (ret) { - dprintf(1, "scsi_is_ready returned %d\n", ret); --- -1.8.3.1 - diff --git a/SOURCES/seabios-blockcmd-generic-SCSI-luns-enumeration.patch b/SOURCES/seabios-blockcmd-generic-SCSI-luns-enumeration.patch deleted file mode 100644 index ab97951..0000000 --- a/SOURCES/seabios-blockcmd-generic-SCSI-luns-enumeration.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 456d0bab4f280e3fe4b8041a89385547b02454e0 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 9 May 2017 11:24:35 +0200 -Subject: [PATCH 2/4] blockcmd: generic SCSI luns enumeration - -RH-Author: Paolo Bonzini -Message-id: <20170509112437.30666-3-pbonzini@redhat.com> -Patchwork-id: 75051 -O-Subject: [RHEL7.4 seabios PATCH 2/4] blockcmd: generic SCSI luns enumeration -Bugzilla: 1020622 -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Fam Zheng - -From: Roman Kagan - -Add two generic functions to discover active LUNs on a SCSI target. - -The functions take a temporary drive descriptor on the target, and a -callback to create a new drive descriptor with a new LUN using the -temporary one as a template. - -One of the functions performs REPORT LUNS on the temporary drive to -obtain the list of candidate luns; the other sequentially iterates the -lun numbers up to the given maximum, and is meant as a fallback. Both -functions return the number of successfully created drive descriptors, -or a negative number if an error occured. - -This will allow to lift the limitation of most of the SCSI drivers that -support booting off the LUN #0 only. - -Signed-off-by: Roman Kagan -Signed-off-by: Paolo Bonzini -(cherry picked from commit 750188dfb35f61f1533f1138d6972b19f36f1a2c) -Signed-off-by: Miroslav Rezanina ---- - src/hw/blockcmd.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/hw/blockcmd.h | 4 +++ - 2 files changed, 98 insertions(+) - -diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c -index 5ad128e..324188d 100644 ---- a/src/hw/blockcmd.c -+++ b/src/hw/blockcmd.c -@@ -13,6 +13,7 @@ - #include "std/disk.h" // DISK_RET_EPARAM - #include "string.h" // memset - #include "util.h" // timer_calc -+#include "malloc.h" - - - /**************************************************************** -@@ -181,6 +182,99 @@ scsi_is_ready(struct disk_op_s *op) - return 0; - } - -+#define CDB_CMD_REPORT_LUNS 0xA0 -+ -+struct cdb_report_luns { -+ u8 command; -+ u8 reserved_01[5]; -+ u32 length; -+ u8 pad[6]; -+} PACKED; -+ -+struct scsi_lun { -+ u16 lun[4]; -+}; -+ -+struct cdbres_report_luns { -+ u32 length; -+ u32 reserved; -+ struct scsi_lun luns[]; -+}; -+ -+static u64 scsilun2u64(struct scsi_lun *scsi_lun) -+{ -+ int i; -+ u64 ret = 0; -+ for (i = 0; i < ARRAY_SIZE(scsi_lun->lun); i++) -+ ret |= be16_to_cpu(scsi_lun->lun[i]) << (16 * i); -+ return ret; -+} -+ -+// Issue REPORT LUNS on a temporary drive and iterate reported luns calling -+// @add_lun for each -+int scsi_rep_luns_scan(struct drive_s *tmp_drive, scsi_add_lun add_lun) -+{ -+ int ret = -1; -+ u32 maxluns = 511; -+ u32 nluns, i; -+ struct cdb_report_luns cdb = { -+ .command = CDB_CMD_REPORT_LUNS, -+ }; -+ struct disk_op_s op = { -+ .drive_gf = tmp_drive, -+ .command = CMD_SCSI, -+ .count = 1, -+ .cdbcmd = &cdb, -+ }; -+ struct cdbres_report_luns *resp; -+ -+ ASSERT32FLAT(); -+ -+ while (1) { -+ op.blocksize = sizeof(struct cdbres_report_luns) + -+ maxluns * sizeof(struct scsi_lun); -+ op.buf_fl = malloc_tmp(op.blocksize); -+ if (!op.buf_fl) { -+ warn_noalloc(); -+ return -1; -+ } -+ -+ cdb.length = cpu_to_be32(op.blocksize); -+ if (process_op(&op) != DISK_RET_SUCCESS) -+ goto out; -+ -+ resp = op.buf_fl; -+ nluns = be32_to_cpu(resp->length) / sizeof(struct scsi_lun); -+ if (nluns <= maxluns) -+ break; -+ -+ free(op.buf_fl); -+ maxluns = nluns; -+ } -+ -+ for (i = 0, ret = 0; i < nluns; i++) { -+ u64 lun = scsilun2u64(&resp->luns[i]); -+ if (lun >> 32) -+ continue; -+ ret += !add_lun((u32)lun, tmp_drive); -+ } -+out: -+ free(op.buf_fl); -+ return ret; -+} -+ -+// Iterate LUNs on the target and call @add_lun for each -+int scsi_sequential_scan(struct drive_s *tmp_drive, u32 maxluns, -+ scsi_add_lun add_lun) -+{ -+ int ret; -+ u32 lun; -+ -+ for (lun = 0, ret = 0; lun < maxluns; lun++) -+ ret += !add_lun(lun, tmp_drive); -+ return ret; -+} -+ - // Validate drive, find block size / sector count, and register drive. - int - scsi_drive_setup(struct drive_s *drive, const char *s, int prio) -diff --git a/src/hw/blockcmd.h b/src/hw/blockcmd.h -index b543f85..f18543e 100644 ---- a/src/hw/blockcmd.h -+++ b/src/hw/blockcmd.h -@@ -106,5 +106,9 @@ int scsi_is_read(struct disk_op_s *op); - int scsi_is_ready(struct disk_op_s *op); - struct drive_s; - int scsi_drive_setup(struct drive_s *drive, const char *s, int prio); -+typedef int (*scsi_add_lun)(u32 lun, struct drive_s *tmpl_drv); -+int scsi_rep_luns_scan(struct drive_s *tmp_drive, scsi_add_lun add_lun); -+int scsi_sequential_scan(struct drive_s *tmp_drive, u32 maxluns, -+ scsi_add_lun add_lun); - - #endif // blockcmd.h --- -1.8.3.1 - diff --git a/SOURCES/seabios-pci-fix-io-hints-capability-for-RedHat-PCI-bridges.patch b/SOURCES/seabios-pci-fix-io-hints-capability-for-RedHat-PCI-bridges.patch new file mode 100644 index 0000000..2f22708 --- /dev/null +++ b/SOURCES/seabios-pci-fix-io-hints-capability-for-RedHat-PCI-bridges.patch @@ -0,0 +1,73 @@ +From c449d0540e5f990d2710812cc4b4c35699ffd82e Mon Sep 17 00:00:00 2001 +From: Marcel Apfelbaum +Date: Wed, 17 Jan 2018 20:13:10 +0100 +Subject: [PATCH] pci: fix 'io hints' capability for RedHat PCI bridges + +RH-Author: Marcel Apfelbaum +Message-id: <20180117201310.18787-1-marcel@redhat.com> +Patchwork-id: 78658 +O-Subject: [RHEL-7.5 seabios PATCH] pci: fix 'io hints' capability for RedHat PCI bridges +Bugzilla: 1523166 +RH-Acked-by: Laszlo Ersek +RH-Acked-by: Gerd Hoffmann +RH-Acked-by: Miroslav Rezanina + +Commit ec6cb17f (pci: enable RedHat PCI bridges to reserve additional + resources on PCI init) +added a new vendor specific PCI capability for RedHat PCI bridges +allowing them to reserve additional buses and/or IO/MEM space. + +When adding the IO hints PCI capability to the pcie-root-port +without specifying a value for bus reservation, the subordinate bus +computation is wrong and the guest kernel gets messed up. + +Fix it by returning to prev code if the value for bus +reservation is not set. + +Removed also a wrong debug print "PCI: invalid QEMU resource reserve +cap offset" which appears if the 'IO hints' capability is not present. + +Acked-by: Michael S. Tsirkin +Signed-off-by: Marcel Apfelbaum +(cherry picked from commit 14d91c353e19b7085fdbb7b2dcc43f3355665670) +Signed-off-by: Marcel Apfelbaum +Signed-off-by: Miroslav Rezanina +--- + src/fw/pciinit.c | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c +index 7f0e439..3a2f747 100644 +--- a/src/fw/pciinit.c ++++ b/src/fw/pciinit.c +@@ -540,8 +540,6 @@ static u8 pci_find_resource_reserve_capability(u16 bdf) + dprintf(1, "PCI: QEMU resource reserve cap length %d is invalid\n", + cap_len); + } +- } else { +- dprintf(1, "PCI: invalid QEMU resource reserve cap offset\n"); + } + return cap; + } else { +@@ -619,13 +617,11 @@ pci_bios_init_bus_rec(int bus, u8 *pci_bus) + res_bus); + res_bus = 0; + } +- } +- if (secbus + res_bus > *pci_bus) { +- dprintf(1, "PCI: QEMU resource reserve cap: bus = %u\n", +- res_bus); +- res_bus = secbus + res_bus; +- } else { +- res_bus = *pci_bus; ++ if (secbus + res_bus > *pci_bus) { ++ dprintf(1, "PCI: QEMU resource reserve cap: bus = %u\n", ++ res_bus); ++ res_bus = secbus + res_bus; ++ } + } + } + dprintf(1, "PCI: subordinate bus = 0x%x -> 0x%x\n", +-- +1.8.3.1 + diff --git a/SOURCES/seabios-resume-Don-t-attempt-to-use-generic-reboot-mechanism.patch b/SOURCES/seabios-resume-Don-t-attempt-to-use-generic-reboot-mechanism.patch deleted file mode 100644 index a1b7b2e..0000000 --- a/SOURCES/seabios-resume-Don-t-attempt-to-use-generic-reboot-mechanism.patch +++ /dev/null @@ -1,126 +0,0 @@ -From adb570cb9034f647c0be5d1161be0e8699688cfa Mon Sep 17 00:00:00 2001 -From: "Dr. David Alan Gilbert" -Date: Wed, 29 Mar 2017 17:22:07 +0200 -Subject: [PATCH] resume: Don't attempt to use generic reboot mechanisms on - QEMU - -RH-Author: Dr. David Alan Gilbert -Message-id: <20170329172207.15471-2-dgilbert@redhat.com> -Patchwork-id: 74584 -O-Subject: [RHEL-7.4 seabios PATCH 1/1] resume: Don't attempt to use generic reboot mechanisms on QEMU -Bugzilla: 1428347 -RH-Acked-by: Paolo Bonzini -RH-Acked-by: Michael S. Tsirkin -RH-Acked-by: Laszlo Ersek - -From: Kevin O'Connor - -On QEMU it's necessary to manually reset the BIOS memory region -between 0xc0000-0x100000 on a reboot. After this manual memory reset -is completed, it's not valid to use the generic reset mechanisms. -Rename qemu_prep_reset() to qemu_reboot() and change the function to -immediately reboot after the code memcpy. - -This fixes a bug that could cause code corruption on reboots - calling -the udelay() function (as invoked by i8042_reboot and/or pci_reboot) -was not valid after the BIOS was memcpy'd. - -Reported-by: "Dr. David Alan Gilbert" -Tested-by: Dr. David Alan Gilbert -Signed-off-by: Kevin O'Connor -(cherry picked from commit c68aff57ce317d9f2d69d20eba893a10d964f316) -Signed-off-by: Miroslav Rezanina ---- - src/fw/shadow.c | 14 +++++++++++++- - src/hw/pci.c | 1 - - src/hw/pci.h | 2 ++ - src/resume.c | 4 ++-- - src/util.h | 2 +- - 5 files changed, 18 insertions(+), 5 deletions(-) - -diff --git a/src/fw/shadow.c b/src/fw/shadow.c -index cd02d3a..c80b266 100644 ---- a/src/fw/shadow.c -+++ b/src/fw/shadow.c -@@ -167,7 +167,7 @@ make_bios_readonly(void) - } - - void --qemu_prep_reset(void) -+qemu_reboot(void) - { - if (!CONFIG_QEMU || runningOnXen()) - return; -@@ -187,4 +187,16 @@ qemu_prep_reset(void) - memcpy(hrp + 4, hrp + 4 + BIOS_SRC_OFFSET, cend - (hrp + 4)); - barrier(); - HaveRunPost = 0; -+ barrier(); -+ -+ // Request a QEMU system reset. Do the reset in this function as -+ // the BIOS code was overwritten above and not all BIOS -+ // functionality may be available. -+ -+ // Attempt PCI style reset -+ outb(0x02, PORT_PCI_REBOOT); -+ outb(0x06, PORT_PCI_REBOOT); -+ -+ // Next try triple faulting the CPU to force a reset -+ asm volatile("int3"); - } -diff --git a/src/hw/pci.c b/src/hw/pci.c -index 506ee56..8e3d617 100644 ---- a/src/hw/pci.c -+++ b/src/hw/pci.c -@@ -12,7 +12,6 @@ - #include "x86.h" // outl - - #define PORT_PCI_CMD 0x0cf8 --#define PORT_PCI_REBOOT 0x0cf9 - #define PORT_PCI_DATA 0x0cfc - - void pci_config_writel(u16 bdf, u32 addr, u32 val) -diff --git a/src/hw/pci.h b/src/hw/pci.h -index bf50430..ee6e196 100644 ---- a/src/hw/pci.h -+++ b/src/hw/pci.h -@@ -3,6 +3,8 @@ - - #include "types.h" // u32 - -+#define PORT_PCI_REBOOT 0x0cf9 -+ - static inline u8 pci_bdf_to_bus(u16 bdf) { - return bdf >> 8; - } -diff --git a/src/resume.c b/src/resume.c -index 99fa34f..fb0b8a8 100644 ---- a/src/resume.c -+++ b/src/resume.c -@@ -125,8 +125,8 @@ tryReboot(void) - { - dprintf(1, "Attempting a hard reboot\n"); - -- // Setup for reset on qemu. -- qemu_prep_reset(); -+ // Use a QEMU specific reboot on QEMU -+ qemu_reboot(); - - // Reboot using ACPI RESET_REG - acpi_reboot(); -diff --git a/src/util.h b/src/util.h -index 557eb8b..1dfe463 100644 ---- a/src/util.h -+++ b/src/util.h -@@ -122,7 +122,7 @@ void pirtable_setup(void); - // fw/shadow.c - void make_bios_writable(void); - void make_bios_readonly(void); --void qemu_prep_reset(void); -+void qemu_reboot(void); - - // fw/smbios.c - void smbios_legacy_setup(void); --- -1.8.3.1 - diff --git a/SOURCES/seabios-usb-uas-enumerate-luns-with-REPORT-LUNS.patch b/SOURCES/seabios-usb-uas-enumerate-luns-with-REPORT-LUNS.patch deleted file mode 100644 index 3284b09..0000000 --- a/SOURCES/seabios-usb-uas-enumerate-luns-with-REPORT-LUNS.patch +++ /dev/null @@ -1,110 +0,0 @@ -From bd21ce9f5a9ba8539e3b44b635d10cce501f58bf Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 9 May 2017 11:24:37 +0200 -Subject: [PATCH 4/4] usb-uas: enumerate luns with REPORT LUNS - -RH-Author: Paolo Bonzini -Message-id: <20170509112437.30666-5-pbonzini@redhat.com> -Patchwork-id: 75054 -O-Subject: [RHEL7.4 seabios PATCH 4/4] usb-uas: enumerate luns with REPORT LUNS -Bugzilla: 1020622 -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Fam Zheng - -From: Roman Kagan - -Signed-off-by: Roman Kagan -Signed-off-by: Paolo Bonzini -(cherry picked from commit 8579fd20c89f0bbc258d6eedb993ecb1bf431027) -Signed-off-by: Miroslav Rezanina ---- - src/hw/usb-uas.c | 45 +++++++++++++++++++++++++++++---------------- - 1 file changed, 29 insertions(+), 16 deletions(-) - -diff --git a/src/hw/usb-uas.c b/src/hw/usb-uas.c -index 10e3845..f00221a 100644 ---- a/src/hw/usb-uas.c -+++ b/src/hw/usb-uas.c -@@ -86,8 +86,9 @@ typedef struct { - - struct uasdrive_s { - struct drive_s drive; -+ struct usbdevice_s *usbdev; - struct usb_pipe *command, *status, *data_in, *data_out; -- int lun; -+ u32 lun; - }; - - int -@@ -168,30 +169,41 @@ fail: - return DISK_RET_EBADTRACK; - } - --static int --uas_lun_setup(struct usbdevice_s *usbdev, -- struct usb_pipe *command, struct usb_pipe *status, -- struct usb_pipe *data_in, struct usb_pipe *data_out, -- int lun) -+static void -+uas_init_lun(struct uasdrive_s *drive, struct usbdevice_s *usbdev, -+ struct usb_pipe *command, struct usb_pipe *status, -+ struct usb_pipe *data_in, struct usb_pipe *data_out, -+ u32 lun) - { -- // Allocate drive structure. -- struct uasdrive_s *drive = malloc_fseg(sizeof(*drive)); -- if (!drive) { -- warn_noalloc(); -- return -1; -- } - memset(drive, 0, sizeof(*drive)); - if (usb_32bit_pipe(data_in)) - drive->drive.type = DTYPE_UAS_32; - else - drive->drive.type = DTYPE_UAS; -+ drive->usbdev = usbdev; - drive->command = command; - drive->status = status; - drive->data_in = data_in; - drive->data_out = data_out; - drive->lun = lun; -+} -+ -+static int -+uas_add_lun(u32 lun, struct drive_s *tmpl_drv) -+{ -+ struct uasdrive_s *tmpl_lun = -+ container_of(tmpl_drv, struct uasdrive_s, drive); -+ struct uasdrive_s *drive = malloc_fseg(sizeof(*drive)); -+ if (!drive) { -+ warn_noalloc(); -+ return -1; -+ } -+ uas_init_lun(drive, tmpl_lun->usbdev, -+ tmpl_lun->command, tmpl_lun->status, -+ tmpl_lun->data_in, tmpl_lun->data_out, -+ lun); - -- int prio = bootprio_find_usb(usbdev, lun); -+ int prio = bootprio_find_usb(drive->usbdev, drive->lun); - int ret = scsi_drive_setup(&drive->drive, "USB UAS", prio); - if (ret) { - free(drive); -@@ -258,9 +270,10 @@ usb_uas_setup(struct usbdevice_s *usbdev) - if (!command || !status || !data_in || !data_out) - goto fail; - -- /* TODO: send REPORT LUNS. For now, only LUN 0 is recognized. */ -- int ret = uas_lun_setup(usbdev, command, status, data_in, data_out, 0); -- if (ret < 0) { -+ struct uasdrive_s lun0; -+ uas_init_lun(&lun0, usbdev, command, status, data_in, data_out, 0); -+ int ret = scsi_rep_luns_scan(&lun0.drive, uas_add_lun); -+ if (ret <= 0) { - dprintf(1, "Unable to configure UAS drive.\n"); - goto fail; - } --- -1.8.3.1 - diff --git a/SOURCES/seabios-virtio-IOMMU-support.patch b/SOURCES/seabios-virtio-IOMMU-support.patch deleted file mode 100644 index 961c313..0000000 --- a/SOURCES/seabios-virtio-IOMMU-support.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 15fc9e09377bdbe516f83fd0497c583ab7a58b23 Mon Sep 17 00:00:00 2001 -From: Xiao Wang -Date: Tue, 18 Jul 2017 06:42:01 +0100 -Subject: [PATCH] virtio: IOMMU support - -RH-Author: Xiao Wang -Message-id: <1500360121-31384-1-git-send-email-jasowang@redhat.com> -Patchwork-id: 75797 -O-Subject: [RHEL7.4z seabios PATCH] virtio: IOMMU support -Bugzilla: 1467811 1472131 -RH-Acked-by: wexu@redhat.com -RH-Acked-by: Jens Freimann -RH-Acked-by: Maxime Coquelin -RH-Acked-by: Michael S. Tsirkin - -Bugzilla: 1463163, 1467811 -Brew Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13673302 -Test status: Tested by my self - -Since we don't enable IOMMU at all, we can then simply enable the -IOMMU support by claiming the support of VIRITO_F_IOMMU_PLATFORM. This -fixes booting failure when iommu_platform is set from qemu cli. - -Acked-by: Michael S. Tsirkin -Signed-off-by: Jason Wang -(cherry picked from commit dd9bba5b9c1d5175a2757f3fdc9d554b4c8eea3a) -Signed-off-by: Danilo C. L. de Paula ---- - src/hw/virtio-blk.c | 3 ++- - src/hw/virtio-ring.h | 1 + - src/hw/virtio-scsi.c | 3 ++- - 3 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c -index dca7855..901b8f5 100644 ---- a/src/hw/virtio-blk.c -+++ b/src/hw/virtio-blk.c -@@ -118,13 +118,14 @@ init_virtio_blk(void *data) - struct vp_device *vp = &vdrive->vp; - u64 features = vp_get_features(vp); - u64 version1 = 1ull << VIRTIO_F_VERSION_1; -+ u64 iommu_platform = 1ull << VIRTIO_F_IOMMU_PLATFORM; - u64 blk_size = 1ull << VIRTIO_BLK_F_BLK_SIZE; - if (!(features & version1)) { - dprintf(1, "modern device without virtio_1 feature bit: %pP\n", pci); - goto fail; - } - -- features = features & (version1 | blk_size); -+ features = features & (version1 | iommu_platform | blk_size); - vp_set_features(vp, features); - status |= VIRTIO_CONFIG_S_FEATURES_OK; - vp_set_status(vp, status); -diff --git a/src/hw/virtio-ring.h b/src/hw/virtio-ring.h -index 7665fd5..8604a01 100644 ---- a/src/hw/virtio-ring.h -+++ b/src/hw/virtio-ring.h -@@ -18,6 +18,7 @@ - - /* v1.0 compliant. */ - #define VIRTIO_F_VERSION_1 32 -+#define VIRTIO_F_IOMMU_PLATFORM 33 - - #define MAX_QUEUE_NUM (128) - -diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c -index 7490ec0..4eea5c3 100644 ---- a/src/hw/virtio-scsi.c -+++ b/src/hw/virtio-scsi.c -@@ -163,12 +163,13 @@ init_virtio_scsi(void *data) - if (vp->use_modern) { - u64 features = vp_get_features(vp); - u64 version1 = 1ull << VIRTIO_F_VERSION_1; -+ u64 iommu_platform = 1ull << VIRTIO_F_IOMMU_PLATFORM; - if (!(features & version1)) { - dprintf(1, "modern device without virtio_1 feature bit: %pP\n", pci); - goto fail; - } - -- vp_set_features(vp, version1); -+ vp_set_features(vp, features & (version1 | iommu_platform)); - status |= VIRTIO_CONFIG_S_FEATURES_OK; - vp_set_status(vp, status); - if (!(vp_get_status(vp) & VIRTIO_CONFIG_S_FEATURES_OK)) { --- -1.8.3.1 - diff --git a/SOURCES/seabios-virtio-scsi-enumerate-luns-with-REPORT-LUNS.patch b/SOURCES/seabios-virtio-scsi-enumerate-luns-with-REPORT-LUNS.patch deleted file mode 100644 index a25febf..0000000 --- a/SOURCES/seabios-virtio-scsi-enumerate-luns-with-REPORT-LUNS.patch +++ /dev/null @@ -1,92 +0,0 @@ -From bc962ebe743f27b3f939239a6193a3f93643ae7a Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 9 May 2017 11:24:36 +0200 -Subject: [PATCH 3/4] virtio-scsi: enumerate luns with REPORT LUNS - -RH-Author: Paolo Bonzini -Message-id: <20170509112437.30666-4-pbonzini@redhat.com> -Patchwork-id: 75053 -O-Subject: [RHEL7.4 seabios PATCH 3/4] virtio-scsi: enumerate luns with REPORT LUNS -Bugzilla: 1020622 -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Fam Zheng - -From: Roman Kagan - -Signed-off-by: Roman Kagan -Signed-off-by: Paolo Bonzini -(cherry picked from commit 69ebdef9bdb7f0f4f7bd9b5f30ef0bf687d6c918) -Signed-off-by: Miroslav Rezanina ---- - src/hw/virtio-scsi.c | 38 ++++++++++++++++++++++++++------------ - 1 file changed, 26 insertions(+), 12 deletions(-) - -diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c -index 5fb9409..7490ec0 100644 ---- a/src/hw/virtio-scsi.c -+++ b/src/hw/virtio-scsi.c -@@ -94,15 +94,11 @@ virtio_scsi_process_op(struct disk_op_s *op) - return DISK_RET_EBADTRACK; - } - --static int --virtio_scsi_add_lun(struct pci_device *pci, struct vp_device *vp, -- struct vring_virtqueue *vq, u16 target, u16 lun) -+static void -+virtio_scsi_init_lun(struct virtio_lun_s *vlun, struct pci_device *pci, -+ struct vp_device *vp, struct vring_virtqueue *vq, -+ u16 target, u16 lun) - { -- struct virtio_lun_s *vlun = malloc_fseg(sizeof(*vlun)); -- if (!vlun) { -- warn_noalloc(); -- return -1; -- } - memset(vlun, 0, sizeof(*vlun)); - vlun->drive.type = DTYPE_VIRTIO_SCSI; - vlun->drive.cntl_id = pci->bdf; -@@ -111,8 +107,22 @@ virtio_scsi_add_lun(struct pci_device *pci, struct vp_device *vp, - vlun->vq = vq; - vlun->target = target; - vlun->lun = lun; -+} - -- int prio = bootprio_find_scsi_device(pci, target, lun); -+static int -+virtio_scsi_add_lun(u32 lun, struct drive_s *tmpl_drv) -+{ -+ struct virtio_lun_s *tmpl_vlun = -+ container_of(tmpl_drv, struct virtio_lun_s, drive); -+ struct virtio_lun_s *vlun = malloc_fseg(sizeof(*vlun)); -+ if (!vlun) { -+ warn_noalloc(); -+ return -1; -+ } -+ virtio_scsi_init_lun(vlun, tmpl_vlun->pci, tmpl_vlun->vp, tmpl_vlun->vq, -+ tmpl_vlun->target, lun); -+ -+ int prio = bootprio_find_scsi_device(vlun->pci, vlun->target, vlun->lun); - int ret = scsi_drive_setup(&vlun->drive, "virtio-scsi", prio); - if (ret) - goto fail; -@@ -127,9 +137,13 @@ static int - virtio_scsi_scan_target(struct pci_device *pci, struct vp_device *vp, - struct vring_virtqueue *vq, u16 target) - { -- /* TODO: send REPORT LUNS. For now, only LUN 0 is recognized. */ -- int ret = virtio_scsi_add_lun(pci, vp, vq, target, 0); -- return ret < 0 ? 0 : 1; -+ -+ struct virtio_lun_s vlun0; -+ -+ virtio_scsi_init_lun(&vlun0, pci, vp, vq, target, 0); -+ -+ int ret = scsi_rep_luns_scan(&vlun0.drive, virtio_scsi_add_lun); -+ return ret < 0 ? 0 : ret; - } - - static void --- -1.8.3.1 - diff --git a/SPECS/seabios.spec b/SPECS/seabios.spec index 0b255d3..f879bf3 100644 --- a/SPECS/seabios.spec +++ b/SPECS/seabios.spec @@ -1,6 +1,6 @@ Name: seabios -Version: 1.10.2 -Release: 3%{?dist}.1 +Version: 1.11.0 +Release: 2%{?dist} Summary: Open-source legacy BIOS implementation Group: Applications/Emulators @@ -8,7 +8,7 @@ License: LGPLv3 URL: http://www.coreboot.org/SeaBIOS -Source0: http://code.coreboot.org/p/seabios/downloads/get/seabios-1.10.2.tar.gz +Source0: https://code.coreboot.org/p/seabios/downloads/get/seabios-1.11.0.tar.gz Source10: config.vga.cirrus Source11: config.vga.isavga @@ -20,23 +20,13 @@ Source16: config.base-256k Source17: config.vga.virtio -Patch2: 0002-allow-1TB-of-RAM.patch -Patch3: 0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch -Patch4: 0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch -Patch5: 0005-redhat-reserve-more-memory-on-fseg.patch -Patch6: 0006-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch -# For bz#1428347 - reboot hangs on rhel6 machine types (~1/20 times) -Patch7: seabios-resume-Don-t-attempt-to-use-generic-reboot-mechanism.patch -# For bz#1020622 - seabios fail to recognize virtio-scsi device if specify LUN not 0 -Patch8: seabios-blockcmd-accept-only-disks-and-CD-ROMs.patch -# For bz#1020622 - seabios fail to recognize virtio-scsi device if specify LUN not 0 -Patch9: seabios-blockcmd-generic-SCSI-luns-enumeration.patch -# For bz#1020622 - seabios fail to recognize virtio-scsi device if specify LUN not 0 -Patch10: seabios-virtio-scsi-enumerate-luns-with-REPORT-LUNS.patch -# For bz#1020622 - seabios fail to recognize virtio-scsi device if specify LUN not 0 -Patch11: seabios-usb-uas-enumerate-luns-with-REPORT-LUNS.patch -# For bz#1472131 - Guest OS will down when disk enable the IOMMU for Virtio -Patch12: seabios-virtio-IOMMU-support.patch +Patch0002: 0002-allow-1TB-of-RAM.patch +Patch0003: 0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch +Patch0004: 0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch +Patch0005: 0005-redhat-reserve-more-memory-on-fseg.patch +Patch0006: 0006-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch +# For bz#1523166 - [Q35] guest kernel panic when boot with 9 nics +Patch7: seabios-pci-fix-io-hints-capability-for-RedHat-PCI-bridges.patch BuildRequires: python iasl ExclusiveArch: x86_64 %{power64} @@ -87,17 +77,12 @@ SeaVGABIOS is an open-source VGABIOS implementation. %prep %setup -q -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 +%patch0002 -p1 +%patch0003 -p1 +%patch0004 -p1 +%patch0005 -p1 +%patch0006 -p1 %patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 %build %ifarch x86_64 @@ -150,10 +135,30 @@ install -m 0644 binaries/vgabios*.bin $RPM_BUILD_ROOT%{_datadir}/seavgabios %endif %changelog -* Wed Jul 26 2017 Danilo Cesar Lemes de Paula - 1.10.2-3.el7_4.1 -- seabios-virtio-IOMMU-support.patch [bz#1472131] -- Resolves: bz#1472131 +* Tue Jan 30 2018 Miroslav Rezanina - 1.11.0-2.el7 +- seabios-pci-fix-io-hints-capability-for-RedHat-PCI-bridges.patch [bz#1523166] +- Resolves: bz#1523166 + ([Q35] guest kernel panic when boot with 9 nics) + +* Wed Nov 15 2017 Miroslav Rezanina - 1.11.0-1.el7 +- Rebase to 1.11.0 [bz#1470751] +- Resolves: bz#1470751 + (Rebase seabios for RHEL-7.5) + +* Fri Oct 20 2017 Miroslav Rezanina - 1.10.2-5.el7 +- seabios-boot-Rename-drive_g-to-drive.patch [bz#1452603] +- seabios-disk-Don-t-require-the-struct-drive_s-to-be-in-the-f.patch [bz#1452603] +- seabios-block-Rename-disk_op_s-drive_gf-to-drive_fl.patch [bz#1452603] +- seabios-virtio-Allocate-drive_s-storage-in-low-memory.patch [bz#1452603] +- Resolves: bz#1452603 + (can't bootup from image when attached multi-virtio-scsi disks with multi-luns) + +* Thu Sep 28 2017 Wainer dos Santos Moschetta - 1.10.2-4.el7 +- seabios-virtio-IOMMU-support.patch [bz#1463163, bz#1467811] +- Resolves: bz#1463163 (Guest OS will down when disk enable the IOMMU for Virtio) +- Resolves: bz#1467811 + (Guest OS will down when disk enable the IOMMU for virtio-scsi) * Fri May 12 2017 Miroslav Rezanina - 1.10.2-3.el7 - seabios-blockcmd-accept-only-disks-and-CD-ROMs.patch [bz#1020622]