qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35
@ 2013-12-28 22:30 Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 1/9] acpi: factor out common cpu hotplug code for PIIX4/Q35 Igor Mammedov
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

Changes since v1:
  * renamed hotplug.c/.h to  cpu_hotplug.c/.h
  * make all prefixes acpi_cpu_hotplug and AcpiCpuHotplug
  * updated docs/specs/acpi_cpu_hotplug.txt with Q35's IO port range
  * exclude CPU/PCI/GPE IO ranges from resources advertised
    in PCI bus _CRS
  * advertise CPU hotplug IO range using ACPI Device(ACPI0004)._CRS
    object.
  * change Q35 IO port ase from 0xa18 to 0xcd8, to avoid increasing
    fragmentation of PCI bus IO space
  * replaced runtime IO port setting with compile time one, since
    port mapping is hadcoded and there is not real need to set it
    dynamically.
  * Use the same headers for C and ASL code so that port/length
    values won't be duplicated.
  * Fix deps for ACPI tables, so that thay would be rebuild when
    included files are touched. (Added only includes, I've touched,
    it's not complete but a good start anyway)

Tested with RHEL6, WS2012R2, WS2003

Series is based on mst/pci tree, git tree for testing:
https://github.com/imammedo/qemu/commits/q35_cpu_hp_static_v2

Igor Mammedov (9):
  acpi: factor out common cpu hotplug code for PIIX4/Q35
  acpi: ich9: add CPU hotplug handling to Q35 machine
  pc: rebuild ACPI hex files if included *.dsl are touched
  pc: set PRST base in DSDT depending on chipset
  pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus
    resources
  pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources
  pc: ACPI: expose PRST IO range via _CRS
  pc: ACPI: unify source of CPU hotplug IO base/len
  pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated

 docs/specs/acpi_cpu_hotplug.txt     |   4 +-
 hw/acpi/Makefile.objs               |   2 +-
 hw/acpi/cpu_hotplug.c               |  64 +++++++
 hw/acpi/ich9.c                      |  14 ++
 hw/acpi/piix4.c                     |  80 +--------
 hw/i386/Makefile.objs               |  14 +-
 hw/i386/acpi-dsdt-cpu-hotplug.dsl   |  12 +-
 hw/i386/acpi-dsdt-pci-crs.dsl       |  15 +-
 hw/i386/acpi-dsdt.dsl               |  38 +++++
 hw/i386/acpi-dsdt.hex.generated     | 328 +++++++++++++++++++++++++++---------
 hw/i386/q35-acpi-dsdt.dsl           |  17 ++
 hw/i386/q35-acpi-dsdt.hex.generated | 133 ++++++++++++---
 include/hw/acpi/cpu_hotplug.h       |  34 ++++
 include/hw/acpi/ich9.h              |   9 +
 include/hw/acpi/piix4.h             |   5 +
 15 files changed, 578 insertions(+), 191 deletions(-)
 create mode 100644 hw/acpi/cpu_hotplug.c
 create mode 100644 include/hw/acpi/cpu_hotplug.h

-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 1/9] acpi: factor out common cpu hotplug code for PIIX4/Q35
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 2/9] acpi: ich9: add CPU hotplug handling to Q35 machine Igor Mammedov
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

.. so it could be used for adding CPU hotplug to Q35 machine

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/acpi/Makefile.objs         |  2 +-
 hw/acpi/cpu_hotplug.c         | 64 +++++++++++++++++++++++++++++++++++
 hw/acpi/piix4.c               | 77 ++++---------------------------------------
 include/hw/acpi/cpu_hotplug.h | 30 +++++++++++++++++
 4 files changed, 101 insertions(+), 72 deletions(-)
 create mode 100644 hw/acpi/cpu_hotplug.c
 create mode 100644 include/hw/acpi/cpu_hotplug.h

diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs
index 841eca2..397d32b 100644
--- a/hw/acpi/Makefile.objs
+++ b/hw/acpi/Makefile.objs
@@ -1 +1 @@
-common-obj-$(CONFIG_ACPI) += core.o piix4.o ich9.o pcihp.o
+common-obj-$(CONFIG_ACPI) += core.o piix4.o ich9.o pcihp.o cpu_hotplug.o
diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c
new file mode 100644
index 0000000..48928dc
--- /dev/null
+++ b/hw/acpi/cpu_hotplug.c
@@ -0,0 +1,64 @@
+/*
+ * QEMU ACPI hotplug utilities
+ *
+ * Copyright (C) 2013 Red Hat Inc
+ *
+ * Authors:
+ *   Igor Mammedov <imammedo@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include "hw/hw.h"
+#include "hw/acpi/cpu_hotplug.h"
+
+static uint64_t cpu_status_read(void *opaque, hwaddr addr, unsigned int size)
+{
+    AcpiCpuHotplug *cpus = opaque;
+    uint64_t val = cpus->sts[addr];
+
+    return val;
+}
+
+static void cpu_status_write(void *opaque, hwaddr addr, uint64_t data,
+                             unsigned int size)
+{
+    /* TODO: implement VCPU removal on guest signal that CPU can be removed */
+}
+
+static const MemoryRegionOps AcpiCpuHotplug_ops = {
+    .read = cpu_status_read,
+    .write = cpu_status_write,
+    .endianness = DEVICE_LITTLE_ENDIAN,
+    .valid = {
+        .min_access_size = 1,
+        .max_access_size = 1,
+    },
+};
+
+void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu)
+{
+    CPUClass *k = CPU_GET_CLASS(cpu);
+    int64_t cpu_id;
+
+    *gpe->sts = *gpe->sts | ACPI_CPU_HOTPLUG_STATUS;
+    cpu_id = k->get_arch_id(CPU(cpu));
+    g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
+}
+
+void AcpiCpuHotplug_init(MemoryRegion *parent, Object *owner,
+                         AcpiCpuHotplug *gpe_cpu, uint16_t base)
+{
+    CPUState *cpu;
+
+    CPU_FOREACH(cpu) {
+        CPUClass *cc = CPU_GET_CLASS(cpu);
+        int64_t id = cc->get_arch_id(cpu);
+
+        g_assert((id / 8) < ACPI_GPE_PROC_LEN);
+        gpe_cpu->sts[id / 8] |= (1 << (id % 8));
+    }
+    memory_region_init_io(&gpe_cpu->io, owner, &AcpiCpuHotplug_ops,
+                          gpe_cpu, "acpi-cpu-hotplug", ACPI_GPE_PROC_LEN);
+    memory_region_add_subregion(parent, base, &gpe_cpu->io);
+}
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index c42eed1..9b7fe6b 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -31,6 +31,7 @@
 #include "exec/address-spaces.h"
 #include "hw/acpi/piix4.h"
 #include "hw/acpi/pcihp.h"
+#include "hw/acpi/cpu_hotplug.h"
 
 //#define DEBUG
 
@@ -51,20 +52,14 @@
 #define PCI_RMV_BASE 0xae0c
 
 #define PIIX4_PROC_BASE 0xaf00
-#define PIIX4_PROC_LEN 32
 
 #define PIIX4_PCI_HOTPLUG_STATUS 2
-#define PIIX4_CPU_HOTPLUG_STATUS 4
 
 struct pci_status {
     uint32_t up; /* deprecated, maintained for migration compatibility */
     uint32_t down;
 };
 
-typedef struct CPUStatus {
-    uint8_t sts[PIIX4_PROC_LEN];
-} CPUStatus;
-
 typedef struct PIIX4PMState {
     /*< private >*/
     PCIDevice parent_obj;
@@ -74,7 +69,6 @@ typedef struct PIIX4PMState {
     uint32_t io_base;
 
     MemoryRegion io_gpe;
-    MemoryRegion io_cpu;
     ACPIREGS ar;
 
     APMState apm;
@@ -102,7 +96,7 @@ typedef struct PIIX4PMState {
     uint8_t disable_s4;
     uint8_t s4_val;
 
-    CPUStatus gpe_cpu;
+    AcpiCpuHotplug gpe_cpu;
     Notifier cpu_added_notifier;
 } PIIX4PMState;
 
@@ -679,61 +673,13 @@ static const MemoryRegionOps piix4_pci_ops = {
     },
 };
 
-static uint64_t cpu_status_read(void *opaque, hwaddr addr, unsigned int size)
-{
-    PIIX4PMState *s = opaque;
-    CPUStatus *cpus = &s->gpe_cpu;
-    uint64_t val = cpus->sts[addr];
-
-    return val;
-}
-
-static void cpu_status_write(void *opaque, hwaddr addr, uint64_t data,
-                             unsigned int size)
-{
-    /* TODO: implement VCPU removal on guest signal that CPU can be removed */
-}
-
-static const MemoryRegionOps cpu_hotplug_ops = {
-    .read = cpu_status_read,
-    .write = cpu_status_write,
-    .endianness = DEVICE_LITTLE_ENDIAN,
-    .valid = {
-        .min_access_size = 1,
-        .max_access_size = 1,
-    },
-};
-
-typedef enum {
-    PLUG,
-    UNPLUG,
-} HotplugEventType;
-
-static void piix4_cpu_hotplug_req(PIIX4PMState *s, CPUState *cpu,
-                                  HotplugEventType action)
-{
-    CPUStatus *g = &s->gpe_cpu;
-    ACPIGPE *gpe = &s->ar.gpe;
-    CPUClass *k = CPU_GET_CLASS(cpu);
-    int64_t cpu_id;
-
-    assert(s != NULL);
-
-    *gpe->sts = *gpe->sts | PIIX4_CPU_HOTPLUG_STATUS;
-    cpu_id = k->get_arch_id(CPU(cpu));
-    if (action == PLUG) {
-        g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
-    } else {
-        g->sts[cpu_id / 8] &= ~(1 << (cpu_id % 8));
-    }
-    acpi_update_sci(&s->ar, s->irq);
-}
-
 static void piix4_cpu_added_req(Notifier *n, void *opaque)
 {
     PIIX4PMState *s = container_of(n, PIIX4PMState, cpu_added_notifier);
 
-    piix4_cpu_hotplug_req(s, CPU(opaque), PLUG);
+    assert(s != NULL);
+    AcpiCpuHotplug_add(&s->ar.gpe, &s->gpe_cpu, CPU(opaque));
+    acpi_update_sci(&s->ar, s->irq);
 }
 
 static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
@@ -742,8 +688,6 @@ static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
 static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
                                            PCIBus *bus, PIIX4PMState *s)
 {
-    CPUState *cpu;
-
     memory_region_init_io(&s->io_gpe, OBJECT(s), &piix4_gpe_ops, s,
                           "acpi-gpe0", GPE_LEN);
     memory_region_add_subregion(parent, GPE_BASE, &s->io_gpe);
@@ -758,16 +702,7 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
         pci_bus_hotplug(bus, piix4_device_hotplug, DEVICE(s));
     }
 
-    CPU_FOREACH(cpu) {
-        CPUClass *cc = CPU_GET_CLASS(cpu);
-        int64_t id = cc->get_arch_id(cpu);
-
-        g_assert((id / 8) < PIIX4_PROC_LEN);
-        s->gpe_cpu.sts[id / 8] |= (1 << (id % 8));
-    }
-    memory_region_init_io(&s->io_cpu, OBJECT(s), &cpu_hotplug_ops, s,
-                          "acpi-cpu-hotplug", PIIX4_PROC_LEN);
-    memory_region_add_subregion(parent, PIIX4_PROC_BASE, &s->io_cpu);
+    AcpiCpuHotplug_init(parent, OBJECT(s), &s->gpe_cpu, PIIX4_PROC_BASE);
     s->cpu_added_notifier.notify = piix4_cpu_added_req;
     qemu_register_cpu_added_notifier(&s->cpu_added_notifier);
 }
diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h
new file mode 100644
index 0000000..a0a9abc
--- /dev/null
+++ b/include/hw/acpi/cpu_hotplug.h
@@ -0,0 +1,30 @@
+/*
+ * QEMU ACPI hotplug utilities
+ *
+ * Copyright (C) 2013 Red Hat Inc
+ *
+ * Authors:
+ *   Igor Mammedov <imammedo@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef ACPI_HOTPLUG_H
+#define ACPI_HOTPLUG_H
+
+#include "hw/acpi/acpi.h"
+
+#define ACPI_CPU_HOTPLUG_STATUS 4
+
+#define ACPI_GPE_PROC_LEN 32
+
+typedef struct AcpiCpuHotplug {
+    MemoryRegion io;
+    uint8_t sts[ACPI_GPE_PROC_LEN];
+} AcpiCpuHotplug;
+
+void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu);
+
+void AcpiCpuHotplug_init(MemoryRegion *parent, Object *owner,
+                         AcpiCpuHotplug *gpe_cpu, uint16_t base);
+#endif
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 2/9] acpi: ich9: add CPU hotplug handling to Q35 machine
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 1/9] acpi: factor out common cpu hotplug code for PIIX4/Q35 Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 3/9] pc: rebuild ACPI hex files if included *.dsl are touched Igor Mammedov
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

.. use IO port 0xcd8-0xcf7 range for CPU present bitmap

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 docs/specs/acpi_cpu_hotplug.txt |  4 +++-
 hw/acpi/ich9.c                  | 16 ++++++++++++++++
 include/hw/acpi/ich9.h          |  4 ++++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/docs/specs/acpi_cpu_hotplug.txt b/docs/specs/acpi_cpu_hotplug.txt
index f6f5774..340b751 100644
--- a/docs/specs/acpi_cpu_hotplug.txt
+++ b/docs/specs/acpi_cpu_hotplug.txt
@@ -10,7 +10,9 @@ ACPI GPE block (IO ports 0xafe0-0xafe3, byte access):
 Generic ACPI GPE block. Bit 2 (GPE.2) used to notify CPU
 hot-add/remove event to ACPI BIOS, via SCI interrupt.
 
-CPU present bitmap (IO port 0xaf00-0xaf1f, 1-byte access):
+CPU present bitmap for:
+  ICH9-LPC (IO port 0x0cd8-0xcf7, 1-byte access)
+  PIIX-PM  (IO port 0xaf00-0xaf1f, 1-byte access)
 ---------------------------------------------------------------
 One bit per CPU. Bit position reflects corresponding CPU APIC ID.
 Read-only.
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 30f0df8..03dee35 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -44,6 +44,8 @@ do { printf("%s "fmt, __func__, ## __VA_ARGS__); } while (0)
 #define ICH9_DEBUG(fmt, ...)    do { } while (0)
 #endif
 
+#define ICH9_PROC_BASE 0x0CD8
+
 static void ich9_pm_update_sci_fn(ACPIREGS *regs)
 {
     ICH9LPCPMRegs *pm = container_of(regs, ICH9LPCPMRegs, acpi_regs);
@@ -185,6 +187,15 @@ static void pm_powerdown_req(Notifier *n, void *opaque)
     acpi_pm1_evt_power_down(&pm->acpi_regs);
 }
 
+static void ich9_cpu_added_req(Notifier *n, void *opaque)
+{
+    ICH9LPCPMRegs *pm = container_of(n, ICH9LPCPMRegs, cpu_added_notifier);
+
+    assert(pm != NULL);
+    AcpiCpuHotplug_add(&pm->acpi_regs.gpe, &pm->gpe_cpu, CPU(opaque));
+    acpi_update_sci(&pm->acpi_regs, pm->irq);
+}
+
 void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
                   qemu_irq sci_irq)
 {
@@ -210,6 +221,11 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
     qemu_register_reset(pm_reset, pm);
     pm->powerdown_notifier.notify = pm_powerdown_req;
     qemu_register_powerdown_notifier(&pm->powerdown_notifier);
+
+    AcpiCpuHotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci),
+                        &pm->gpe_cpu, ICH9_PROC_BASE);
+    pm->cpu_added_notifier.notify = ich9_cpu_added_req;
+    qemu_register_cpu_added_notifier(&pm->cpu_added_notifier);
 }
 
 static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v,
diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
index 82fcf9f..104f419 100644
--- a/include/hw/acpi/ich9.h
+++ b/include/hw/acpi/ich9.h
@@ -22,6 +22,7 @@
 #define HW_ACPI_ICH9_H
 
 #include "hw/acpi/acpi.h"
+#include "hw/acpi/cpu_hotplug.h"
 
 typedef struct ICH9LPCPMRegs {
     /*
@@ -42,6 +43,9 @@ typedef struct ICH9LPCPMRegs {
 
     uint32_t pm_io_base;
     Notifier powerdown_notifier;
+
+    AcpiCpuHotplug gpe_cpu;
+    Notifier cpu_added_notifier;
 } ICH9LPCPMRegs;
 
 void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 3/9] pc: rebuild ACPI hex files if included *.dsl are touched
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 1/9] acpi: factor out common cpu hotplug code for PIIX4/Q35 Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 2/9] acpi: ich9: add CPU hotplug handling to Q35 machine Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2014-01-08 17:47   ` Michael S. Tsirkin
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 4/9] pc: set PRST base in DSDT depending on chipset Igor Mammedov
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/Makefile.objs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index 09ac433..edf5256 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -16,7 +16,12 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
 
 ifdef IASL
 #IASL Present. Generate hex files from .dsl
-hw/i386/%.hex: $(SRC_PATH)/hw/i386/%.dsl $(SRC_PATH)/scripts/acpi_extract_preprocess.py $(SRC_PATH)/scripts/acpi_extract.py
+DSL_DEPS = $(SRC_PATH)/hw/i386/%.dsl \
+	$(SRC_PATH)/scripts/acpi_extract_preprocess.py \
+	$(SRC_PATH)/scripts/acpi_extract.py \
+	$(SRC_PATH)/hw/i386/acpi-dsdt-*.dsl
+
+hw/i386/%.hex: $(DSL_DEPS)
 	$(call quiet-command, cpp -P $< -o $*.dsl.i.orig, "  CPP $(TARGET_DIR)$*.dsl.i.orig")
 	$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, "  ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i")
 	$(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ,"  IASL $(TARGET_DIR)$*.dsl.i")
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 4/9] pc: set PRST base in DSDT depending on chipset
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
                   ` (2 preceding siblings ...)
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 3/9] pc: rebuild ACPI hex files if included *.dsl are touched Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources Igor Mammedov
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-dsdt-cpu-hotplug.dsl | 2 +-
 hw/i386/acpi-dsdt.dsl             | 1 +
 hw/i386/q35-acpi-dsdt.dsl         | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
index 995b415..1dfbb4f 100644
--- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
+++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
@@ -52,7 +52,7 @@ Scope(\_SB) {
         Sleep(200)
     }
 
-    OperationRegion(PRST, SystemIO, 0xaf00, 32)
+    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, 32)
     Field(PRST, ByteAcc, NoLock, Preserve) {
         PRS, 256
     }
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index 6d76f30..3dc4789 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -290,6 +290,7 @@ DefinitionBlock (
         }
     }
 
+#define CPU_STATUS_BASE 0xaf00
 #include "acpi-dsdt-cpu-hotplug.dsl"
 
 
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index ee38fd6..9a43947 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -405,6 +405,7 @@ DefinitionBlock (
         define_gsi_link(GSIH, 0, 0x17)
     }
 
+#define CPU_STATUS_BASE 0x0CD8
 #include "acpi-dsdt-cpu-hotplug.dsl"
 
 
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
                   ` (3 preceding siblings ...)
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 4/9] pc: set PRST base in DSDT depending on chipset Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2014-01-08 17:00   ` Michael S. Tsirkin
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 6/9] pc: Q35 DSDT: exclude CPU hotplug " Igor Mammedov
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

.. so that they might not be used by PCI devices.

Note:
Resort to concatenating templates with preprocessor help,
because 1.0b spec isn't supporting ConcatenateResTemplate,
as result Windows XP fails to execute PCI0._CRS method if
ConcatenateResTemplate() is used.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
Follow up patch will expose them as motherboard resources
---
 hw/i386/acpi-dsdt-pci-crs.dsl |  8 +-------
 hw/i386/acpi-dsdt.dsl         | 29 +++++++++++++++++++++++++++++
 hw/i386/q35-acpi-dsdt.dsl     |  8 ++++++++
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/hw/i386/acpi-dsdt-pci-crs.dsl b/hw/i386/acpi-dsdt-pci-crs.dsl
index b375a19..8b631d1 100644
--- a/hw/i386/acpi-dsdt-pci-crs.dsl
+++ b/hw/i386/acpi-dsdt-pci-crs.dsl
@@ -37,13 +37,7 @@ Scope(\_SB.PCI0) {
             0x0000,             // Address Translation Offset
             0x0CF8,             // Address Length
             ,, , TypeStatic)
-        WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
-            0x0000,             // Address Space Granularity
-            0x0D00,             // Address Range Minimum
-            0xFFFF,             // Address Range Maximum
-            0x0000,             // Address Translation Offset
-            0xF300,             // Address Length
-            ,, , TypeStatic)
+        BOARD_SPECIFIC_PCI_RESOURSES
         DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
             0x00000000,         // Address Space Granularity
             0x000A0000,         // Address Range Minimum
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index 3dc4789..55b4794 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -35,6 +35,35 @@ DefinitionBlock (
 /****************************************************************
  * PCI Bus definition
  ****************************************************************/
