qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] FW_CFG_NB_CPUS vs fwcfg file 'etc/boot-cpus'
@ 2016-11-11 12:57 Igor Mammedov
  2016-11-11 14:02 ` Laszlo Ersek
  0 siblings, 1 reply; 6+ messages in thread
From: Igor Mammedov @ 2016-11-11 12:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laszlo Ersek, mst, Stefan Hajnoczi, Kevin O'Connor,
	Gerd Hoffmann, Eduardo Habkost

While looking at OVMF and how it handles CPUs (ACPI/AP wakeup),
I've noticed that it uses legacy FW_CFG_NB_CPUS(0x05) to get
the number of present at start CPUs.
Variable was introduced back in 2008 by fbfcf955ba and is/was used
by ppc/sparc/arm/x86 and a bunch of firmwares (but not by SeaBIOS).

However in 2.8 I've just added similar fwcfg file 'etc/boot-cpus'
which is used for the same purpose \-)

Both variables are UINT16 and the only difference that FW_CFG_NB_CPUS
doesn't account for CPUs added with -device which might make
a firmware to wait indefinitely in FW_CFG_NB_CPUS == Woken-up-APs loop
due to extra not expected APs being woken up.

FW_CFG_NB_CPUS should be fixed to mimic 'etc/boot-cpus' behavior anyway,
so question arises why not to reuse fixed legacy FW_CFG_NB_CPUS and
drop just added but not yet released 'etc/boot-cpus' from QEMU and SeaBIOS.

Any opinions?

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

end of thread, other threads:[~2016-11-11 16:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-11 12:57 [Qemu-devel] FW_CFG_NB_CPUS vs fwcfg file 'etc/boot-cpus' Igor Mammedov
2016-11-11 14:02 ` Laszlo Ersek
2016-11-11 14:36   ` Igor Mammedov
2016-11-11 14:44     ` Kevin O'Connor
2016-11-11 15:05       ` Igor Mammedov
2016-11-11 16:37     ` Laszlo Ersek

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