All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Add support for loading SMBIOS OEM strings from a file
@ 2020-09-08 16:54 Daniel P. Berrangé
  2020-09-08 16:54 ` [PATCH 1/5] hw/smbios: support loading OEM strings values " Daniel P. Berrangé
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Daniel P. Berrangé @ 2020-09-08 16:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Daniel P. Berrangé,
	Eduardo Habkost, Michael S. Tsirkin, Laszlo Ersek,
	Markus Armbruster, qemu-arm, Paolo Bonzini, Igor Mammedov,
	Richard Henderson

I previously added support for SMBIOS OEM strings tables but only
allowed for data to be passed inline. Potential users indicated they
wanted to pass some quite large data blobs which is inconvenient todo
inline. Thus I'm adding support for passing the data from a file.

In testing this I discovered the hard way that on x86 we're limited to
using the SMBIOS 2.1 entry point currently. This has a maximum size of
0xffff, and if you exceed this all sorts of wierd behaviour happens.

QEMU forces SMBIOS 2.1 on x86 because the default SeaBIOS firmware does
not support SMBIOS 3.0. The EDK2 firmware supports SMBIOS 3.0 and QEMU
defaults to this on the ARM virt machine type.

This series adds support for checking the SMBIOS 2.1 limits to protect
users from impossible to diagnose problems.

There is also a fix needed to SeaBIOS which fails to check for
integer overflow when it appends the type 0 table.

  https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/3EMIOY=
6YS6MG5UQN3JJJS2A3DJZOVFR6/

IIUC, SMBIOS 3.0 should onlky be limited by what you can fit into RAM,
but in testing, EDK2 appears to hang shortly after the SMBIOS 3.0 data
size exceeds 128 KB. I've not spotted an obvious flaw in EDK2 or QEMU,
nor do I attempt to enforce a limit in QEMU for SMBIOS 3.0.

The 4th and 5th patches are what I used to test x86 machine types with
EDK2 support for SMBIOS 3.0.  I'm ambivalent on whether we really need
them or not, but it does feel desirable to have parity of features
between x86 and ARM when using SMBIOS with EDK2.

Daniel P. Berrang=C3=A9 (5):
  hw/smbios: support loading OEM strings values from a file
  hw/smbios: report error if table size is too large
  qemu-options: document SMBIOS type 11 settings
  hw/smbios: use qapi for SMBIOS entry point type enum
  hw/i386: expose a "smbios_ep" PC machine property

 hw/arm/virt.c                |  2 +-
 hw/i386/pc.c                 | 26 ++++++++++
 hw/i386/pc_piix.c            |  2 +-
 hw/i386/pc_q35.c             |  2 +-
 hw/smbios/smbios.c           | 93 +++++++++++++++++++++++++++++-------
 include/hw/firmware/smbios.h |  9 +---
 include/hw/i386/pc.h         |  3 ++
 qapi/machine.json            | 12 +++++
 qemu-options.hx              | 41 ++++++++++++++++
 9 files changed, 164 insertions(+), 26 deletions(-)

--=20
2.26.2




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

end of thread, other threads:[~2020-12-09 18:15 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08 16:54 [PATCH 0/5] Add support for loading SMBIOS OEM strings from a file Daniel P. Berrangé
2020-09-08 16:54 ` [PATCH 1/5] hw/smbios: support loading OEM strings values " Daniel P. Berrangé
2020-09-08 18:24   ` Philippe Mathieu-Daudé
2020-09-09  7:35     ` Daniel P. Berrangé
2020-09-09  8:33       ` Philippe Mathieu-Daudé
2020-09-09  8:18   ` Laszlo Ersek
2020-09-09  9:00     ` Daniel P. Berrangé
2020-09-09  9:10     ` Daniel P. Berrangé
2020-09-09  8:24   ` Laszlo Ersek
2020-09-08 16:54 ` [PATCH 2/5] hw/smbios: report error if table size is too large Daniel P. Berrangé
2020-09-08 18:25   ` Philippe Mathieu-Daudé
2020-09-14  8:02   ` Igor Mammedov
2020-09-08 16:54 ` [PATCH 3/5] qemu-options: document SMBIOS type 11 settings Daniel P. Berrangé
2020-09-08 18:27   ` Philippe Mathieu-Daudé
2020-09-08 16:54 ` [PATCH 4/5] hw/smbios: use qapi for SMBIOS entry point type enum Daniel P. Berrangé
2020-09-08 18:29   ` Philippe Mathieu-Daudé
2020-09-09  7:36     ` Daniel P. Berrangé
2020-09-08 18:37   ` Philippe Mathieu-Daudé
2020-12-09 17:56   ` Eduardo Habkost
2020-09-08 16:54 ` [PATCH 5/5] hw/i386: expose a "smbios_ep" PC machine property Daniel P. Berrangé
2020-09-08 18:38   ` Philippe Mathieu-Daudé
2020-09-09  8:28   ` Laszlo Ersek
2020-09-09  9:44 ` [PATCH 0/5] Add support for loading SMBIOS OEM strings from a file Laszlo Ersek
2020-09-09  9:50   ` Daniel P. Berrangé
2020-09-09 10:58     ` Laszlo Ersek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.