+#define BOARD_SPECIFIC_PCI_RESOURSES \
+     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
+         0x0000, \
+         0x0D00, \
+         0xADFF, \
+         0x0000, \
+         0xA100, \
+         ,, , TypeStatic) \
+     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
+         0x0000, \
+         0xAE14, \
+         0xAEFF, \
+         0x0000, \
+         0x00EC, \
+         ,, , TypeStatic) \
+     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
+         0x0000, \
+         0xAF20, \
+         0xAFDF, \
+         0x0000, \
+         0x00C0, \
+         ,, , TypeStatic) \
+     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
+         0x0000, \
+         0xAFE4, \
+         0xFFFF, \
+         0x0000, \
+         0x501C, \
+         ,, , TypeStatic)
 
     Scope(\_SB) {
         Device(PCI0) {
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index 9a43947..f3e5921 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -48,6 +48,14 @@ DefinitionBlock (
 /****************************************************************
  * PCI Bus definition
  ****************************************************************/
+#define BOARD_SPECIFIC_PCI_RESOURSES \
+     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
+         0x0000, \
+         0x0D00, \
+         0xFFFF, \
+         0x0000, \
+         0xF300, \
+         ,, , TypeStatic)
 
     Scope(\_SB) {
         Device(PCI0) {
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 6/9] pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
                   ` (4 preceding siblings ...)
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 7/9] pc: ACPI: expose PRST IO range via _CRS Igor Mammedov
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-dsdt-pci-crs.dsl | 7 -------
 hw/i386/acpi-dsdt.dsl         | 7 +++++++
 hw/i386/q35-acpi-dsdt.dsl     | 7 +++++++
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/hw/i386/acpi-dsdt-pci-crs.dsl b/hw/i386/acpi-dsdt-pci-crs.dsl
index 8b631d1..4648e90 100644
--- a/hw/i386/acpi-dsdt-pci-crs.dsl
+++ b/hw/i386/acpi-dsdt-pci-crs.dsl
@@ -30,13 +30,6 @@ Scope(\_SB.PCI0) {
             0x01,               // Address Alignment
             0x08,               // Address Length
             )
-        WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
-            0x0000,             // Address Space Granularity
-            0x0000,             // Address Range Minimum
-            0x0CF7,             // Address Range Maximum
-            0x0000,             // Address Translation Offset
-            0x0CF8,             // Address Length
-            ,, , TypeStatic)
         BOARD_SPECIFIC_PCI_RESOURSES
         DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
             0x00000000,         // Address Space Granularity
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index 55b4794..f00b6ca 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -38,6 +38,13 @@ DefinitionBlock (
 #define BOARD_SPECIFIC_PCI_RESOURSES \
      WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
          0x0000, \
+         0x0000, \
+         0x0CF7, \
+         0x0000, \
+         0x0CF8, \
+         ,, , TypeStatic) \
+     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
+         0x0000, \
          0x0D00, \
          0xADFF, \
          0x0000, \
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index f3e5921..9466714 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -51,6 +51,13 @@ DefinitionBlock (
 #define BOARD_SPECIFIC_PCI_RESOURSES \
      WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
          0x0000, \
+         0x0000, \
+         0x0CD7, \
+         0x0000, \
+         0x0CD8, \
+         ,, , TypeStatic) \
+     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
+         0x0000, \
          0x0D00, \
          0xFFFF, \
          0x0000, \
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 7/9] pc: ACPI: expose PRST IO range via _CRS
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
                   ` (5 preceding siblings ...)
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 6/9] pc: Q35 DSDT: exclude CPU hotplug " Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2014-01-08 16:50   ` Michael S. Tsirkin
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 8/9] pc: ACPI: unify source of CPU hotplug IO base/len Igor Mammedov
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

.. so OSPM could notice resource conflict if there is any.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-dsdt-cpu-hotplug.dsl | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
index 1dfbb4f..869aa00 100644
--- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
+++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
@@ -52,7 +52,8 @@ Scope(\_SB) {
         Sleep(200)
     }
 
-    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, 32)
+#define CPU_STATUS_LEN 32
+    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, CPU_STATUS_LEN)
     Field(PRST, ByteAcc, NoLock, Preserve) {
         PRS, 256
     }
@@ -89,4 +90,12 @@ Scope(\_SB) {
             Increment(Local0)
         }
     }
+
+    Device(PRES) {
+        Name(_HID, "ACPI0004")
+
+        Name(_CRS, ResourceTemplate() {
+            IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)
+        })
+    }
 }
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 8/9] pc: ACPI: unify source of CPU hotplug IO base/len
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
                   ` (6 preceding siblings ...)
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 7/9] pc: ACPI: expose PRST IO range via _CRS Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2014-01-08 17:06   ` Michael S. Tsirkin
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 9/9] pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated Igor Mammedov
  2014-01-08 17:47 ` [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Michael S. Tsirkin
  9 siblings, 1 reply; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

use C headers defines as source of IO base/len for respective
values in ASL code.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/acpi/ich9.c                    | 4 +---
 hw/acpi/piix4.c                   | 5 ++---
 hw/i386/Makefile.objs             | 9 +++++++--
 hw/i386/acpi-dsdt-cpu-hotplug.dsl | 7 ++++---
 hw/i386/acpi-dsdt.dsl             | 3 ++-
 hw/i386/q35-acpi-dsdt.dsl         | 3 ++-
 include/hw/acpi/cpu_hotplug.h     | 6 +++++-
 include/hw/acpi/ich9.h            | 5 +++++
 include/hw/acpi/piix4.h           | 5 +++++
 9 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 03dee35..0afac42 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -44,8 +44,6 @@ do { printf("%s "fmt, __func__, ## __VA_ARGS__); } while (0)
 #define ICH9_DEBUG(fmt, ...)    do { } while (0)
 #endif
 
-#define ICH9_PROC_BASE 0x0CD8
-
 static void ich9_pm_update_sci_fn(ACPIREGS *regs)
 {
     ICH9LPCPMRegs *pm = container_of(regs, ICH9LPCPMRegs, acpi_regs);
@@ -223,7 +221,7 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
     qemu_register_powerdown_notifier(&pm->powerdown_notifier);
 
     AcpiCpuHotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci),
-                        &pm->gpe_cpu, ICH9_PROC_BASE);
+                        &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE);
     pm->cpu_added_notifier.notify = ich9_cpu_added_req;
     qemu_register_cpu_added_notifier(&pm->cpu_added_notifier);
 }
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 9b7fe6b..4161d06 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -51,8 +51,6 @@
 #define PCI_EJ_BASE 0xae08
 #define PCI_RMV_BASE 0xae0c
 
-#define PIIX4_PROC_BASE 0xaf00
-
 #define PIIX4_PCI_HOTPLUG_STATUS 2
 
 struct pci_status {
@@ -702,7 +700,8 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
         pci_bus_hotplug(bus, piix4_device_hotplug, DEVICE(s));
     }
 
-    AcpiCpuHotplug_init(parent, OBJECT(s), &s->gpe_cpu, PIIX4_PROC_BASE);
+    AcpiCpuHotplug_init(parent, OBJECT(s), &s->gpe_cpu,
+                        PIIX4_CPU_HOTPLUG_IO_BASE);
     s->cpu_added_notifier.notify = piix4_cpu_added_req;
     qemu_register_cpu_added_notifier(&s->cpu_added_notifier);
 }
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index edf5256..e9c49d5 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -19,10 +19,15 @@ ifdef IASL
 DSL_DEPS = $(SRC_PATH)/hw/i386/%.dsl \
 	$(SRC_PATH)/scripts/acpi_extract_preprocess.py \
 	$(SRC_PATH)/scripts/acpi_extract.py \
-	$(SRC_PATH)/hw/i386/acpi-dsdt-*.dsl
+	$(SRC_PATH)/hw/i386/acpi-dsdt-*.dsl \
+	$(SRC_PATH)/include/hw/acpi/ich9.h \
+	$(SRC_PATH)/include/hw/acpi/piix4.h \
+	$(SRC_PATH)/include/hw/acpi/cpu_hotplug.h
+
+ASL_FLAGS = $(QEMU_CFLAGS) -DACPI_ASL
 
 hw/i386/%.hex: $(DSL_DEPS)
-	$(call quiet-command, cpp -P $< -o $*.dsl.i.orig, "  CPP $(TARGET_DIR)$*.dsl.i.orig")
+	$(call quiet-command, cpp $(ASL_FLAGS) -P $< -o $*.dsl.i.orig, "  CPP $(TARGET_DIR)$*.dsl.i.orig")
 	$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, "  ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i")
 	$(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ,"  IASL $(TARGET_DIR)$*.dsl.i")
 	$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract.py $*.lst > $*.off, "  ACPI_EXTRACT $(TARGET_DIR)$*.off")
diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
index 869aa00..942b119 100644
--- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
+++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
@@ -17,6 +17,8 @@
  * CPU hotplug
  ****************************************************************/
 
+#include "hw/acpi/cpu_hotplug.h"
+
 Scope(\_SB) {
     /* Objects filled in by run-time generated SSDT */
     External(NTFY, MethodObj)
@@ -52,8 +54,7 @@ Scope(\_SB) {
         Sleep(200)
     }
 
-#define CPU_STATUS_LEN 32
-    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, CPU_STATUS_LEN)
+    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, ACPI_GPE_PROC_LEN)
     Field(PRST, ByteAcc, NoLock, Preserve) {
         PRS, 256
     }
@@ -95,7 +96,7 @@ Scope(\_SB) {
         Name(_HID, "ACPI0004")
 
         Name(_CRS, ResourceTemplate() {
-            IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)
+            IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, ACPI_GPE_PROC_LEN)
         })
     }
 }
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index f00b6ca..d98b019 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -326,7 +326,8 @@ DefinitionBlock (
         }
     }
 
-#define CPU_STATUS_BASE 0xaf00
+#include "hw/acpi/piix4.h"
+#define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE
 #include "acpi-dsdt-cpu-hotplug.dsl"
 
 
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index 9466714..ae74427 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -420,7 +420,8 @@ DefinitionBlock (
         define_gsi_link(GSIH, 0, 0x17)
     }
 
-#define CPU_STATUS_BASE 0x0CD8
+#include "hw/acpi/ich9.h"
+#define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE
 #include "acpi-dsdt-cpu-hotplug.dsl"
 
 
diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h
index a0a9abc..00c0866 100644
--- a/include/hw/acpi/cpu_hotplug.h
+++ b/include/hw/acpi/cpu_hotplug.h
@@ -12,11 +12,14 @@
 #ifndef ACPI_HOTPLUG_H
 #define ACPI_HOTPLUG_H
 
+#define ACPI_GPE_PROC_LEN 32
+
+#ifndef ACPI_ASL
+
 #include "hw/acpi/acpi.h"
 
 #define ACPI_CPU_HOTPLUG_STATUS 4
 
-#define ACPI_GPE_PROC_LEN 32
 
 typedef struct AcpiCpuHotplug {
     MemoryRegion io;
@@ -27,4 +30,5 @@ void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu);
 
 void AcpiCpuHotplug_init(MemoryRegion *parent, Object *owner,
                          AcpiCpuHotplug *gpe_cpu, uint16_t base);
+#endif /* !ACPI_ASL */
 #endif
diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
index 104f419..47baa92 100644
--- a/include/hw/acpi/ich9.h
+++ b/include/hw/acpi/ich9.h
@@ -21,6 +21,10 @@
 #ifndef HW_ACPI_ICH9_H
 #define HW_ACPI_ICH9_H
 
+#define ICH9_CPU_HOTPLUG_IO_BASE 0x0CD8
+
+#ifndef ACPI_ASL
+
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/cpu_hotplug.h"
 
@@ -55,4 +59,5 @@ extern const VMStateDescription vmstate_ich9_pm;
 
 void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp);
 
+#endif /* !ACPI_ASL */
 #endif /* HW_ACPI_ICH9_H */
diff --git a/include/hw/acpi/piix4.h b/include/hw/acpi/piix4.h
index 65e6fd7..8606375 100644
--- a/include/hw/acpi/piix4.h
+++ b/include/hw/acpi/piix4.h
@@ -1,8 +1,13 @@
 #ifndef HW_ACPI_PIIX4_H
 #define HW_ACPI_PIIX4_H
 
+#define PIIX4_CPU_HOTPLUG_IO_BASE 0xaf00
+
+#ifndef ACPI_ASL
+
 #include "qemu/typedefs.h"
 
 Object *piix4_pm_find(void);
 
+#endif /* !ACPI_ASL */
 #endif
-- 
1.8.4.2

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

* [Qemu-devel] [PATCH 9/9] pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
                   ` (7 preceding siblings ...)
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 8/9] pc: ACPI: unify source of CPU hotplug IO base/len Igor Mammedov
@ 2013-12-28 22:30 ` Igor Mammedov
  2014-01-08 17:47 ` [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Michael S. Tsirkin
  9 siblings, 0 replies; 19+ messages in thread
From: Igor Mammedov @ 2013-12-28 22:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, kraxel, anthony.perard, lersek,
	afaerber

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-dsdt.hex.generated     | 328 +++++++++++++++++++++++++++---------
 hw/i386/q35-acpi-dsdt.hex.generated | 133 ++++++++++++---
 2 files changed, 362 insertions(+), 99 deletions(-)

diff --git a/hw/i386/acpi-dsdt.hex.generated b/hw/i386/acpi-dsdt.hex.generated
index f8bd4ea..09369d1 100644
--- a/hw/i386/acpi-dsdt.hex.generated
+++ b/hw/i386/acpi-dsdt.hex.generated
@@ -3,12 +3,12 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x53,
 0x44,
 0x54,
-0x37,
+0xe0,
 0x11,
 0x0,
 0x0,
 0x1,
-0xd8,
+0xba,
 0x42,
 0x58,
 0x50,
@@ -31,8 +31,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x4e,
 0x54,
 0x4c,
-0x23,
-0x8,
+0x15,
+0x11,
 0x13,
 0x20,
 0x10,
@@ -146,7 +146,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x1,
 0x10,
 0x4e,
-0x15,
+0x18,
 0x2e,
 0x5f,
 0x53,
@@ -163,9 +163,9 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x53,
 0x11,
 0x42,
-0x7,
 0xa,
-0x6e,
+0xa,
+0x9e,
 0x88,
 0xd,
 0x0,
@@ -217,11 +217,59 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x0,
 0xd,
 0xff,
+0xad,
+0x0,
+0x0,
+0x0,
+0xa1,
+0x88,
+0xd,
+0x0,
+0x1,
+0xc,
+0x3,
+0x0,
+0x0,
+0x14,
+0xae,
 0xff,
+0xae,
+0x0,
+0x0,
+0xec,
+0x0,
+0x88,
+0xd,
 0x0,
+0x1,
+0xc,
+0x3,
+0x0,
+0x0,
+0x20,
+0xaf,
+0xdf,
+0xaf,
 0x0,
 0x0,
-0xf3,
+0xc0,
+0x0,
+0x88,
+0xd,
+0x0,
+0x1,
+0xc,
+0x3,
+0x0,
+0x0,
+0xe4,
+0xaf,
+0xff,
+0xff,
+0x0,
+0x0,
+0x1c,
+0x50,
 0x87,
 0x17,
 0x0,
@@ -347,7 +395,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x45,
 0x53,
 0xa,
-0x5c,
+0x8c,
 0x50,
 0x53,
 0x33,
@@ -358,7 +406,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x45,
 0x53,
 0xa,
-0x60,
+0x90,
 0x50,
 0x45,
 0x33,
@@ -369,7 +417,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x45,
 0x53,
 0xa,
-0x68,
+0x98,
 0x50,
 0x4c,
 0x33,
@@ -860,8 +908,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x4e,
 0x1,
 0x10,
-0x4c,
-0x1b,
+0x4b,
+0x1e,
 0x2f,
 0x3,
 0x5f,
@@ -879,6 +927,53 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x5b,
 0x82,
 0x2d,
+0x53,
+0x4d,
+0x43,
+0x5f,
+0x8,
+0x5f,
+0x48,
+0x49,
+0x44,
+0xc,
+0x6,
+0x10,
+0x0,
+0x1,
+0x8,
+0x5f,
+0x53,
+0x54,
+0x41,
+0xb,
+0x0,
+0xff,
+0x8,
+0x5f,
+0x43,
+0x52,
+0x53,
+0x11,
+0x10,
+0xa,
+0xd,
+0x47,
+0x1,
+0x0,
+0x3,
+0x0,
+0x3,
+0x1,
+0x20,
+0x22,
+0x40,
+0x0,
+0x79,
+0x0,
+0x5b,
+0x82,
+0x2d,
 0x52,
 0x54,
 0x43,
@@ -1305,7 +1400,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x79,
 0x0,
 0x10,
-0x4b,
+0x48,
 0x8,
 0x2e,
 0x5f,
@@ -1371,79 +1466,76 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x45,
 0x4a,
 0x20,
+0x5b,
+0x80,
+0x42,
+0x4e,
+0x4d,
+0x52,
+0x1,
+0xb,
+0x10,
+0xae,
+0xa,
+0x4,
+0x5b,
+0x81,
+0xb,
+0x42,
+0x4e,
+0x4d,
+0x52,
+0x43,
+0x42,
+0x4e,
+0x55,
+0x4d,
+0x20,
+0x5b,
+0x1,
+0x42,
+0x4c,
+0x43,
+0x4b,
+0x0,
 0x14,
-0x11,
+0x25,
 0x50,
 0x43,
 0x45,
 0x4a,
-0x1,
+0x2,
+0x5b,
+0x23,
+0x42,
+0x4c,
+0x43,
+0x4b,
+0xff,
+0xff,
 0x70,
-0x79,
-0x1,
 0x68,
-0x0,
 0x42,
-0x30,
-0x45,
-0x4a,
-0xa4,
-0x0,
-0x14,
-0x36,
-0x50,
-0x43,
 0x4e,
-0x46,
-0x0,
-0x70,
-0x0,
-0x60,
-0xa2,
-0x2c,
-0x95,
-0x60,
-0xa,
-0x1f,
-0x75,
-0x60,
-0xa0,
-0x11,
-0x7b,
-0x50,
-0x43,
-0x49,
 0x55,
+0x4d,
+0x70,
 0x79,
 0x1,
-0x60,
+0x69,
 0x0,
-0x0,
-0x50,
-0x43,
-0x4e,
-0x54,
-0x60,
-0x1,
-0xa0,
-0x12,
-0x7b,
-0x50,
+0x42,
+0x30,
+0x45,
+0x4a,
+0x5b,
+0x27,
+0x42,
+0x4c,
 0x43,
-0x49,
-0x44,
-0x79,
-0x1,
-0x60,
-0x0,
+0x4b,
+0xa4,
 0x0,
-0x50,
-0x43,
-0x4e,
-0x54,
-0x60,
-0xa,
-0x3,
 0x10,
 0x4a,
 0xa0,
@@ -4016,8 +4108,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x53,
 0x1,
 0x10,
-0x47,
-0xe,
+0x40,
+0x11,
 0x5f,
 0x53,
 0x42,
@@ -4247,9 +4339,50 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x3,
 0x75,
 0x60,
+0x5b,
+0x82,
+0x27,
+0x50,
+0x52,
+0x45,
+0x53,
+0x8,
+0x5f,
+0x48,
+0x49,
+0x44,
+0xd,
+0x41,
+0x43,
+0x50,
+0x49,
+0x30,
+0x30,
+0x30,
+0x34,
+0x0,
+0x8,
+0x5f,
+0x43,
+0x52,
+0x53,
+0x11,
+0xd,
+0xa,
+0xa,
+0x47,
+0x1,
+0x0,
+0xaf,
+0x0,
+0xaf,
+0x0,
+0x20,
+0x79,
+0x0,
 0x10,
-0x4e,
-0x9,
+0x42,
+0xc,
 0x5f,
 0x47,
 0x50,
@@ -4277,12 +4410,31 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x30,
 0x0,
 0x14,
-0x15,
+0x39,
 0x5f,
 0x45,
 0x30,
 0x31,
 0x0,
+0x5b,
+0x23,
+0x5c,
+0x2f,
+0x3,
+0x5f,
+0x53,
+0x42,
+0x5f,
+0x50,
+0x43,
+0x49,
+0x30,
+0x42,
+0x4c,
+0x43,
+0x4b,
+0xff,
+0xff,
 0x5c,
 0x2f,
 0x3,
@@ -4297,7 +4449,24 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x50,
 0x43,
 0x4e,
-0x46,
+0x54,
+0x5b,
+0x27,
+0x5c,
+0x2f,
+0x3,
+0x5f,
+0x53,
+0x42,
+0x5f,
+0x50,
+0x43,
+0x49,
+0x30,
+0x42,
+0x4c,
+0x43,
+0x4b,
 0x14,
 0x10,
 0x5f,
@@ -4407,3 +4576,6 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x46,
 0x0
 };
