521c6d4a-x86-don-t-allow-Dom0-access-to-the-MSI-address-range.patch 521c6d6c-x86-don-t-allow-Dom0-access-to-the-HT-address-range.patch 521c6e23-x86-Intel-add-support-for-Haswell-CPU-models.patch 521db25f-Fix-inactive-timer-list-corruption-on-second-S3-resume.patch 521e1156-x86-AVX-instruction-emulation-fixes.patch 521ef8d9-AMD-IOMMU-add-missing-checks.patch 52205a7d-hvmloader-smbios-Correctly-count-the-number-of-tables-written.patch 52205a90-public-hvm_xs_strings.h-Fix-ABI-regression-for-OEM-SMBios-strings.patch 52205e27-x86-xsave-initialization-improvements.patch 5226020f-xend-handle-extended-PCI-configuration-space-when-saving-state.patch 52260214-xend-fix-file-descriptor-leak-in-pci-utilities.patch 52285317-hvmloader-fix-SeaBIOS-interface.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=271
85 lines
2.9 KiB
Diff
85 lines
2.9 KiB
Diff
# Commit 5f2875739beef3a75c7a7e8579b6cbcb464e61b3
|
|
# Date 2013-09-05 11:47:03 +0200
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
hvmloader: fix SeaBIOS interface
|
|
|
|
The SeaBIOS ROM image may validly exceed 128k in size, it's only our
|
|
interface code that so far assumed that it wouldn't. Remove that
|
|
restriction by setting the base address depending on image size.
|
|
|
|
Add a check to HVM loader so that too big images won't result in silent
|
|
guest failure anymore.
|
|
|
|
Uncomment the intended build-time size check for rombios, moving it
|
|
into a function so that it would actually compile.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
--- 2013-08-30.orig/tools/firmware/hvmloader/config-seabios.h 2013-07-09 20:57:12.000000000 +0200
|
|
+++ 2013-08-30/tools/firmware/hvmloader/config-seabios.h 2013-09-09 11:24:23.000000000 +0200
|
|
@@ -3,8 +3,6 @@
|
|
|
|
#define BIOS_INFO_PHYSICAL_ADDRESS 0x00001000
|
|
|
|
-#define SEABIOS_PHYSICAL_ADDRESS 0x000E0000
|
|
-
|
|
#endif /* __HVMLOADER_CONFIG_SEABIOS_H__ */
|
|
|
|
/*
|
|
--- 2013-08-30.orig/tools/firmware/hvmloader/hvmloader.c 2013-07-09 20:57:12.000000000 +0200
|
|
+++ 2013-08-30/tools/firmware/hvmloader/hvmloader.c 2013-09-09 11:24:23.000000000 +0200
|
|
@@ -292,8 +292,12 @@ int main(void)
|
|
if ( bios->bios_load )
|
|
bios->bios_load(bios);
|
|
else
|
|
+ {
|
|
+ BUG_ON(bios->bios_address + bios->image_size >
|
|
+ HVMLOADER_PHYSICAL_ADDRESS);
|
|
memcpy((void *)bios->bios_address, bios->image,
|
|
bios->image_size);
|
|
+ }
|
|
|
|
if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode )
|
|
{
|
|
--- 2013-08-30.orig/tools/firmware/hvmloader/rombios.c 2013-07-09 20:57:12.000000000 +0200
|
|
+++ 2013-08-30/tools/firmware/hvmloader/rombios.c 2013-09-09 11:24:23.000000000 +0200
|
|
@@ -127,6 +127,8 @@ static void rombios_load(const struct bi
|
|
uint32_t bioshigh;
|
|
struct rombios_info *info;
|
|
|
|
+ BUILD_BUG_ON(sizeof(rombios) > 0x100000 - ROMBIOS_PHYSICAL_ADDRESS);
|
|
+
|
|
memcpy((void *)config->bios_address, config->image,
|
|
config->image_size);
|
|
|
|
@@ -206,8 +208,6 @@ static void rombios_create_smbios_tables
|
|
SMBIOS_PHYSICAL_END);
|
|
}
|
|
|
|
-//BUILD_BUG_ON(sizeof(rombios) > (0x00100000U - ROMBIOS_PHYSICAL_ADDRESS));
|
|
-
|
|
struct bios_config rombios_config = {
|
|
.name = "ROMBIOS",
|
|
|
|
--- 2013-08-30.orig/tools/firmware/hvmloader/seabios.c 2013-07-09 20:57:12.000000000 +0200
|
|
+++ 2013-08-30/tools/firmware/hvmloader/seabios.c 2013-09-09 11:24:23.000000000 +0200
|
|
@@ -133,15 +133,13 @@ static void seabios_setup_e820(void)
|
|
dump_e820_table(e820, info->e820_nr);
|
|
}
|
|
|
|
-//BUILD_BUG_ON(sizeof(seabios) > (0x00100000U - SEABIOS_PHYSICAL_ADDRESS));
|
|
-
|
|
struct bios_config seabios_config = {
|
|
.name = "SeaBIOS",
|
|
|
|
.image = seabios,
|
|
.image_size = sizeof(seabios),
|
|
|
|
- .bios_address = SEABIOS_PHYSICAL_ADDRESS,
|
|
+ .bios_address = 0x100000 - sizeof(seabios),
|
|
|
|
.load_roms = NULL,
|
|
|