From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <rth@twiddle.net>,
Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] [PULL v2 15/15] pc: acpi: mark all possible CPUs as enabled in SRAT
Date: Mon, 24 Nov 2014 21:31:40 +0200 [thread overview]
Message-ID: <1416855830-31740-16-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1416855830-31740-1-git-send-email-mst@redhat.com>
From: Igor Mammedov <imammedo@redhat.com>
If QEMU is started with -numa ... Windows only notices that
CPU has been hot-added but it will not online such CPUs.
It's caused by the fact that possible CPUs are flagged as
not enabled in SRAT and Windows honoring that information
doesn't use corresponding CPU.
ACPI 5.0 Spec regarding to flag says:
"
Table 5-47 Local APIC Flags
...
Enabled: if zero, this processor is unusable, and the operating system
support will not attempt to use it.
"
Fix QEMU to adhere to spec and mark possible CPUs as enabled
in SRAT.
With that Windows onlines hot-added CPUs as expected.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 92a36e3..b37a397 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1270,8 +1270,7 @@ acpi_build_srat_memory(AcpiSratMemoryAffinity *numamem, uint64_t base,
}
static void
-build_srat(GArray *table_data, GArray *linker,
- AcpiCpuInfo *cpu, PcGuestInfo *guest_info)
+build_srat(GArray *table_data, GArray *linker, PcGuestInfo *guest_info)
{
AcpiSystemResourceAffinityTable *srat;
AcpiSratProcessorAffinity *core;
@@ -1301,11 +1300,7 @@ build_srat(GArray *table_data, GArray *linker,
core->proximity_lo = curnode;
memset(core->proximity_hi, 0, 3);
core->local_sapic_eid = 0;
- if (test_bit(i, cpu->found_cpus)) {
- core->flags = cpu_to_le32(1);
- } else {
- core->flags = cpu_to_le32(0);
- }
+ core->flags = cpu_to_le32(1);
}
@@ -1623,7 +1618,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
}
if (guest_info->numa_nodes) {
acpi_add_table(table_offsets, tables->table_data);
- build_srat(tables->table_data, tables->linker, &cpu, guest_info);
+ build_srat(tables->table_data, tables->linker, guest_info);
}
if (acpi_get_mcfg(&mcfg)) {
acpi_add_table(table_offsets, tables->table_data);
--
MST
next prev parent reply other threads:[~2014-11-24 19:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 19:30 [Qemu-devel] [PULL v2 00/15] pc, pci, misc bugfixes Michael S. Tsirkin
2014-11-24 19:30 ` [Qemu-devel] [PULL v2 01/15] qemu-char: fix tcp_get_fds Michael S. Tsirkin
2014-11-24 19:30 ` [Qemu-devel] [PULL v2 02/15] pc: kvm: check if KVM has free memory slots to avoid abort() Michael S. Tsirkin
2014-11-24 19:30 ` [Qemu-devel] [PULL v2 03/15] pc: make pc_dimm_plug() more readble Michael S. Tsirkin
2014-11-24 19:30 ` [Qemu-devel] [PULL v2 04/15] pc: limit DIMM address and size to page aligned values Michael S. Tsirkin
2014-11-24 19:30 ` [Qemu-devel] [PULL v2 05/15] memory: expose alignment used for allocating RAM as MemoryRegion API Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 06/15] pc: align DIMM's address/size by backend's alignment value Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 07/15] pc: pc-dimm: use backend alignment during address auto allocation Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 08/15] pc: explicitly check maxmem limit when adding DIMM Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 09/15] pc: count in 1Gb hugepage alignment when sizing hotplug-memory container Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 10/15] hw/pci: fix crash on shpc error flow Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 11/15] acpi-build: mark RAM dirty on table update Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 12/15] target-i386: move generic memory hotplug methods to DSDTs Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 13/15] pcie: fix typo in pcie_cap_deverr_init() Michael S. Tsirkin
2014-11-24 19:31 ` [Qemu-devel] [PULL v2 14/15] pcie: fix improper use of negative value Michael S. Tsirkin
2014-11-24 19:31 ` Michael S. Tsirkin [this message]
2014-11-25 11:07 ` [Qemu-devel] [PULL v2 00/15] pc, pci, misc bugfixes Peter Maydell
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=1416855830-31740-16-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@amazon.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).