+static unsigned short piix_dsdt_applesmc_sta[] = {
+0x3b4
+};
diff --git a/hw/i386/q35-acpi-dsdt.hex.generated b/hw/i386/q35-acpi-dsdt.hex.generated
index 111ad3e..701a260 100644
--- a/hw/i386/q35-acpi-dsdt.hex.generated
+++ b/hw/i386/q35-acpi-dsdt.hex.generated
@@ -3,12 +3,12 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x53,
 0x44,
 0x54,
-0xb0,
-0x1c,
+0x8,
+0x1d,
 0x0,
 0x0,
 0x1,
-0xfe,
+0x57,
 0x42,
 0x58,
 0x50,
@@ -31,8 +31,8 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x4e,
 0x54,
 0x4c,
-0x23,
-0x8,
+0x15,
+0x11,
 0x13,
 0x20,
 0x10,
@@ -415,11 +415,11 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x0,
 0x0,
 0x0,
-0xf7,
+0xd7,
 0xc,
 0x0,
 0x0,
-0xf8,
+0xd8,
 0xc,
 0x88,
 0xd,
@@ -1033,8 +1033,8 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x4e,
 0x1,
 0x10,
-0x4c,
-0x1b,
+0x4b,
+0x1e,
 0x2f,
 0x3,
 0x5f,
@@ -1052,6 +1052,53 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x5b,
 0x82,
 0x2d,
+0x53,
+0x4d,
+0x43,
+0x5f,
+0x8,
+0x5f,
+0x48,
+0x49,
+0x44,
+0xc,
+0x6,
+0x10,
+0x0,
+0x1,
+0x8,
+0x5f,
+0x53,
+0x54,
+0x41,
+0xb,
+0x0,
+0xff,
+0x8,
+0x5f,
+0x43,
+0x52,
+0x53,
+0x11,
+0x10,
+0xa,
+0xd,
+0x47,
+0x1,
+0x0,
+0x3,
+0x0,
+0x3,
+0x1,
+0x20,
+0x22,
+0x40,
+0x0,
+0x79,
+0x0,
+0x5b,
+0x82,
+0x2d,
 0x52,
 0x54,
 0x43,
@@ -6968,8 +7015,8 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x53,
 0x1,
 0x10,
-0x47,
-0xe,
+0x40,
+0x11,
 0x5f,
 0x53,
 0x42,
@@ -7074,8 +7121,8 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x54,
 0x1,
 0xb,
-0x0,
-0xaf,
+0xd8,
+0xc,
 0xa,
 0x20,
 0x5b,
@@ -7199,6 +7246,47 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x3,
 0x75,
 0x60,
+0x5b,
+0x82,
+0x27,
+0x50,
+0x52,
+0x45,
+0x53,
+0x8,
+0x5f,
+0x48,
+0x49,
+0x44,
+0xd,
+0x41,
+0x43,
+0x50,
+0x49,
+0x30,
+0x30,
+0x30,
+0x34,
+0x0,
+0x8,
+0x5f,
+0x43,
+0x52,
+0x53,
+0x11,
+0xd,
+0xa,
+0xa,
+0x47,
+0x1,
+0xd8,
+0xc,
+0xd8,
+0xc,
+0x0,
+0x20,
+0x79,
+0x0,
 0x10,
 0x4f,
 0x8,
@@ -7229,12 +7317,19 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x30,
 0x0,
 0x14,
-0x10,
+0x6,
 0x5f,
 0x4c,
 0x30,
 0x31,
 0x0,
+0x14,
+0x10,
+0x5f,
+0x45,
+0x30,
+0x32,
+0x0,
 0x5c,
 0x2e,
 0x5f,
@@ -7250,13 +7345,6 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x5f,
 0x4c,
 0x30,
-0x32,
-0x0,
-0x14,
-0x6,
-0x5f,
-0x4c,
-0x30,
 0x33,
 0x0,
 0x14,
@@ -7344,3 +7432,6 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x46,
 0x0
 };
+static unsigned short q35_dsdt_applesmc_sta[] = {
+0x431
+};
-- 
1.8.4.2

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

