On 29 April 2014 13:11, Gerd Hoffmann <kra...@redhat.com> wrote: > Hi, > > This patch series makes qemu generate smbios tables for 2.1 & newer > machine types. Most patches are created by Gabriel L. Somlo. For the > new machine type I've picked mst's patch though, so git should have an > easier job sorting things in case the same thing comes in through > another branch. > > please pull, > Gerd > > The following changes since commit e2da502c003b9a91b4aea7684959192bd07c1f1d: > > Merge remote-tracking branch 'remotes/otubo/seccomp' into staging > (2014-04-28 14:14:35 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-smbios-1 > > for you to fetch changes up to 3b17c3b4b58b4528e9097ac5d40b7b70060a1016: > > SMBIOS: Build aggregate smbios tables and entry point (2014-04-29 13:48:48 > +0200) > > ---------------------------------------------------------------- > smbios: make qemu generate smbios tables.
I'm afraid this doesn't compile: CC i386-softmmu/hw/i386/smbios.o /root/qemu/hw/i386/smbios.c: In function ‘smbios_get_tables’: /root/qemu/hw/i386/smbios.c:834:71: error: division by zero [-Werror=div-by-zero] /root/qemu/hw/i386/smbios.c:834:142: error: division by zero [-Werror=div-by-zero] /root/qemu/hw/i386/smbios.c:839:105: error: division by zero [-Werror=div-by-zero] /root/qemu/hw/i386/smbios.c:844:13: error: passing argument 3 of ‘e820_get_entry’ from incompatible pointer type [-Werror] In file included from /root/qemu/hw/i386/smbios.c:22:0: /root/qemu/include/hw/i386/pc.h:243:7: note: expected ‘uint64_t *’ but argument is of type ‘ram_addr_t *’ /root/qemu/hw/i386/smbios.c:844:13: error: passing argument 4 of ‘e820_get_entry’ from incompatible pointer type [-Werror] In file included from /root/qemu/hw/i386/smbios.c:22:0: /root/qemu/include/hw/i386/pc.h:243:7: note: expected ‘uint64_t *’ but argument is of type ‘ram_addr_t *’ cc1: all warnings being treated as errors make[1]: *** [hw/i386/smbios.o] Error 1 You can't assume ram_addr_t is 64 bits. The division by zero issues are also caused by this: you define #define ONE_GB ((ram_addr_t)1 << 30) and later #define MAX_DIMM_SZ (16 * ONE_GB) but this will overflow if ram_addr_t is 32 bits and you end up with MAX_DIMM_SZ being zero. thanks -- PMM