qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: Laszlo Ersek <lersek@redhat.com>,
	mst@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
	Kevin O'Connor <kevin@koconnor.net>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: [Qemu-devel] FW_CFG_NB_CPUS vs fwcfg file 'etc/boot-cpus'
Date: Fri, 11 Nov 2016 13:57:17 +0100	[thread overview]
Message-ID: <20161111135717.18eaa6dc@nial.brq.redhat.com> (raw)

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?

             reply	other threads:[~2016-11-11 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 12:57 Igor Mammedov [this message]
2016-11-11 14:02 ` [Qemu-devel] FW_CFG_NB_CPUS vs fwcfg file 'etc/boot-cpus' 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161111135717.18eaa6dc@nial.brq.redhat.com \
    --to=imammedo@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).