* Re: [Qemu-devel] [PATCH 7/9] pc: ACPI: expose PRST IO range via _CRS
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 7/9] pc: ACPI: expose PRST IO range via _CRS Igor Mammedov
@ 2014-01-08 16:50   ` Michael S. Tsirkin
  0 siblings, 0 replies; 19+ messages in thread
From: Michael S. Tsirkin @ 2014-01-08 16:50 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Sat, Dec 28, 2013 at 11:30:50PM +0100, Igor Mammedov wrote:
> .. so OSPM could notice resource conflict if there is any.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  hw/i386/acpi-dsdt-cpu-hotplug.dsl | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> index 1dfbb4f..869aa00 100644
> --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> @@ -52,7 +52,8 @@ Scope(\_SB) {
>          Sleep(200)
>      }
>  
> -    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, 32)
> +#define CPU_STATUS_LEN 32
> +    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, CPU_STATUS_LEN)
>      Field(PRST, ByteAcc, NoLock, Preserve) {
>          PRS, 256
>      }
> @@ -89,4 +90,12 @@ Scope(\_SB) {
>              Increment(Local0)
>          }
>      }
> +
> +    Device(PRES) {

How about 

#define CPU_HOTPLUG_RESOURCE_DEVICE PRES
or something?

> +        Name(_HID, "ACPI0004")

Does this need to be marked as hidden with _STA?

> +
> +        Name(_CRS, ResourceTemplate() {
> +            IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)
> +        })
> +    }
>  }
> -- 
> 1.8.4.2

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

* Re: [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources Igor Mammedov
@ 2014-01-08 17:00   ` Michael S. Tsirkin
  2014-01-09 10:34     ` Igor Mammedov
  0 siblings, 1 reply; 19+ messages in thread
From: Michael S. Tsirkin @ 2014-01-08 17:00 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Sat, Dec 28, 2013 at 11:30:48PM +0100, Igor Mammedov wrote:
> .. so that they might not be used by PCI devices.
> 
> Note:
> Resort to concatenating templates with preprocessor help,
> because 1.0b spec isn't supporting ConcatenateResTemplate,
> as result Windows XP fails to execute PCI0._CRS method if
> ConcatenateResTemplate() is used.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

Interesting. Could be worth getting rid of ConcatenateResTemplate in other places
too so XP works on more systems ...

> ---
> Follow up patch will expose them as motherboard resources
> ---
>  hw/i386/acpi-dsdt-pci-crs.dsl |  8 +-------
>  hw/i386/acpi-dsdt.dsl         | 29 +++++++++++++++++++++++++++++
>  hw/i386/q35-acpi-dsdt.dsl     |  8 ++++++++
>  3 files changed, 38 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/i386/acpi-dsdt-pci-crs.dsl b/hw/i386/acpi-dsdt-pci-crs.dsl
> index b375a19..8b631d1 100644
> --- a/hw/i386/acpi-dsdt-pci-crs.dsl
> +++ b/hw/i386/acpi-dsdt-pci-crs.dsl
> @@ -37,13 +37,7 @@ Scope(\_SB.PCI0) {
>              0x0000,             // Address Translation Offset
>              0x0CF8,             // Address Length
>              ,, , TypeStatic)
> -        WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
> -            0x0000,             // Address Space Granularity
> -            0x0D00,             // Address Range Minimum
> -            0xFFFF,             // Address Range Maximum
> -            0x0000,             // Address Translation Offset
> -            0xF300,             // Address Length
> -            ,, , TypeStatic)
> +        BOARD_SPECIFIC_PCI_RESOURSES
>          DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
>              0x00000000,         // Address Space Granularity
>              0x000A0000,         // Address Range Minimum
> diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
> index 3dc4789..55b4794 100644
> --- a/hw/i386/acpi-dsdt.dsl
> +++ b/hw/i386/acpi-dsdt.dsl
> @@ -35,6 +35,35 @@ DefinitionBlock (
>  /****************************************************************
>   * PCI Bus definition
>   ****************************************************************/
> +#define BOARD_SPECIFIC_PCI_RESOURSES \
> +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> +         0x0000, \
> +         0x0D00, \
> +         0xADFF, \
> +         0x0000, \
> +         0xA100, \
> +         ,, , TypeStatic) \
> +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> +         0x0000, \
> +         0xAE14, \
> +         0xAEFF, \
> +         0x0000, \
> +         0x00EC, \
> +         ,, , TypeStatic) \
> +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> +         0x0000, \
> +         0xAF20, \
> +         0xAFDF, \
> +         0x0000, \
> +         0x00C0, \
> +         ,, , TypeStatic) \
> +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> +         0x0000, \
> +         0xAFE4, \
> +         0xFFFF, \
> +         0x0000, \
> +         0x501C, \
> +         ,, , TypeStatic)
>  
>      Scope(\_SB) {
>          Device(PCI0) {

Could you add some comments here to document where
does each number comes from please?
E.g. /* PIIX4_PROC_BASE + 0x100 */ or something.

Ideally we'd generate this based on defines used
by host, but that does not have to block merging
this patch.

> diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
> index 9a43947..f3e5921 100644
> --- a/hw/i386/q35-acpi-dsdt.dsl
> +++ b/hw/i386/q35-acpi-dsdt.dsl
> @@ -48,6 +48,14 @@ DefinitionBlock (
>  /****************************************************************
>   * PCI Bus definition
>   ****************************************************************/
> +#define BOARD_SPECIFIC_PCI_RESOURSES \
> +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> +         0x0000, \
> +         0x0D00, \
> +         0xFFFF, \
> +         0x0000, \
> +         0xF300, \
> +         ,, , TypeStatic)
>  
>      Scope(\_SB) {
>          Device(PCI0) {
> -- 
> 1.8.4.2

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

* Re: [Qemu-devel] [PATCH 8/9] pc: ACPI: unify source of CPU hotplug IO base/len
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 8/9] pc: ACPI: unify source of CPU hotplug IO base/len Igor Mammedov
@ 2014-01-08 17:06   ` Michael S. Tsirkin
  0 siblings, 0 replies; 19+ messages in thread
From: Michael S. Tsirkin @ 2014-01-08 17:06 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Sat, Dec 28, 2013 at 11:30:51PM +0100, Igor Mammedov wrote:
> use C headers defines as source of IO base/len for respective
> values in ASL code.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

That's cool.

It's a bit confusing that you add macro in one patch, then
drop it in another.
Could you reorder patches?
Add define and use it in host first, then use it directly.

It's not critical, nice to have.

> ---
>  hw/acpi/ich9.c                    | 4 +---
>  hw/acpi/piix4.c                   | 5 ++---
>  hw/i386/Makefile.objs             | 9 +++++++--
>  hw/i386/acpi-dsdt-cpu-hotplug.dsl | 7 ++++---
>  hw/i386/acpi-dsdt.dsl             | 3 ++-
>  hw/i386/q35-acpi-dsdt.dsl         | 3 ++-
>  include/hw/acpi/cpu_hotplug.h     | 6 +++++-
>  include/hw/acpi/ich9.h            | 5 +++++
>  include/hw/acpi/piix4.h           | 5 +++++
>  9 files changed, 33 insertions(+), 14 deletions(-)
> 
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index 03dee35..0afac42 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -44,8 +44,6 @@ do { printf("%s "fmt, __func__, ## __VA_ARGS__); } while (0)
>  #define ICH9_DEBUG(fmt, ...)    do { } while (0)
>  #endif
>  
> -#define ICH9_PROC_BASE 0x0CD8
> -
>  static void ich9_pm_update_sci_fn(ACPIREGS *regs)
>  {
>      ICH9LPCPMRegs *pm = container_of(regs, ICH9LPCPMRegs, acpi_regs);
> @@ -223,7 +221,7 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
>      qemu_register_powerdown_notifier(&pm->powerdown_notifier);
>  
>      AcpiCpuHotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci),
> -                        &pm->gpe_cpu, ICH9_PROC_BASE);
> +                        &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE);
>      pm->cpu_added_notifier.notify = ich9_cpu_added_req;
>      qemu_register_cpu_added_notifier(&pm->cpu_added_notifier);
>  }
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index 9b7fe6b..4161d06 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -51,8 +51,6 @@
>  #define PCI_EJ_BASE 0xae08
>  #define PCI_RMV_BASE 0xae0c
>  
> -#define PIIX4_PROC_BASE 0xaf00
> -
>  #define PIIX4_PCI_HOTPLUG_STATUS 2
>  
>  struct pci_status {
> @@ -702,7 +700,8 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
>          pci_bus_hotplug(bus, piix4_device_hotplug, DEVICE(s));
>      }
>  
> -    AcpiCpuHotplug_init(parent, OBJECT(s), &s->gpe_cpu, PIIX4_PROC_BASE);
> +    AcpiCpuHotplug_init(parent, OBJECT(s), &s->gpe_cpu,
> +                        PIIX4_CPU_HOTPLUG_IO_BASE);
>      s->cpu_added_notifier.notify = piix4_cpu_added_req;
>      qemu_register_cpu_added_notifier(&s->cpu_added_notifier);
>  }
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index edf5256..e9c49d5 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -19,10 +19,15 @@ ifdef IASL
>  DSL_DEPS = $(SRC_PATH)/hw/i386/%.dsl \
>  	$(SRC_PATH)/scripts/acpi_extract_preprocess.py \
>  	$(SRC_PATH)/scripts/acpi_extract.py \
> -	$(SRC_PATH)/hw/i386/acpi-dsdt-*.dsl
> +	$(SRC_PATH)/hw/i386/acpi-dsdt-*.dsl \
> +	$(SRC_PATH)/include/hw/acpi/ich9.h \
> +	$(SRC_PATH)/include/hw/acpi/piix4.h \
> +	$(SRC_PATH)/include/hw/acpi/cpu_hotplug.h
> +
> +ASL_FLAGS = $(QEMU_CFLAGS) -DACPI_ASL
>  
>  hw/i386/%.hex: $(DSL_DEPS)
> -	$(call quiet-command, cpp -P $< -o $*.dsl.i.orig, "  CPP $(TARGET_DIR)$*.dsl.i.orig")
> +	$(call quiet-command, cpp $(ASL_FLAGS) -P $< -o $*.dsl.i.orig, "  CPP $(TARGET_DIR)$*.dsl.i.orig")
>  	$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, "  ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i")
>  	$(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ,"  IASL $(TARGET_DIR)$*.dsl.i")
>  	$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract.py $*.lst > $*.off, "  ACPI_EXTRACT $(TARGET_DIR)$*.off")
> diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> index 869aa00..942b119 100644
> --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> @@ -17,6 +17,8 @@
>   * CPU hotplug
>   ****************************************************************/
>  
> +#include "hw/acpi/cpu_hotplug.h"
> +
>  Scope(\_SB) {
>      /* Objects filled in by run-time generated SSDT */
>      External(NTFY, MethodObj)
> @@ -52,8 +54,7 @@ Scope(\_SB) {
>          Sleep(200)
>      }
>  
> -#define CPU_STATUS_LEN 32
> -    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, CPU_STATUS_LEN)
> +    OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, ACPI_GPE_PROC_LEN)
>      Field(PRST, ByteAcc, NoLock, Preserve) {
>          PRS, 256
>      }
> @@ -95,7 +96,7 @@ Scope(\_SB) {
>          Name(_HID, "ACPI0004")
>  
>          Name(_CRS, ResourceTemplate() {
> -            IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)
> +            IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, ACPI_GPE_PROC_LEN)
>          })
>      }
>  }
> diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
> index f00b6ca..d98b019 100644
> --- a/hw/i386/acpi-dsdt.dsl
> +++ b/hw/i386/acpi-dsdt.dsl
> @@ -326,7 +326,8 @@ DefinitionBlock (
>          }
>      }
>  
> -#define CPU_STATUS_BASE 0xaf00
> +#include "hw/acpi/piix4.h"
> +#define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE
>  #include "acpi-dsdt-cpu-hotplug.dsl"
>  
>  
> diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
> index 9466714..ae74427 100644
> --- a/hw/i386/q35-acpi-dsdt.dsl
> +++ b/hw/i386/q35-acpi-dsdt.dsl
> @@ -420,7 +420,8 @@ DefinitionBlock (
>          define_gsi_link(GSIH, 0, 0x17)
>      }
>  
> -#define CPU_STATUS_BASE 0x0CD8
> +#include "hw/acpi/ich9.h"
> +#define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE
>  #include "acpi-dsdt-cpu-hotplug.dsl"
>  
>  
> diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h
> index a0a9abc..00c0866 100644
> --- a/include/hw/acpi/cpu_hotplug.h
> +++ b/include/hw/acpi/cpu_hotplug.h
> @@ -12,11 +12,14 @@
>  #ifndef ACPI_HOTPLUG_H
>  #define ACPI_HOTPLUG_H
>  
> +#define ACPI_GPE_PROC_LEN 32
> +
> +#ifndef ACPI_ASL

