qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
	"qemu devel list" <qemu-devel@nongnu.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH 3/4] hw/i386: add facility to expose CPU topology over fw-cfg
Date: Fri, 11 Oct 2019 08:50:21 +0200	[thread overview]
Message-ID: <2d8022a1-e2f0-bd7c-76f2-f7e47327adea@redhat.com> (raw)
In-Reply-To: <20191010140724-mutt-send-email-mst@kernel.org>

On 10/10/19 20:08, Michael S. Tsirkin wrote:
> On Thu, Oct 10, 2019 at 06:23:00PM +0200, Laszlo Ersek wrote:
>> On 10/10/19 14:48, Igor Mammedov wrote:
>>
>>> it doesn't really matter if it's ACPI blob or fw_cfg,
>>> what firmware needs is a table of possible CPUs with APIC IDs.
>>
>> To repeat my previous point:
>>
>> Not necessarily taking sides between "data table" and "register block",
>> but *if* we opt for "data table", then it *must* be fw_cfg.
>>
>>> But if we go this route (i.e. not reuse CPU hotplug interface),
>>> the table alone is not enough, one would need to build a protocol
>>> between ACPI and firmware to communicate what CPUs to (un)hotplug.
>>
>> That's for sure, yes -- for finding out what CPU has been hotplugged,
>> the hotplug SMI handler in the firmware has to look at the register
>> block no matter what.
> 
> I thought all that's done by ACPI, with ACPI returning an event
> to the OSPM reporting what happened.

That works if only the OS needs to care -- the OS can rely on ACPI.

But with SMM in the picture, the firmware has to care too (the new CPU's
SMBASE has to be relocated, and the SMM data structures need to account
for the new CPU). The firmware cannot rely on any AML generated by QEMU.

Thanks
Laszlo

> 
>> The "data table" vs "register block" question only arises *afterwards*,
>> for translating the CPU selector (fetched from the register block) to
>> the APIC-ID domain. (The generic edk2 infrastructure requires APIC-IDs).
>>
>> Thanks
>> Laszlo



  reply	other threads:[~2019-10-11  6:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 10:52 [PATCH 0/4] hw/i386: pass "MachineState.smp.max_cpus" to OVMF Laszlo Ersek
2019-10-08 10:52 ` [PATCH 1/4] fw_cfg: bump file slots to 40 Laszlo Ersek
2019-10-08 10:52 ` [PATCH 2/4] target/i386: remove useless enable_compat_apic_id_mode() prototype Laszlo Ersek
2019-10-08 13:35   ` Philippe Mathieu-Daudé
2019-10-08 18:22     ` Laszlo Ersek
2019-10-08 10:52 ` [PATCH 3/4] hw/i386: add facility to expose CPU topology over fw-cfg Laszlo Ersek
2019-10-08 13:29   ` Philippe Mathieu-Daudé
2019-10-08 18:31     ` Laszlo Ersek
2019-10-08 15:59   ` Igor Mammedov
2019-10-09 21:01     ` Laszlo Ersek
2019-10-10  9:45       ` Igor Mammedov
2019-10-10 10:01     ` Michael S. Tsirkin
2019-10-10 12:48       ` Igor Mammedov
2019-10-10 16:23         ` Laszlo Ersek
2019-10-10 18:08           ` Michael S. Tsirkin
2019-10-11  6:50             ` Laszlo Ersek [this message]
2019-10-11  7:46               ` Laszlo Ersek
2019-10-10 16:15       ` Laszlo Ersek
2019-10-08 18:58   ` Laszlo Ersek
2019-10-09 11:13     ` Igor Mammedov
2019-10-09 21:03       ` Laszlo Ersek
2019-10-09 21:09     ` Eduardo Habkost
2019-10-08 10:52 ` [PATCH 4/4] hw/i386/pc: " Laszlo Ersek
2019-10-08 14:23 ` [PATCH 0/4] hw/i386: pass "MachineState.smp.max_cpus" to OVMF no-reply

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=2d8022a1-e2f0-bd7c-76f2-f7e47327adea@redhat.com \
    --to=lersek@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).