[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 88/88] pc: acpi: mark all possible CPUs as enabled i
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 88/88] pc: acpi: mark all possible CPUs as enabled in SRAT |
Date: |
Thu, 8 Jan 2015 11:34:32 -0600 |
From: Igor Mammedov <address@hidden>
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 <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
(cherry picked from commit dd0247e09a542d2a7ba6e390c70b5616edb9ec56)
Signed-off-by: Michael Roth <address@hidden>
---
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 8609871..5d9f654 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1228,8 +1228,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;
@@ -1259,11 +1258,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);
}
@@ -1539,7 +1534,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);
--
1.9.1
- [Qemu-devel] [PATCH 80/88] qcow2: Fix header extension size check, (continued)
- [Qemu-devel] [PATCH 80/88] qcow2: Fix header extension size check, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 76/88] qcow2: Flushing the caches in qcow2_close may fail, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 84/88] linuxboot: fix loading old kernels, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 83/88] linuxboot: compute initrd loading address, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 82/88] block: Don't probe for unknown backing file format, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 85/88] audio: Don't free hw resources until after hw backend is stopped, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 78/88] block/raw-posix: Fix ret in raw_open_common(), Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 75/88] qcow2: Prevent numerical overflow, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 81/88] qcow2.py: Add required padding for header extensions, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 86/88] target-xtensa: fix translation for opcodes crossing page boundary, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 88/88] pc: acpi: mark all possible CPUs as enabled in SRAT,
Michael Roth <=
- [Qemu-devel] [PATCH 87/88] target-xtensa: test cross-page opcode, Michael Roth, 2015/01/08
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Marcel Apfelbaum, 2015/01/09
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Paolo Bonzini, 2015/01/09
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, William Dauchy, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Marcel Apfelbaum, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Michael Roth, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Paolo Bonzini, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Michael Roth, 2015/01/13
- Re: [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Michael Roth, 2015/01/13
- Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Gonglei (Arei), 2015/01/26