I think you use this to split the header out - things for IASL
and things not for IASL.
Let's not do pre-processor tricks.  Just create a new header for IASL only.
cpu_hotplug_defs.h or something.

Put a comment there that only defines are allowed there.

> +
>  #include "hw/acpi/acpi.h"
>  
>  #define ACPI_CPU_HOTPLUG_STATUS 4
>  
> -#define ACPI_GPE_PROC_LEN 32
>  
>  typedef struct AcpiCpuHotplug {
>      MemoryRegion io;
> @@ -27,4 +30,5 @@ void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu);
>  
>  void AcpiCpuHotplug_init(MemoryRegion *parent, Object *owner,
>                           AcpiCpuHotplug *gpe_cpu, uint16_t base);
> +#endif /* !ACPI_ASL */
>  #endif
> diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
> index 104f419..47baa92 100644
> --- a/include/hw/acpi/ich9.h
> +++ b/include/hw/acpi/ich9.h
> @@ -21,6 +21,10 @@
>  #ifndef HW_ACPI_ICH9_H
>  #define HW_ACPI_ICH9_H
>  
> +#define ICH9_CPU_HOTPLUG_IO_BASE 0x0CD8
> +
> +#ifndef ACPI_ASL
> +
>  #include "hw/acpi/acpi.h"
>  #include "hw/acpi/cpu_hotplug.h"
>  
> @@ -55,4 +59,5 @@ extern const VMStateDescription vmstate_ich9_pm;
>  
>  void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp);
>  
> +#endif /* !ACPI_ASL */
>  #endif /* HW_ACPI_ICH9_H */
> diff --git a/include/hw/acpi/piix4.h b/include/hw/acpi/piix4.h
> index 65e6fd7..8606375 100644
> --- a/include/hw/acpi/piix4.h
> +++ b/include/hw/acpi/piix4.h
> @@ -1,8 +1,13 @@
>  #ifndef HW_ACPI_PIIX4_H
>  #define HW_ACPI_PIIX4_H
>  
> +#define PIIX4_CPU_HOTPLUG_IO_BASE 0xaf00
> +
> +#ifndef ACPI_ASL
> +
>  #include "qemu/typedefs.h"
>  
>  Object *piix4_pm_find(void);
>  
> +#endif /* !ACPI_ASL */
>  #endif
> -- 
> 1.8.4.2

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

* Re: [Qemu-devel] [PATCH 3/9] pc: rebuild ACPI hex files if included *.dsl are touched
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 3/9] pc: rebuild ACPI hex files if included *.dsl are touched Igor Mammedov
@ 2014-01-08 17:47   ` Michael S. Tsirkin
  2014-01-09  9:25     ` Igor Mammedov
  0 siblings, 1 reply; 19+ messages in thread
From: Michael S. Tsirkin @ 2014-01-08 17:47 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Sat, Dec 28, 2013 at 11:30:46PM +0100, Igor Mammedov wrote:
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  hw/i386/Makefile.objs | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index 09ac433..edf5256 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -16,7 +16,12 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
>  
>  ifdef IASL
>  #IASL Present. Generate hex files from .dsl
> -hw/i386/%.hex: $(SRC_PATH)/hw/i386/%.dsl $(SRC_PATH)/scripts/acpi_extract_preprocess.py $(SRC_PATH)/scripts/acpi_extract.py
> +DSL_DEPS = $(SRC_PATH)/hw/i386/%.dsl \
> +	$(SRC_PATH)/scripts/acpi_extract_preprocess.py \
> +	$(SRC_PATH)/scripts/acpi_extract.py \
> +	$(SRC_PATH)/hw/i386/acpi-dsdt-*.dsl
> +
> +hw/i386/%.hex: $(DSL_DEPS)
>  	$(call quiet-command, cpp -P $< -o $*.dsl.i.orig, "  CPP $(TARGET_DIR)$*.dsl.i.orig")
>  	$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, "  ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i")
>  	$(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ,"  IASL $(TARGET_DIR)$*.dsl.i")

It's generally nasty to have rules that generate files already in
the source tree. In partuclar people expect make clean to get
back the original tree.
How about only doing this when some variable is defined?

> -- 
> 1.8.4.2

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

