qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] bios: Fix multiple calls into smbios_load_external()
@ 2009-05-28 16:36 Alex Williamson
  2009-06-17 15:30 ` Markus Armbruster
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2009-05-28 16:36 UTC (permalink / raw)
  To: qemu-devel, Beth Kon; +Cc: bochs-developers

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>
--

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-17 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 16:36 [Qemu-devel] [PATCH] bios: Fix multiple calls into smbios_load_external() Alex Williamson
2009-06-17 15:30 ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).