diff options
author | Avi Kivity <avi@redhat.com> | 2009-07-28 19:44:46 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-07-28 19:44:46 +0300 |
commit | c9d944213ce2328e7fc3c980ab7311ad351a78dd (patch) | |
tree | 4f7645cb3e6e74435736b9b8333fea5aca888c90 /pc-bios | |
parent | Regenerate bios for boot menu (diff) | |
parent | bios: Fix multiple calls into smbios_load_ex (diff) | |
download | qemu-kvm-c9d944213ce2328e7fc3c980ab7311ad351a78dd.tar.gz qemu-kvm-c9d944213ce2328e7fc3c980ab7311ad351a78dd.tar.bz2 qemu-kvm-c9d944213ce2328e7fc3c980ab7311ad351a78dd.zip |
Merge commit 'e1e8f35a4f59d82ab9a5361c3990c8dadd2e7678' into upstream-merge
* commit 'e1e8f35a4f59d82ab9a5361c3990c8dadd2e7678':
bios: Fix multiple calls into smbios_load_ex
gdbstub: x86: Support for setting segment registers
gdbstub: x86: Refactor register access
gdbstub: Add vCont support
slirp: Fix default netmask to 255.255.255.0
Conflicts:
pc-bios/bios.bin (dropped)
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'pc-bios')
-rw-r--r-- | pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch | 35 | ||||
-rw-r--r-- | pc-bios/bios-pq/series | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch b/pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch new file mode 100644 index 000000000..cfa4c1309 --- /dev/null +++ b/pc-bios/bios-pq/0019-bios-fix-multiple-calls.patch @@ -0,0 +1,35 @@ +bios: Fix multiple calls into smbios_load_ex + +We're marking the used entry bitmap in smbios_load_external() for each +type we check, regardless of whether we loaded anything. This makes +subsequent calls behave as if we've already loaded the tables from qemu +and can result in missing tables (ex. multiple type4 entries on an SMP +guest). Only mark the bitmap if we actually load something. + +Signed-off-by: Alex Williamson <alex.williamson@hp.com> +Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> + +diff --git a/bios/rombios32.c b/bios/rombios32.c +index f861f81..c869798 100644 +--- a/bios/rombios32.c ++++ b/bios/rombios32.c +@@ -2554,13 +2554,14 @@ smbios_load_external(int type, char **p, unsigned *nr_structs, + *max_struct_size = *p - (char *)header; + } + +- /* Mark that we've reported on this type */ +- used_bitmap[(type >> 6) & 0x3] |= (1ULL << (type & 0x3f)); ++ if (start != *p) { ++ /* Mark that we've reported on this type */ ++ used_bitmap[(type >> 6) & 0x3] |= (1ULL << (type & 0x3f)); ++ return 1; ++ } + +- return (start != *p); +-#else /* !BX_QEMU */ ++#endif /* !BX_QEMU */ + return 0; +-#endif + } + + void smbios_init(void) diff --git a/pc-bios/bios-pq/series b/pc-bios/bios-pq/series index 9e909de1d..695b148ad 100644 --- a/pc-bios/bios-pq/series +++ b/pc-bios/bios-pq/series @@ -16,3 +16,4 @@ 0016-use-correct-mask-to-size-pci-option-rom-bar.patch 0017-bochs-bios-Move-QEMU_CFG-constants-to-rombios.h.patch 0018-bochs-bios-Make-boot-prompt-optional.patch +0019-bios-fix-multiple-calls.patch |