* Re: [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35
  2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
                   ` (8 preceding siblings ...)
  2013-12-28 22:30 ` [Qemu-devel] [PATCH 9/9] pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated Igor Mammedov
@ 2014-01-08 17:47 ` Michael S. Tsirkin
  9 siblings, 0 replies; 19+ messages in thread
From: Michael S. Tsirkin @ 2014-01-08 17:47 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Sat, Dec 28, 2013 at 11:30:43PM +0100, Igor Mammedov wrote:
> Changes since v1:
>   * renamed hotplug.c/.h to  cpu_hotplug.c/.h
>   * make all prefixes acpi_cpu_hotplug and AcpiCpuHotplug
>   * updated docs/specs/acpi_cpu_hotplug.txt with Q35's IO port range
>   * exclude CPU/PCI/GPE IO ranges from resources advertised
>     in PCI bus _CRS
>   * advertise CPU hotplug IO range using ACPI Device(ACPI0004)._CRS
>     object.
>   * change Q35 IO port ase from 0xa18 to 0xcd8, to avoid increasing
>     fragmentation of PCI bus IO space
>   * replaced runtime IO port setting with compile time one, since
>     port mapping is hadcoded and there is not real need to set it
>     dynamically.
>   * Use the same headers for C and ASL code so that port/length
>     values won't be duplicated.
>   * Fix deps for ACPI tables, so that thay would be rebuild when
>     included files are touched. (Added only includes, I've touched,
>     it's not complete but a good start anyway)
> 
> Tested with RHEL6, WS2012R2, WS2003

Sent some minor comments, otherwise looks good, thanks!

> Series is based on mst/pci tree, git tree for testing:
> https://github.com/imammedo/qemu/commits/q35_cpu_hp_static_v2
> 
> Igor Mammedov (9):
>   acpi: factor out common cpu hotplug code for PIIX4/Q35
>   acpi: ich9: add CPU hotplug handling to Q35 machine
>   pc: rebuild ACPI hex files if included *.dsl are touched
>   pc: set PRST base in DSDT depending on chipset
>   pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus
>     resources
>   pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources
>   pc: ACPI: expose PRST IO range via _CRS
>   pc: ACPI: unify source of CPU hotplug IO base/len
>   pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated
> 
>  docs/specs/acpi_cpu_hotplug.txt     |   4 +-
>  hw/acpi/Makefile.objs               |   2 +-
>  hw/acpi/cpu_hotplug.c               |  64 +++++++
>  hw/acpi/ich9.c                      |  14 ++
>  hw/acpi/piix4.c                     |  80 +--------
>  hw/i386/Makefile.objs               |  14 +-
>  hw/i386/acpi-dsdt-cpu-hotplug.dsl   |  12 +-
>  hw/i386/acpi-dsdt-pci-crs.dsl       |  15 +-
>  hw/i386/acpi-dsdt.dsl               |  38 +++++
>  hw/i386/acpi-dsdt.hex.generated     | 328 +++++++++++++++++++++++++++---------
>  hw/i386/q35-acpi-dsdt.dsl           |  17 ++
>  hw/i386/q35-acpi-dsdt.hex.generated | 133 ++++++++++++---
>  include/hw/acpi/cpu_hotplug.h       |  34 ++++
>  include/hw/acpi/ich9.h              |   9 +
>  include/hw/acpi/piix4.h             |   5 +
>  15 files changed, 578 insertions(+), 191 deletions(-)
>  create mode 100644 hw/acpi/cpu_hotplug.c
>  create mode 100644 include/hw/acpi/cpu_hotplug.h
> 
> -- 
> 1.8.4.2

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

* Re: [Qemu-devel] [PATCH 3/9] pc: rebuild ACPI hex files if included *.dsl are touched
  2014-01-08 17:47   ` Michael S. Tsirkin
@ 2014-01-09  9:25     ` Igor Mammedov
  0 siblings, 0 replies; 19+ messages in thread
From: Igor Mammedov @ 2014-01-09  9:25 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Wed, 8 Jan 2014 19:47:03 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Sat, Dec 28, 2013 at 11:30:46PM +0100, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >  hw/i386/Makefile.objs | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> > index 09ac433..edf5256 100644
> > --- a/hw/i386/Makefile.objs
> > +++ b/hw/i386/Makefile.objs
> > @@ -16,7 +16,12 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
> >  
> >  ifdef IASL
> >  #IASL Present. Generate hex files from .dsl
> > -hw/i386/%.hex: $(SRC_PATH)/hw/i386/%.dsl $(SRC_PATH)/scripts/acpi_extract_preprocess.py $(SRC_PATH)/scripts/acpi_extract.py
> > +DSL_DEPS = $(SRC_PATH)/hw/i386/%.dsl \
> > +	$(SRC_PATH)/scripts/acpi_extract_preprocess.py \
> > +	$(SRC_PATH)/scripts/acpi_extract.py \
> > +	$(SRC_PATH)/hw/i386/acpi-dsdt-*.dsl
> > +
> > +hw/i386/%.hex: $(DSL_DEPS)
> >  	$(call quiet-command, cpp -P $< -o $*.dsl.i.orig, "  CPP $(TARGET_DIR)$*.dsl.i.orig")
> >  	$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, "  ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i")
> >  	$(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ,"  IASL $(TARGET_DIR)$*.dsl.i")
> 
> It's generally nasty to have rules that generate files already in
> the source tree. In partuclar people expect make clean to get
> back the original tree.
> How about only doing this when some variable is defined?
I'm not sure if I get you, %.hex files in source tree are always rebuilt if IASL
present (i.e. it's just cached copy for IASL-less case).
From my POV as developer if I touched included file then dependent files
must be rebuild even without 'make clean'. Otherwise it would break bisection
for example where stale table is used due to lack of deps.

Patch just fixes a bug in build process, i.e. adds deps on included files.
It's crude but still an improvement over current behavior.

All that said, I don't care much about this patch and can drop it.

> 
> > -- 
> > 1.8.4.2

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

* Re: [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources
  2014-01-08 17:00   ` Michael S. Tsirkin
@ 2014-01-09 10:34     ` Igor Mammedov
  2014-01-09 10:57       ` Michael S. Tsirkin
  0 siblings, 1 reply; 19+ messages in thread
From: Igor Mammedov @ 2014-01-09 10:34 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Wed, 8 Jan 2014 19:00:55 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Sat, Dec 28, 2013 at 11:30:48PM +0100, Igor Mammedov wrote:
> > .. so that they might not be used by PCI devices.
> > 
> > Note:
> > Resort to concatenating templates with preprocessor help,
> > because 1.0b spec isn't supporting ConcatenateResTemplate,
> > as result Windows XP fails to execute PCI0._CRS method if
> > ConcatenateResTemplate() is used.
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> 
> Interesting. Could be worth getting rid of ConcatenateResTemplate in other places
> too so XP works on more systems ...
I guess they aren't used if there is no complains,
anyway it's topic for another time/patch.

> 
> > ---
> > Follow up patch will expose them as motherboard resources
> > ---
> >  hw/i386/acpi-dsdt-pci-crs.dsl |  8 +-------
> >  hw/i386/acpi-dsdt.dsl         | 29 +++++++++++++++++++++++++++++
> >  hw/i386/q35-acpi-dsdt.dsl     |  8 ++++++++
> >  3 files changed, 38 insertions(+), 7 deletions(-)
> > 
> > diff --git a/hw/i386/acpi-dsdt-pci-crs.dsl b/hw/i386/acpi-dsdt-pci-crs.dsl
> > index b375a19..8b631d1 100644
> > --- a/hw/i386/acpi-dsdt-pci-crs.dsl
> > +++ b/hw/i386/acpi-dsdt-pci-crs.dsl
> > @@ -37,13 +37,7 @@ Scope(\_SB.PCI0) {
> >              0x0000,             // Address Translation Offset
> >              0x0CF8,             // Address Length
> >              ,, , TypeStatic)
> > -        WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
> > -            0x0000,             // Address Space Granularity
> > -            0x0D00,             // Address Range Minimum
> > -            0xFFFF,             // Address Range Maximum
> > -            0x0000,             // Address Translation Offset
> > -            0xF300,             // Address Length
> > -            ,, , TypeStatic)
> > +        BOARD_SPECIFIC_PCI_RESOURSES
> >          DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
> >              0x00000000,         // Address Space Granularity
> >              0x000A0000,         // Address Range Minimum
> > diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
> > index 3dc4789..55b4794 100644
> > --- a/hw/i386/acpi-dsdt.dsl
> > +++ b/hw/i386/acpi-dsdt.dsl
> > @@ -35,6 +35,35 @@ DefinitionBlock (
> >  /****************************************************************
> >   * PCI Bus definition
> >   ****************************************************************/
> > +#define BOARD_SPECIFIC_PCI_RESOURSES \
> > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > +         0x0000, \
> > +         0x0D00, \
> > +         0xADFF, \
> > +         0x0000, \
> > +         0xA100, \
> > +         ,, , TypeStatic) \
> > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > +         0x0000, \
> > +         0xAE14, \
> > +         0xAEFF, \
> > +         0x0000, \
> > +         0x00EC, \
> > +         ,, , TypeStatic) \
> > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > +         0x0000, \
> > +         0xAF20, \
> > +         0xAFDF, \
> > +         0x0000, \
> > +         0x00C0, \
> > +         ,, , TypeStatic) \
> > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > +         0x0000, \
> > +         0xAFE4, \
> > +         0xFFFF, \
> > +         0x0000, \
> > +         0x501C, \
> > +         ,, , TypeStatic)
> >  
> >      Scope(\_SB) {
> >          Device(PCI0) {
> 
> Could you add some comments here to document where
> does each number comes from please?
> E.g. /* PIIX4_PROC_BASE + 0x100 */ or something.
done

> 
> Ideally we'd generate this based on defines used
> by host, but that does not have to block merging
> this patch.
> 
> > diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
> > index 9a43947..f3e5921 100644
> > --- a/hw/i386/q35-acpi-dsdt.dsl
> > +++ b/hw/i386/q35-acpi-dsdt.dsl
> > @@ -48,6 +48,14 @@ DefinitionBlock (
> >  /****************************************************************
> >   * PCI Bus definition
> >   ****************************************************************/
> > +#define BOARD_SPECIFIC_PCI_RESOURSES \
> > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > +         0x0000, \
> > +         0x0D00, \
> > +         0xFFFF, \
> > +         0x0000, \
> > +         0xF300, \
> > +         ,, , TypeStatic)
> >  
> >      Scope(\_SB) {
> >          Device(PCI0) {
> > -- 
> > 1.8.4.2

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

* Re: [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources
  2014-01-09 10:34     ` Igor Mammedov
@ 2014-01-09 10:57       ` Michael S. Tsirkin
  0 siblings, 0 replies; 19+ messages in thread
From: Michael S. Tsirkin @ 2014-01-09 10:57 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: hutao, mjt, qemu-devel, chen.fan.fnst, kraxel, anthony.perard,
	lersek, afaerber

On Thu, Jan 09, 2014 at 11:34:05AM +0100, Igor Mammedov wrote:
> On Wed, 8 Jan 2014 19:00:55 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Sat, Dec 28, 2013 at 11:30:48PM +0100, Igor Mammedov wrote:
> > > .. so that they might not be used by PCI devices.
> > > 
> > > Note:
> > > Resort to concatenating templates with preprocessor help,
> > > because 1.0b spec isn't supporting ConcatenateResTemplate,
> > > as result Windows XP fails to execute PCI0._CRS method if
> > > ConcatenateResTemplate() is used.
> > > 
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > 
> > Interesting. Could be worth getting rid of ConcatenateResTemplate in other places
> > too so XP works on more systems ...
> I guess they aren't used if there is no complains,

I think the workaround is simple - don't have so much memory,
that's why people don't complain.

> anyway it's topic for another time/patch.

Absolutely.

> > 
> > > ---
> > > Follow up patch will expose them as motherboard resources
> > > ---
> > >  hw/i386/acpi-dsdt-pci-crs.dsl |  8 +-------
> > >  hw/i386/acpi-dsdt.dsl         | 29 +++++++++++++++++++++++++++++
> > >  hw/i386/q35-acpi-dsdt.dsl     |  8 ++++++++
> > >  3 files changed, 38 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/hw/i386/acpi-dsdt-pci-crs.dsl b/hw/i386/acpi-dsdt-pci-crs.dsl
> > > index b375a19..8b631d1 100644
> > > --- a/hw/i386/acpi-dsdt-pci-crs.dsl
> > > +++ b/hw/i386/acpi-dsdt-pci-crs.dsl
> > > @@ -37,13 +37,7 @@ Scope(\_SB.PCI0) {
> > >              0x0000,             // Address Translation Offset
> > >              0x0CF8,             // Address Length
> > >              ,, , TypeStatic)
> > > -        WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
> > > -            0x0000,             // Address Space Granularity
> > > -            0x0D00,             // Address Range Minimum
> > > -            0xFFFF,             // Address Range Maximum
> > > -            0x0000,             // Address Translation Offset
> > > -            0xF300,             // Address Length
> > > -            ,, , TypeStatic)
> > > +        BOARD_SPECIFIC_PCI_RESOURSES
> > >          DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
> > >              0x00000000,         // Address Space Granularity
> > >              0x000A0000,         // Address Range Minimum
> > > diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
> > > index 3dc4789..55b4794 100644
> > > --- a/hw/i386/acpi-dsdt.dsl
> > > +++ b/hw/i386/acpi-dsdt.dsl
> > > @@ -35,6 +35,35 @@ DefinitionBlock (
> > >  /****************************************************************
> > >   * PCI Bus definition
> > >   ****************************************************************/
> > > +#define BOARD_SPECIFIC_PCI_RESOURSES \
> > > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > > +         0x0000, \
> > > +         0x0D00, \
> > > +         0xADFF, \
> > > +         0x0000, \
> > > +         0xA100, \
> > > +         ,, , TypeStatic) \
> > > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > > +         0x0000, \
> > > +         0xAE14, \
> > > +         0xAEFF, \
> > > +         0x0000, \
> > > +         0x00EC, \
> > > +         ,, , TypeStatic) \
> > > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > > +         0x0000, \
> > > +         0xAF20, \
> > > +         0xAFDF, \
> > > +         0x0000, \
> > > +         0x00C0, \
> > > +         ,, , TypeStatic) \
> > > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > > +         0x0000, \
> > > +         0xAFE4, \
> > > +         0xFFFF, \
> > > +         0x0000, \
> > > +         0x501C, \
> > > +         ,, , TypeStatic)
> > >  
> > >      Scope(\_SB) {
> > >          Device(PCI0) {
> > 
> > Could you add some comments here to document where
> > does each number comes from please?
> > E.g. /* PIIX4_PROC_BASE + 0x100 */ or something.
> done
> 
> > 
> > Ideally we'd generate this based on defines used
> > by host, but that does not have to block merging
> > this patch.
> > 
> > > diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
> > > index 9a43947..f3e5921 100644
> > > --- a/hw/i386/q35-acpi-dsdt.dsl
> > > +++ b/hw/i386/q35-acpi-dsdt.dsl
> > > @@ -48,6 +48,14 @@ DefinitionBlock (
> > >  /****************************************************************
> > >   * PCI Bus definition
> > >   ****************************************************************/
> > > +#define BOARD_SPECIFIC_PCI_RESOURSES \
> > > +     WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
> > > +         0x0000, \
> > > +         0x0D00, \
> > > +         0xFFFF, \
> > > +         0x0000, \
> > > +         0xF300, \
> > > +         ,, , TypeStatic)
> > >  
> > >      Scope(\_SB) {
> > >          Device(PCI0) {
> > > -- 
> > > 1.8.4.2

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

* [Qemu-devel] [PATCH 1/9] acpi: factor out common cpu hotplug code for PIIX4/Q35
  2014-01-09 16:36 [Qemu-devel] [PATCH 0/9 v3] " Igor Mammedov
@ 2014-01-09 16:36 ` Igor Mammedov
  0 siblings, 0 replies; 19+ messages in thread
From: Igor Mammedov @ 2014-01-09 16:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: mst, hutao, mjt, chen.fan.fnst, aliguori, anthony.perard,
	afaerber

.. so it could be used for adding CPU hotplug to Q35 machine

Add an additional header with that will be shared between
C and ASL code: include/hw/acpi/cpu_hotplug_defs.h

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/acpi/Makefile.objs              |    2 +-
 hw/acpi/cpu_hotplug.c              |   64 ++++++++++++++++++++++++++++++
 hw/acpi/piix4.c                    |   77 +++---------------------------------
 include/hw/acpi/cpu_hotplug.h      |   27 ++++++++++++
 include/hw/acpi/cpu_hotplug_defs.h |   22 ++++++++++
 5 files changed, 120 insertions(+), 72 deletions(-)
 create mode 100644 hw/acpi/cpu_hotplug.c
 create mode 100644 include/hw/acpi/cpu_hotplug.h
 create mode 100644 include/hw/acpi/cpu_hotplug_defs.h

diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs
index 841eca2..397d32b 100644
--- a/hw/acpi/Makefile.objs
+++ b/hw/acpi/Makefile.objs
@@ -1 +1 @@
-common-obj-$(CONFIG_ACPI) += core.o piix4.o ich9.o pcihp.o
+common-obj-$(CONFIG_ACPI) += core.o piix4.o ich9.o pcihp.o cpu_hotplug.o
diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c
new file mode 100644
index 0000000..48928dc
--- /dev/null
+++ b/hw/acpi/cpu_hotplug.c
@@ -0,0 +1,64 @@
+/*
+ * QEMU ACPI hotplug utilities
+ *
+ * Copyright (C) 2013 Red Hat Inc
+ *
+ * Authors:
+ *   Igor Mammedov <imammedo@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include "hw/hw.h"
+#include "hw/acpi/cpu_hotplug.h"
+
+static uint64_t cpu_status_read(void *opaque, hwaddr addr, unsigned int size)
+{
+    AcpiCpuHotplug *cpus = opaque;
+    uint64_t val = cpus->sts[addr];
+
+    return val;
+}
+
+static void cpu_status_write(void *opaque, hwaddr addr, uint64_t data,
+                             unsigned int size)
+{
+    /* TODO: implement VCPU removal on guest signal that CPU can be removed */
+}
+
+static const MemoryRegionOps AcpiCpuHotplug_ops = {
+    .read = cpu_status_read,
+    .write = cpu_status_write,
+    .endianness = DEVICE_LITTLE_ENDIAN,
+    .valid = {
+        .min_access_size = 1,
+        .max_access_size = 1,
+    },
+};
+
+void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu)
+{
+    CPUClass *k = CPU_GET_CLASS(cpu);
+    int64_t cpu_id;
+
+    *gpe->sts = *gpe->sts | ACPI_CPU_HOTPLUG_STATUS;
+    cpu_id = k->get_arch_id(CPU(cpu));
+    g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
+}
+
+void AcpiCpuHotplug_init(MemoryRegion *parent, Object *owner,
+                         AcpiCpuHotplug *gpe_cpu, uint16_t base)
+{
+    CPUState *cpu;
+
+    CPU_FOREACH(cpu) {
+        CPUClass *cc = CPU_GET_CLASS(cpu);
+        int64_t id = cc->get_arch_id(cpu);
+
+        g_assert((id / 8) < ACPI_GPE_PROC_LEN);
+        gpe_cpu->sts[id / 8] |= (1 << (id % 8));
+    }
+    memory_region_init_io(&gpe_cpu->io, owner, &AcpiCpuHotplug_ops,
+                          gpe_cpu, "acpi-cpu-hotplug", ACPI_GPE_PROC_LEN);
+    memory_region_add_subregion(parent, base, &gpe_cpu->io);
+}
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index c42eed1..9b7fe6b 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -31,6 +31,7 @@
 #include "exec/address-spaces.h"
 #include "hw/acpi/piix4.h"
 #include "hw/acpi/pcihp.h"
+#include "hw/acpi/cpu_hotplug.h"
 
 //#define DEBUG
 
@@ -51,20 +52,14 @@
 #define PCI_RMV_BASE 0xae0c
 
 #define PIIX4_PROC_BASE 0xaf00
-#define PIIX4_PROC_LEN 32
 
 #define PIIX4_PCI_HOTPLUG_STATUS 2
-#define PIIX4_CPU_HOTPLUG_STATUS 4
 
 struct pci_status {
     uint32_t up; /* deprecated, maintained for migration compatibility */
     uint32_t down;
 };
 
-typedef struct CPUStatus {
-    uint8_t sts[PIIX4_PROC_LEN];
-} CPUStatus;
-
 typedef struct PIIX4PMState {
     /*< private >*/
     PCIDevice parent_obj;
@@ -74,7 +69,6 @@ typedef struct PIIX4PMState {
     uint32_t io_base;
 
     MemoryRegion io_gpe;
-    MemoryRegion io_cpu;
     ACPIREGS ar;
 
     APMState apm;
@@ -102,7 +96,7 @@ typedef struct PIIX4PMState {
     uint8_t disable_s4;
     uint8_t s4_val;
 
-    CPUStatus gpe_cpu;
+    AcpiCpuHotplug gpe_cpu;
     Notifier cpu_added_notifier;
 } PIIX4PMState;
 
@@ -679,61 +673,13 @@ static const MemoryRegionOps piix4_pci_ops = {
     },
 };
 
-static uint64_t cpu_status_read(void *opaque, hwaddr addr, unsigned int size)
-{
-    PIIX4PMState *s = opaque;
-    CPUStatus *cpus = &s->gpe_cpu;
-    uint64_t val = cpus->sts[addr];
-
-    return val;
-}
-
-static void cpu_status_write(void *opaque, hwaddr addr, uint64_t data,
-                             unsigned int size)
-{
-    /* TODO: implement VCPU removal on guest signal that CPU can be removed */
-}
-
-static const MemoryRegionOps cpu_hotplug_ops = {
-    .read = cpu_status_read,
-    .write = cpu_status_write,
-    .endianness = DEVICE_LITTLE_ENDIAN,
-    .valid = {
-        .min_access_size = 1,
-        .max_access_size = 1,
-    },
-};
-
-typedef enum {
-    PLUG,
-    UNPLUG,
-} HotplugEventType;
-
-static void piix4_cpu_hotplug_req(PIIX4PMState *s, CPUState *cpu,
-                                  HotplugEventType action)
-{
-    CPUStatus *g = &s->gpe_cpu;
-    ACPIGPE *gpe = &s->ar.gpe;
-    CPUClass *k = CPU_GET_CLASS(cpu);
-    int64_t cpu_id;
-
-    assert(s != NULL);
-
-    *gpe->sts = *gpe->sts | PIIX4_CPU_HOTPLUG_STATUS;
-    cpu_id = k->get_arch_id(CPU(cpu));
-    if (action == PLUG) {
-        g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
-    } else {
-        g->sts[cpu_id / 8] &= ~(1 << (cpu_id % 8));
-    }
-    acpi_update_sci(&s->ar, s->irq);
-}
-
 static void piix4_cpu_added_req(Notifier *n, void *opaque)
 {
     PIIX4PMState *s = container_of(n, PIIX4PMState, cpu_added_notifier);
 
-    piix4_cpu_hotplug_req(s, CPU(opaque), PLUG);
+    assert(s != NULL);
+    AcpiCpuHotplug_add(&s->ar.gpe, &s->gpe_cpu, CPU(opaque));
+    acpi_update_sci(&s->ar, s->irq);
 }
 
 static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
@@ -742,8 +688,6 @@ static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
 static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
                                            PCIBus *bus, PIIX4PMState *s)
 {
-    CPUState *cpu;
-
     memory_region_init_io(&s->io_gpe, OBJECT(s), &piix4_gpe_ops, s,
                           "acpi-gpe0", GPE_LEN);
     memory_region_add_subregion(parent, GPE_BASE, &s->io_gpe);
@@ -758,16 +702,7 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
         pci_bus_hotplug(bus, piix4_device_hotplug, DEVICE(s));
     }
 
-    CPU_FOREACH(cpu) {
-        CPUClass *cc = CPU_GET_CLASS(cpu);
-        int64_t id = cc->get_arch_id(cpu);
-
-        g_assert((id / 8) < PIIX4_PROC_LEN);
-        s->gpe_cpu.sts[id / 8] |= (1 << (id % 8));
-    }
-    memory_region_init_io(&s->io_cpu, OBJECT(s), &cpu_hotplug_ops, s,
-                          "acpi-cpu-hotplug", PIIX4_PROC_LEN);
-    memory_region_add_subregion(parent, PIIX4_PROC_BASE, &s->io_cpu);
+    AcpiCpuHotplug_init(parent, OBJECT(s), &s->gpe_cpu, PIIX4_PROC_BASE);
     s->cpu_added_notifier.notify = piix4_cpu_added_req;
     qemu_register_cpu_added_notifier(&s->cpu_added_notifier);
 }
diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h
new file mode 100644
index 0000000..4576400
--- /dev/null
+++ b/include/hw/acpi/cpu_hotplug.h
@@ -0,0 +1,27 @@
+/*
+ * QEMU ACPI hotplug utilities
+ *
+ * Copyright (C) 2013 Red Hat Inc
+ *
+ * Authors:
+ *   Igor Mammedov <imammedo@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef ACPI_HOTPLUG_H
+#define ACPI_HOTPLUG_H
+
+#include "hw/acpi/acpi.h"
+#include "hw/acpi/cpu_hotplug_defs.h"
+
+typedef struct AcpiCpuHotplug {
+    MemoryRegion io;
+    uint8_t sts[ACPI_GPE_PROC_LEN];
+} AcpiCpuHotplug;
+
+void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu);
+
+void AcpiCpuHotplug_init(MemoryRegion *parent, Object *owner,
+                         AcpiCpuHotplug *gpe_cpu, uint16_t base);
+#endif
diff --git a/include/hw/acpi/cpu_hotplug_defs.h b/include/hw/acpi/cpu_hotplug_defs.h
new file mode 100644
index 0000000..c6c4f78
--- /dev/null
+++ b/include/hw/acpi/cpu_hotplug_defs.h
@@ -0,0 +1,22 @@
+/*
+ * QEMU ACPI hotplug utilities shared defines
+ *
+ * Copyright (C) 2013 Red Hat Inc
+ *
+ * Authors:
+ *   Igor Mammedov <imammedo@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef ACPI_HOTPLUG_DEFS_H
+#define ACPI_HOTPLUG_DEFS_H
+
+/*
+ * ONLY DEFINEs are permited in this file since it's shared
+ * between C and ASL code.
+ */
+#define ACPI_CPU_HOTPLUG_STATUS 4
+#define ACPI_GPE_PROC_LEN 32
+
+#endif
-- 
1.7.1

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

end of thread, other threads:[~2014-01-09 16:41 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28 22:30 [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Igor Mammedov
2013-12-28 22:30 ` [Qemu-devel] [PATCH 1/9] acpi: factor out common cpu hotplug code for PIIX4/Q35 Igor Mammedov
2013-12-28 22:30 ` [Qemu-devel] [PATCH 2/9] acpi: ich9: add CPU hotplug handling to Q35 machine Igor Mammedov
2013-12-28 22:30 ` [Qemu-devel] [PATCH 3/9] pc: rebuild ACPI hex files if included *.dsl are touched Igor Mammedov
2014-01-08 17:47   ` Michael S. Tsirkin
2014-01-09  9:25     ` Igor Mammedov
2013-12-28 22:30 ` [Qemu-devel] [PATCH 4/9] pc: set PRST base in DSDT depending on chipset Igor Mammedov
2013-12-28 22:30 ` [Qemu-devel] [PATCH 5/9] pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources Igor Mammedov
2014-01-08 17:00   ` Michael S. Tsirkin
2014-01-09 10:34     ` Igor Mammedov
2014-01-09 10:57       ` Michael S. Tsirkin
2013-12-28 22:30 ` [Qemu-devel] [PATCH 6/9] pc: Q35 DSDT: exclude CPU hotplug " Igor Mammedov
2013-12-28 22:30 ` [Qemu-devel] [PATCH 7/9] pc: ACPI: expose PRST IO range via _CRS Igor Mammedov
2014-01-08 16:50   ` Michael S. Tsirkin
2013-12-28 22:30 ` [Qemu-devel] [PATCH 8/9] pc: ACPI: unify source of CPU hotplug IO base/len Igor Mammedov
2014-01-08 17:06   ` Michael S. Tsirkin
2013-12-28 22:30 ` [Qemu-devel] [PATCH 9/9] pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated Igor Mammedov
2014-01-08 17:47 ` [Qemu-devel] [PATCH 0/9 v2] pc: CPU hotplug support for Q35 Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2014-01-09 16:36 [Qemu-devel] [PATCH 0/9 v3] " Igor Mammedov
2014-01-09 16:36 ` [Qemu-devel] [PATCH 1/9] acpi: factor out common cpu hotplug code for PIIX4/Q35 Igor Mammedov

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