All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come)
@ 2014-12-24 16:07 Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

Right now, the SSDT/DSDT is split in three parts:

- code that doesn't need patching goes in the DSDT.  Furthermore,
  code in this category that is shared between PIIX4 and Q35 is
  handled via #include.  There was one exception, the SMC._STA
  method is patched and is in the DSDT.

- shared code that needs patching goes in the SSDT

- template-based code that comes from command line arguments
  goes in the SSDT as well

This series changes things to:

- code that is chipset-specific goes in the DSDT first.
  Right now none of this needs patching

- code that is not chipset-specific, some of which needs
  patching, goes in the DSDT second

- template-based code that comes from command line arguments
  goes in the SSDT

Patch 1 moves ssdt-misc ("common code that needs patching")
to the DSDT.  Patches 2-4 stop using the C preprocessor
in the DSDTs, except for parameterized code (CPU hotplug,
PCI CRS).

Patches 5-7 show why this could be useful.  They add padding
in fw_cfg after the DSDT, and in exchange stop padding the ACPI
tables to 128K.  This fixes migration problems (ROM sizes, RSDP)
because the ACPI tables are split in two:

1) fixed tables and the DSDT can be changed freely;

2) tables that vary depending on the command-line arguments (SSDT,
MADT, ...) are versioned and, given a machine type, they have to be
byte-equivalent across QEMU versions >= 2.3.

Patches 5 and 6 introduce a new sizing algorithm.  Patch 7 use it
to fix the migration problems.

Only the first 4 or 6 patches are meant for inclusion.  Patch 7 should
only be committed after Igor's series that rewrites the templating
mechanism in C.  That makes it much simpler to track changes to the ACPI
tables, and removes dependencies on the IASL version that could cause
some head-scratching.

The conflicts with Igor's series are nontrivial but overall
not complicated to solve.  Igor rewrote ssdt-misc in C, but those
parts can be easily removed from his series.  He has plans to
build the DSDT from C, and if that materializes it can apply to
acpi-dsdt-common.dsl too.

v1->v2 fixes problems due to GArray resizing and updates test data.
Now passes make check.

Paolo

Paolo Bonzini (7):
  pc: append ssdt-misc.dsl to the DSDT
  pc: rename ssdt-misc to dsdt-common
  pc: move common parts of the DSDT to dsdt-common
  pc: merge DSDT common parts into acpi-dsdt-common.dsl
  pc: introduce new ACPI table sizing algorithm
  pc: clean up pre-2.1 compatibility code
  pc: go back to smaller ACPI tables

 hw/i386/Makefile.objs                  |    2 +-
 hw/i386/acpi-build.c                   |  113 +-
 hw/i386/acpi-dsdt-common.dsl           |  467 +++++
 hw/i386/acpi-dsdt-common.hex.generated | 1897 +++++++++++++++++++
 hw/i386/acpi-dsdt-dbug.dsl             |   41 -
 hw/i386/acpi-dsdt-hpet.dsl             |   48 -
 hw/i386/acpi-dsdt-isa.dsl              |  128 --
 hw/i386/acpi-dsdt-mem-hotplug.dsl      |  176 --
 hw/i386/acpi-dsdt.dsl                  |   12 +-
 hw/i386/acpi-dsdt.hex.generated        | 3119 +++++++++-----------------------
 hw/i386/pc_piix.c                      |    9 +-
 hw/i386/pc_q35.c                       |    6 +-
 hw/i386/q35-acpi-dsdt.dsl              |    9 +-
 hw/i386/q35-acpi-dsdt.hex.generated    | 2787 +++++++---------------------
 hw/i386/ssdt-misc.dsl                  |  122 --
 hw/i386/ssdt-misc.hex.generated        |  399 ----
 include/hw/i386/pc.h                   |    2 +
 tests/acpi-test-data/pc/DSDT           |  Bin 3592 -> 3923 bytes
 tests/acpi-test-data/pc/SSDT           |  Bin 2279 -> 1951 bytes
 tests/acpi-test-data/q35/DSDT          |  Bin 8182 -> 8513 bytes
 tests/acpi-test-data/q35/SSDT          |  Bin 560 -> 232 bytes
 21 files changed, 3905 insertions(+), 5432 deletions(-)
 create mode 100644 hw/i386/acpi-dsdt-common.dsl
 create mode 100644 hw/i386/acpi-dsdt-common.hex.generated
 delete mode 100644 hw/i386/acpi-dsdt-dbug.dsl
 delete mode 100644 hw/i386/acpi-dsdt-hpet.dsl
 delete mode 100644 hw/i386/acpi-dsdt-isa.dsl
 delete mode 100644 hw/i386/acpi-dsdt-mem-hotplug.dsl
 delete mode 100644 hw/i386/ssdt-misc.dsl
 delete mode 100644 hw/i386/ssdt-misc.hex.generated

-- 
1.8.3.1

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

* [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
@ 2014-12-24 16:07 ` Paolo Bonzini
  2015-01-19 15:15   ` Igor Mammedov
  2015-01-19 15:31   ` Michael S. Tsirkin
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 2/4] pc: rename ssdt-misc to dsdt-common Paolo Bonzini
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

This part of the ACPI tables can vary in size across machine types, but
does not depend on the command-line.  It is an SSDT just because it is
the same for i440fx and Q35, and making it an SSDT made the code a bit
simpler.  However, it also complicates backwards compatibility, so
merge it with the DSDT.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/acpi-build.c          |  55 +++++++++++++++++++++++++++---------------
 tests/acpi-test-data/pc/DSDT  | Bin 3592 -> 3920 bytes
 tests/acpi-test-data/pc/SSDT  | Bin 2279 -> 1951 bytes
 tests/acpi-test-data/q35/DSDT | Bin 8182 -> 8510 bytes
 tests/acpi-test-data/q35/SSDT | Bin 560 -> 232 bytes
 5 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index a4d0c0c..e723fe1 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1061,26 +1061,18 @@ static void patch_pci_windows(PcPciInfo *pci, uint8_t *start, unsigned size)
     }
 }
 
+#define SSDT_MISC_SIZE (sizeof(ssdt_misc_aml) - sizeof(AcpiTableHeader))
+
 static void
-build_ssdt(GArray *table_data, GArray *linker,
-           AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc,
-           PcPciInfo *pci, PcGuestInfo *guest_info)
+fill_ssdt_misc(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
+               PcPciInfo *pci)
 {
     MachineState *machine = MACHINE(qdev_get_machine());
     uint32_t nr_mem = machine->ram_slots;
-    unsigned acpi_cpus = guest_info->apic_id_limit;
-    int ssdt_start = table_data->len;
     uint8_t *ssdt_ptr;
-    int i;
-
-    /* The current AML generator can cover the APIC ID range [0..255],
-     * inclusive, for VCPU hotplug. */
-    QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256);
-    g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT);
 
     /* Copy header and patch values in the S3_ / S4_ / S5_ packages */
-    ssdt_ptr = acpi_data_push(table_data, sizeof(ssdp_misc_aml));
-    memcpy(ssdt_ptr, ssdp_misc_aml, sizeof(ssdp_misc_aml));
+    ssdt_ptr = g_memdup(ssdp_misc_aml, sizeof(ssdp_misc_aml));
     if (pm->s3_disabled) {
         ssdt_ptr[acpi_s3_name[0]] = 'X';
     }
@@ -1099,6 +1091,27 @@ build_ssdt(GArray *table_data, GArray *linker,
     ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
                       ssdt_mctrl_nr_slots[0], 32, nr_mem);
 
+    memcpy(dest, ssdt_ptr + sizeof(AcpiTableHeader), SSDT_MISC_SIZE);
+    g_free(ssdt_ptr);
+}
+
+static void
+build_ssdt(GArray *table_data, GArray *linker,
+           AcpiCpuInfo *cpu, AcpiPmInfo *pm, PcGuestInfo *guest_info)
+{
+    MachineState *machine = MACHINE(qdev_get_machine());
+    uint32_t nr_mem = machine->ram_slots;
+    unsigned acpi_cpus = guest_info->apic_id_limit;
+    int ssdt_start = table_data->len;
+    int i;
+
+    acpi_data_push(table_data, sizeof(AcpiTableHeader));
+
+    /* The current AML generator can cover the APIC ID range [0..255],
+     * inclusive, for VCPU hotplug. */
+    QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256);
+    g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT);
+
     {
         GArray *sb_scope = build_alloc_array();
         uint8_t op = 0x10; /* ScopeOp */
@@ -1423,18 +1436,21 @@ build_dmar_q35(GArray *table_data, GArray *linker)
 }
 
 static void
-build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
+build_dsdt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
+           AcpiMiscInfo *misc, PcPciInfo *pci)
 {
     AcpiTableHeader *dsdt;
+    size_t size;
 
     assert(misc->dsdt_code && misc->dsdt_size);
 
-    dsdt = acpi_data_push(table_data, misc->dsdt_size);
+    size = misc->dsdt_size + SSDT_MISC_SIZE;
+    dsdt = acpi_data_push(table_data, size);
     memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
+    fill_ssdt_misc(((uint8_t *)dsdt) + misc->dsdt_size, pm, misc, pci);
 
     memset(dsdt, 0, sizeof *dsdt);
-    build_header(linker, table_data, dsdt, "DSDT",
-                 misc->dsdt_size, 1);
+    build_header(linker, table_data, dsdt, "DSDT", size, 1);
 }
 
 /* Build final rsdt table */
@@ -1591,7 +1607,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
 
     /* DSDT is pointed to by FADT */
     dsdt = tables->table_data->len;
-    build_dsdt(tables->table_data, tables->linker, &misc);
+    build_dsdt(tables->table_data, tables->linker, &pm, &misc, &pci);
 
     /* Count the size of the DSDT and SSDT, we will need it for legacy
      * sizing of ACPI tables.
@@ -1604,8 +1620,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
 
     ssdt = tables->table_data->len;
     acpi_add_table(table_offsets, tables->table_data);
-    build_ssdt(tables->table_data, tables->linker, &cpu, &pm, &misc, &pci,
-               guest_info);
+    build_ssdt(tables->table_data, tables->linker, &cpu, &pm, guest_info);
     aml_len += tables->table_data->len - ssdt;
 
     acpi_add_table(table_offsets, tables->table_data);
diff --git a/tests/acpi-test-data/pc/DSDT b/tests/acpi-test-data/pc/DSDT
index ee9cc6781cea3a9515b9a176eea3459f8e4d8655..9bcc9ba9540f768afeba95231229e093b538d020 100644
GIT binary patch
delta 350
zcmZ9Iy-ve06os!tsH~fW{wM<jVrL=|uu~eV7&WPhO+iYfn~||AQ-KMIk(B|YyZ}$o
zSKx_S?34xWbk6y%j<5W3@O_Ax&W!2;u=g)qN6X%1cMe=7nnD2JRtX9>o7I}DbVg`V
zs;M6!x3nD_i2uRlZ;)q2>Dr)oWV=b9(4gZpX6s3x(t!Kuq1U>zr9<uNc{o4bA$>t=
zBonEJR6XaY#LRHIlv#8w@|z?{QhSilCIF}&m6(>yIaWOdzeX7z?~^t|SU6IDblz%c
z;L~rg8}F5wG7czHH+3A|mg>r|#k~tSjY{2*5XbgT`#bCbUR{KqoaV(=`c~fAdRfSA
Ky+iFg4*UTB4N6r2

delta 19
acmca0*CE5@66_Mf!N<VBn6i=UA1?qiYXuDe

diff --git a/tests/acpi-test-data/pc/SSDT b/tests/acpi-test-data/pc/SSDT
index 558e4c85b031ec081045aec6cc382a680e9c6009..0dd46c68d186f6cb1fb7ee5ad935945fed4f31e8 100644
GIT binary patch
delta 23
ecmaDZIG>*@IM^j*K05;g<F$!g(wlP`tJncn1_s0c

delta 352
zcmZ9Iu};G<5Qfho6w66lQe{A5Wnm%_uu~cfEH$l(O+iYf%gERjF%(!kAszsb@&Y^o
zkJGoHoD&xC^#A{N`tRho{yGxIWOmH~SnoybFUQ++;5soF0sto^G2CpvzPV0kC<vtn
zqd?Gn`zVnAgYn-W&nAUygWW^wMstjVj?Wm?qdCC=_k}0C#+~AlP&0ZK&X2axoTDD8
zM42I$&$-ZYW;tG}ta~N%>m*51I!GED0F;kfP7CH7E1!a2qb-m3(AXg?9I4(ruNBnr
z;n$)c_litg2ehr~Dh_W7Z53PGxq#!SFi}^C3%Zm3hTX%;MZ#0le9}sv<So^!iE8T|
MYW6trdGN6F1Ki?DumAu6

diff --git a/tests/acpi-test-data/q35/DSDT b/tests/acpi-test-data/q35/DSDT
index ef0c75f4236de3e6f727e21991533f2bf8279dee..c30ec0462acee10c55e1035ba0e6798a0739dc35 100644
GIT binary patch
delta 350
zcmZ9Iu};G<5QfhXD$7ZstunA7MkW#gE6_F;7&WP}O+iYf%gET30Toyoc>$2}0=xk5
zK+KGkbIJlY{r~@+exLkx^fnNg&D`NO0K0t^pIh_JXl)8yCl(_B_#h=QS}fkbxlSi2
z2&ERgq2NTDp+No*Mt_4mD~xZ0&JJ~>-NRlhU<|z8#~u#^2%_W;<{mYx$I*0m73~1^
zP$kOtv3$sdmJ`SERAudRnO`JHlF~uax)7ke({gN>cdWb*e~orL-bCyAF!Q8(Zaq~{
z!%I+$jd<N;+IgT|RabFzY4n+6vuhu492(ng3vohs((kYvc=VB2QRBQ=%7Ek*)vH1+
K>pg1T@!$uPnoErU

delta 19
acmdnz^v#~jCD<k8n>+&p<FAceZ{z_=+y_Mf

diff --git a/tests/acpi-test-data/q35/SSDT b/tests/acpi-test-data/q35/SSDT
index 4e45510181c4038505ae1815b76799a2cd0e8808..3700bcc31e1469d4b9aafbf34963d937200a6f15 100644
GIT binary patch
delta 22
dcmdnM@`8~oIM^lR1p@;Equ)d>>B+f_hXG9s2A2Q;

delta 351
zcmZ9Iu};G<5QfhsRF;zhtui37vM}KY*eQ(#mYUSWrXZ!#Wn}EiRA6PQ`T`*30eFLU
z;01UKo`P~tS>UGs|G(4klfT$|AgoQDYyq&(xj2{&w<o}jv={-vij=}=y<UEElZ;Ui
zN-TCm!HG6Qf%+c|{{~r_7rqVlj;I^$3HI6nW8n2E_IMyb5G8kpGeXVkc{DlRLVJN`
zpry8bET1!B)Yx&n(rM>fWj9jFgbq^Hg#hKFQKN!+$I7Sh*BHm+eYCC*Q%|bb_M(Cs
z-hx`}#ydr7oCn5Lbrnaqg>jlq?|r~=P}puqh)cSY{)Roki;qN0kFtCt1Cn=CuXDYr
M_o#WtgZbgd4{V`Jg8%>k

-- 
1.8.3.1

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

* [Qemu-devel] [PATCH v2 2/4] pc: rename ssdt-misc to dsdt-common
  2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
@ 2014-12-24 16:07 ` Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 3/4] pc: move common parts of the DSDT " Paolo Bonzini
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

All the changes to generated files are in the header, so there is
no need to rebuild test data.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/Makefile.objs                              |  2 +-
 hw/i386/acpi-build.c                               | 36 +++++++++++-----------
 hw/i386/{ssdt-misc.dsl => acpi-dsdt-common.dsl}    |  8 ++---
 ...ex.generated => acpi-dsdt-common.hex.generated} | 30 +++++++++---------
 hw/i386/acpi-dsdt.dsl                              |  2 +-
 5 files changed, 39 insertions(+), 39 deletions(-)
 rename hw/i386/{ssdt-misc.dsl => acpi-dsdt-common.dsl} (94%)
 rename hw/i386/{ssdt-misc.hex.generated => acpi-dsdt-common.hex.generated} (93%)

diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index 9d419ad..fe6b846 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -9,7 +9,7 @@ obj-y += kvmvapic.o
 obj-y += acpi-build.o
 obj-y += bios-linker-loader.o
 hw/i386/acpi-build.o: hw/i386/acpi-build.c hw/i386/acpi-dsdt.hex \
-	hw/i386/ssdt-proc.hex hw/i386/ssdt-pcihp.hex hw/i386/ssdt-misc.hex \
+	hw/i386/ssdt-proc.hex hw/i386/ssdt-pcihp.hex hw/i386/acpi-dsdt-common.hex \
 	hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex \
 	hw/i386/q35-acpi-dsdt.hex hw/i386/ssdt-mem.hex \
 	hw/i386/ssdt-tpm.hex
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index e723fe1..c0b3c04 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -715,7 +715,7 @@ static inline char acpi_get_hex(uint32_t val)
 #define ACPI_SSDT_SIGNATURE 0x54445353 /* SSDT */
 #define ACPI_SSDT_HEADER_LENGTH 36
 
-#include "hw/i386/ssdt-misc.hex"
+#include "hw/i386/acpi-dsdt-common.hex"
 #include "hw/i386/ssdt-pcihp.hex"
 #include "hw/i386/ssdt-tpm.hex"
 
@@ -1061,38 +1061,38 @@ static void patch_pci_windows(PcPciInfo *pci, uint8_t *start, unsigned size)
     }
 }
 
-#define SSDT_MISC_SIZE (sizeof(ssdt_misc_aml) - sizeof(AcpiTableHeader))
+#define DSDT_COMMON_SIZE (sizeof(dsdt_common_aml) - sizeof(AcpiTableHeader))
 
 static void
-fill_ssdt_misc(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
-               PcPciInfo *pci)
+fill_dsdt_common(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
+                 PcPciInfo *pci)
 {
     MachineState *machine = MACHINE(qdev_get_machine());
     uint32_t nr_mem = machine->ram_slots;
-    uint8_t *ssdt_ptr;
+    uint8_t *dsdt_ptr;
 
     /* Copy header and patch values in the S3_ / S4_ / S5_ packages */
-    ssdt_ptr = g_memdup(ssdp_misc_aml, sizeof(ssdp_misc_aml));
+    dsdt_ptr = g_memdup(dsdt_common_aml, sizeof(dsdt_common_aml));
     if (pm->s3_disabled) {
-        ssdt_ptr[acpi_s3_name[0]] = 'X';
+        dsdt_ptr[acpi_s3_name[0]] = 'X';
     }
     if (pm->s4_disabled) {
-        ssdt_ptr[acpi_s4_name[0]] = 'X';
+        dsdt_ptr[acpi_s4_name[0]] = 'X';
     } else {
-        ssdt_ptr[acpi_s4_pkg[0] + 1] = ssdt_ptr[acpi_s4_pkg[0] + 3] =
+        dsdt_ptr[acpi_s4_pkg[0] + 1] = dsdt_ptr[acpi_s4_pkg[0] + 3] =
             pm->s4_val;
     }
 
-    patch_pci_windows(pci, ssdt_ptr, sizeof(ssdp_misc_aml));
+    patch_pci_windows(pci, dsdt_ptr, sizeof(dsdt_common_aml));
 
-    ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
-                      ssdt_isa_pest[0], 16, misc->pvpanic_port);
+    ACPI_BUILD_SET_LE(dsdt_ptr, sizeof(dsdt_common_aml),
+                      dsdt_isa_pest[0], 16, misc->pvpanic_port);
 
-    ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
-                      ssdt_mctrl_nr_slots[0], 32, nr_mem);
+    ACPI_BUILD_SET_LE(dsdt_ptr, sizeof(dsdt_common_aml),
+                      dsdt_mctrl_nr_slots[0], 32, nr_mem);
 
-    memcpy(dest, ssdt_ptr + sizeof(AcpiTableHeader), SSDT_MISC_SIZE);
-    g_free(ssdt_ptr);
+    memcpy(dest, dsdt_ptr + sizeof(AcpiTableHeader), DSDT_COMMON_SIZE);
+    g_free(dsdt_ptr);
 }
 
 static void
@@ -1444,10 +1444,10 @@ build_dsdt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
 
     assert(misc->dsdt_code && misc->dsdt_size);
 
-    size = misc->dsdt_size + SSDT_MISC_SIZE;
+    size = misc->dsdt_size + DSDT_COMMON_SIZE;
     dsdt = acpi_data_push(table_data, size);
     memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
-    fill_ssdt_misc(((uint8_t *)dsdt) + misc->dsdt_size, pm, misc, pci);
+    fill_dsdt_common(((uint8_t *)dsdt) + misc->dsdt_size, pm, misc, pci);
 
     memset(dsdt, 0, sizeof *dsdt);
     build_header(linker, table_data, dsdt, "DSDT", size, 1);
diff --git a/hw/i386/ssdt-misc.dsl b/hw/i386/acpi-dsdt-common.dsl
similarity index 94%
rename from hw/i386/ssdt-misc.dsl
rename to hw/i386/acpi-dsdt-common.dsl
index 1e3baae..f7849c0 100644
--- a/hw/i386/ssdt-misc.dsl
+++ b/hw/i386/acpi-dsdt-common.dsl
@@ -14,9 +14,9 @@
  */
 #include "hw/acpi/pc-hotplug.h"
 
-ACPI_EXTRACT_ALL_CODE ssdp_misc_aml
+ACPI_EXTRACT_ALL_CODE dsdt_common_aml
 
-DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
+DefinitionBlock ("acpi-dsdt-common.aml", "SSDT", 0x01, "BXPC", "BXSSDTCOMM", 0x1)
 {
 
 /****************************************************************
@@ -36,7 +36,7 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
        Name(P1E, Buffer() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
        ACPI_EXTRACT_NAME_BUFFER8 acpi_pci64_length
        Name(P1L, Buffer() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
-       ACPI_EXTRACT_NAME_DWORD_CONST ssdt_mctrl_nr_slots
+       ACPI_EXTRACT_NAME_DWORD_CONST dsdt_mctrl_nr_slots
        Name(MEMORY_SLOTS_NUMBER, 0x12345678)
     }
 
@@ -81,7 +81,7 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
         Device(PEVT) {
             Name(_HID, "QEMU0001")
             /* PEST will be patched to be Zero if no such device */
-            ACPI_EXTRACT_NAME_WORD_CONST ssdt_isa_pest
+            ACPI_EXTRACT_NAME_WORD_CONST dsdt_isa_pest
             Name(PEST, 0xFFFF)
             OperationRegion(PEOR, SystemIO, PEST, 0x01)
             Field(PEOR, ByteAcc, NoLock, Preserve) {
diff --git a/hw/i386/ssdt-misc.hex.generated b/hw/i386/acpi-dsdt-common.hex.generated
similarity index 93%
rename from hw/i386/ssdt-misc.hex.generated
rename to hw/i386/acpi-dsdt-common.hex.generated
index cbcf61d..5127845 100644
--- a/hw/i386/ssdt-misc.hex.generated
+++ b/hw/i386/acpi-dsdt-common.hex.generated
@@ -4,8 +4,8 @@ static unsigned char acpi_pci64_length[] = {
 static unsigned char acpi_s4_pkg[] = {
 0x99
 };
-static unsigned char ssdt_mctrl_nr_slots[] = {
-0x7d
+static unsigned char acpi_s4_name[] = {
+0x92
 };
 static unsigned char acpi_s3_name[] = {
 0x86
@@ -16,7 +16,10 @@ static unsigned char acpi_pci32_start[] = {
 static unsigned char acpi_pci64_valid[] = {
 0x43
 };
-static unsigned char ssdp_misc_aml[] = {
+static unsigned char dsdt_isa_pest[] = {
+0xda
+};
+static unsigned char dsdt_common_aml[] = {
 0x53,
 0x53,
 0x44,
@@ -26,7 +29,7 @@ static unsigned char ssdp_misc_aml[] = {
 0x0,
 0x0,
 0x1,
-0x3,
+0x2f,
 0x42,
 0x58,
 0x50,
@@ -39,8 +42,8 @@ static unsigned char ssdp_misc_aml[] = {
 0x53,
 0x44,
 0x54,
-0x53,
-0x55,
+0x43,
+0x4f,
 0x1,
 0x0,
 0x0,
@@ -49,9 +52,9 @@ static unsigned char ssdp_misc_aml[] = {
 0x4e,
 0x54,
 0x4c,
-0x28,
-0x8,
-0x14,
+0x13,
+0x9,
+0x12,
 0x20,
 0x10,
 0x4c,
@@ -382,12 +385,6 @@ static unsigned char ssdp_misc_aml[] = {
 0x4d,
 0x58
 };
-static unsigned char ssdt_isa_pest[] = {
-0xda
-};
-static unsigned char acpi_s4_name[] = {
-0x92
-};
 static unsigned char acpi_pci64_start[] = {
 0x4d
 };
@@ -397,3 +394,6 @@ static unsigned char acpi_pci64_end[] = {
 static unsigned char acpi_pci32_end[] = {
 0x39
 };
+static unsigned char dsdt_mctrl_nr_slots[] = {
+0x7d
+};
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index a611e07..e50efeb 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -170,7 +170,7 @@ DefinitionBlock (
             Return (0x0)
         }
 
-        /* Hotplug notification method supplied by SSDT */
+        /* Hotplug notification method in acpi-dsdt-common.dsl */
         External(\_SB.PCI0.PCNT, MethodObj)
     }
 
-- 
1.8.3.1

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

* [Qemu-devel] [PATCH v2 3/4] pc: move common parts of the DSDT to dsdt-common
  2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 2/4] pc: rename ssdt-misc to dsdt-common Paolo Bonzini
@ 2014-12-24 16:07 ` Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl Paolo Bonzini
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/acpi-build.c                   |   12 +-
 hw/i386/acpi-dsdt-common.dsl           |   14 +-
 hw/i386/acpi-dsdt-common.hex.generated | 1578 +++++++++++++++-
 hw/i386/acpi-dsdt-isa.dsl              |    6 +-
 hw/i386/acpi-dsdt.dsl                  |   10 +-
 hw/i386/acpi-dsdt.hex.generated        | 3119 +++++++++-----------------------
 hw/i386/q35-acpi-dsdt.dsl              |    9 +-
 hw/i386/q35-acpi-dsdt.hex.generated    | 2787 +++++++---------------------
 tests/acpi-test-data/pc/DSDT           |  Bin 3920 -> 3923 bytes
 tests/acpi-test-data/q35/DSDT          |  Bin 8510 -> 8513 bytes
 10 files changed, 3020 insertions(+), 4515 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index c0b3c04..63f3d80 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -53,6 +53,7 @@
 
 #include "hw/i386/q35-acpi-dsdt.hex"
 #include "hw/i386/acpi-dsdt.hex"
+#include "hw/i386/acpi-dsdt-common.hex"
 
 #include "qapi/qmp/qint.h"
 #include "qom/qom-qobject.h"
@@ -116,7 +117,6 @@ typedef struct AcpiBuildPciBusHotplugState {
 
 static void acpi_get_dsdt(AcpiMiscInfo *info)
 {
-    uint16_t *applesmc_sta;
     Object *piix = piix4_pm_find();
     Object *lpc = ich9_lpc_find();
     assert(!!piix != !!lpc);
@@ -124,17 +124,11 @@ static void acpi_get_dsdt(AcpiMiscInfo *info)
     if (piix) {
         info->dsdt_code = AcpiDsdtAmlCode;
         info->dsdt_size = sizeof AcpiDsdtAmlCode;
-        applesmc_sta = piix_dsdt_applesmc_sta;
     }
     if (lpc) {
         info->dsdt_code = Q35AcpiDsdtAmlCode;
         info->dsdt_size = sizeof Q35AcpiDsdtAmlCode;
-        applesmc_sta = q35_dsdt_applesmc_sta;
     }
-
-    /* Patch in appropriate value for AppleSMC _STA */
-    *(uint8_t *)(info->dsdt_code + *applesmc_sta) =
-        applesmc_find() ? 0x0b : 0x00;
 }
 
 static
@@ -715,7 +709,6 @@ static inline char acpi_get_hex(uint32_t val)
 #define ACPI_SSDT_SIGNATURE 0x54445353 /* SSDT */
 #define ACPI_SSDT_HEADER_LENGTH 36
 
-#include "hw/i386/acpi-dsdt-common.hex"
 #include "hw/i386/ssdt-pcihp.hex"
 #include "hw/i386/ssdt-tpm.hex"
 
@@ -1091,6 +1084,9 @@ fill_dsdt_common(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
     ACPI_BUILD_SET_LE(dsdt_ptr, sizeof(dsdt_common_aml),
                       dsdt_mctrl_nr_slots[0], 32, nr_mem);
 
+    /* Patch in appropriate value for AppleSMC _STA */
+    dsdt_ptr[dsdt_applesmc_sta[0]]= applesmc_find() ? 0x0b : 0x00;
+
     memcpy(dest, dsdt_ptr + sizeof(AcpiTableHeader), DSDT_COMMON_SIZE);
     g_free(dsdt_ptr);
 }
diff --git a/hw/i386/acpi-dsdt-common.dsl b/hw/i386/acpi-dsdt-common.dsl
index f7849c0..1929f8f 100644
--- a/hw/i386/acpi-dsdt-common.dsl
+++ b/hw/i386/acpi-dsdt-common.dsl
@@ -19,6 +19,17 @@ ACPI_EXTRACT_ALL_CODE dsdt_common_aml
 DefinitionBlock ("acpi-dsdt-common.aml", "SSDT", 0x01, "BXPC", "BXSSDTCOMM", 0x1)
 {
 
+    External(\_SB.PCI0, DeviceObj)
+    External(\_SB.PCI0.ISA, DeviceObj)
+    External(\_SB.PCI0.PCI, DeviceObj)
+
+#include "hw/acpi/pc-hotplug.h"
+#include "acpi-dsdt-dbug.dsl"
+#include "acpi-dsdt-hpet.dsl"
+#include "acpi-dsdt-isa.dsl"
+#include "acpi-dsdt-mem-hotplug.dsl"
+
+
 /****************************************************************
  * PCI memory ranges
  ****************************************************************/
@@ -74,9 +85,6 @@ DefinitionBlock ("acpi-dsdt-common.aml", "SSDT", 0x01, "BXPC", "BXSSDTCOMM", 0x1
         })
     }
 
-    External(\_SB.PCI0, DeviceObj)
-    External(\_SB.PCI0.ISA, DeviceObj)
-
     Scope(\_SB.PCI0.ISA) {
         Device(PEVT) {
             Name(_HID, "QEMU0001")
diff --git a/hw/i386/acpi-dsdt-common.hex.generated b/hw/i386/acpi-dsdt-common.hex.generated
index 5127845..00ad9c3 100644
--- a/hw/i386/acpi-dsdt-common.hex.generated
+++ b/hw/i386/acpi-dsdt-common.hex.generated
@@ -1,61 +1,1556 @@
-static unsigned char acpi_pci64_length[] = {
-0x6f
+static unsigned short acpi_pci64_length[] = {
+0x646
 };
-static unsigned char acpi_s4_pkg[] = {
-0x99
+static unsigned short acpi_s4_pkg[] = {
+0x670
 };
-static unsigned char acpi_s4_name[] = {
-0x92
+static unsigned short acpi_s4_name[] = {
+0x669
 };
-static unsigned char acpi_s3_name[] = {
-0x86
+static unsigned short acpi_s3_name[] = {
+0x65d
 };
-static unsigned char acpi_pci32_start[] = {
-0x2f
+static unsigned short acpi_pci32_start[] = {
+0x606
 };
-static unsigned char acpi_pci64_valid[] = {
-0x43
+static unsigned short acpi_pci64_valid[] = {
+0x61a
 };
-static unsigned char dsdt_isa_pest[] = {
-0xda
+static unsigned short dsdt_isa_pest[] = {
+0x6b1
 };
 static unsigned char dsdt_common_aml[] = {
 0x53,
 0x53,
 0x44,
 0x54,
+0x43,
+0x7,
+0x0,
+0x0,
+0x1,
+0x1,
+0x42,
+0x58,
+0x50,
+0x43,
+0x0,
+0x0,
+0x42,
+0x58,
+0x53,
+0x53,
+0x44,
+0x54,
+0x43,
+0x4f,
+0x1,
+0x0,
+0x0,
+0x0,
+0x49,
+0x4e,
+0x54,
+0x4c,
+0x13,
+0x9,
+0x12,
+0x20,
+0x10,
+0x49,
+0x4,
+0x5c,
+0x0,
+0x5b,
+0x80,
+0x44,
+0x42,
+0x47,
+0x5f,
+0x1,
+0xb,
+0x2,
+0x4,
+0x1,
+0x5b,
+0x81,
+0xb,
+0x44,
+0x42,
+0x47,
+0x5f,
+0x1,
+0x44,
+0x42,
+0x47,
+0x42,
+0x8,
+0x14,
+0x2c,
+0x44,
+0x42,
+0x55,
+0x47,
+0x1,
+0x98,
+0x68,
+0x60,
+0x96,
+0x60,
+0x60,
+0x74,
+0x87,
+0x60,
+0x1,
+0x61,
+0x70,
+0x0,
+0x62,
+0xa2,
+0x10,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+0x52,
+0x33,
+0x32,
+0xa,
+0x16,
+0x4c,
+0x45,
+0x4e,
+0x5f,
+0x70,
+0x4d,
+0x49,
+0x4e,
+0x4c,
+0x4d,
+0x49,
+0x4e,
+0x5f,
+0x70,
+0x4d,
+0x41,
+0x58,
+0x4c,
+0x4d,
+0x41,
 0x58,
+0x5f,
+0x70,
+0x4c,
+0x45,
+0x4e,
+0x4c,
+0x4c,
+0x45,
+0x4e,
+0x5f,
+0x5b,
+0x27,
+0x4d,
+0x4c,
+0x43,
+0x4b,
+0xa4,
+0x4d,
+0x52,
+0x33,
+0x32,
+0x5b,
+0x27,
+0x4d,
+0x4c,
+0x43,
+0x4b,
+0xa4,
+0x4d,
+0x52,
+0x36,
+0x34,
+0x14,
+0x24,
+0x4d,
 0x50,
+0x58,
+0x4d,
+0x1,
+0x5b,
+0x23,
+0x4d,
+0x4c,
 0x43,
+0x4b,
+0xff,
+0xff,
+0x70,
+0x99,
+0x68,
 0x0,
-0x0,
-0x42,
-0x58,
+0x4d,
 0x53,
+0x45,
+0x4c,
+0x70,
+0x4d,
+0x50,
+0x58,
+0x5f,
+0x60,
+0x5b,
+0x27,
+0x4d,
+0x4c,
+0x43,
+0x4b,
+0xa4,
+0x60,
+0x14,
+0x28,
+0x4d,
+0x4f,
 0x53,
-0x44,
 0x54,
+0x4,
+0x5b,
+0x23,
+0x4d,
+0x4c,
 0x43,
-0x4f,
-0x1,
-0x0,
-0x0,
+0x4b,
+0xff,
+0xff,
+0x70,
+0x99,
+0x68,
 0x0,
-0x49,
-0x4e,
-0x54,
+0x4d,
+0x53,
+0x45,
 0x4c,
-0x13,
-0x9,
-0x12,
-0x20,
+0x70,
+0x69,
+0x4d,
+0x4f,
+0x45,
+0x56,
+0x70,
+0x6a,
+0x4d,
+0x4f,
+0x53,
+0x43,
+0x5b,
+0x27,
+0x4d,
+0x4c,
+0x43,
+0x4b,
 0x10,
 0x4c,
 0x5,
@@ -385,15 +1880,18 @@ static unsigned char dsdt_common_aml[] = {
 0x4d,
 0x58
 };
-static unsigned char acpi_pci64_start[] = {
-0x4d
+static unsigned short acpi_pci64_start[] = {
+0x624
+};
+static unsigned short acpi_pci64_end[] = {
+0x635
 };
-static unsigned char acpi_pci64_end[] = {
-0x5e
+static unsigned short acpi_pci32_end[] = {
+0x610
 };
-static unsigned char acpi_pci32_end[] = {
-0x39
+static unsigned short dsdt_applesmc_sta[] = {
+0x126
 };
-static unsigned char dsdt_mctrl_nr_slots[] = {
-0x7d
+static unsigned short dsdt_mctrl_nr_slots[] = {
+0x654
 };
diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl
index deb37de..a8851b0 100644
--- a/hw/i386/acpi-dsdt-isa.dsl
+++ b/hw/i386/acpi-dsdt-isa.dsl
@@ -19,7 +19,7 @@ Scope(\_SB.PCI0.ISA) {
     Device (SMC) {
         Name(_HID, EisaId("APP0001"))
         /* _STA will be patched to 0x0B if AppleSMC is present */
-        ACPI_EXTRACT_NAME_BYTE_CONST DSDT_APPLESMC_STA
+        ACPI_EXTRACT_NAME_BYTE_CONST dsdt_applesmc_sta
         Name(_STA, 0xF0)
         Name(_CRS, ResourceTemplate () {
             IO (Decode16, 0x0300, 0x0300, 0x01, 0x20)
@@ -58,6 +58,7 @@ Scope(\_SB.PCI0.ISA) {
         })
     }
 
+    External(FDEN)
     Device(FDC0) {
         Name(_HID, EisaId("PNP0700"))
         Method(_STA, 0, NotSerialized) {
@@ -76,6 +77,7 @@ Scope(\_SB.PCI0.ISA) {
         })
     }
 
+    External(LPEN)
     Device(LPT) {
         Name(_HID, EisaId("PNP0400"))
         Method(_STA, 0, NotSerialized) {
@@ -92,6 +94,7 @@ Scope(\_SB.PCI0.ISA) {
         })
     }
 
+    External(CAEN)
     Device(COM1) {
         Name(_HID, EisaId("PNP0501"))
         Name(_UID, 0x01)
@@ -109,6 +112,7 @@ Scope(\_SB.PCI0.ISA) {
         })
     }
 
+    External(CBEN)
     Device(COM2) {
         Name(_HID, EisaId("PNP0501"))
         Name(_UID, 0x02)
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index e50efeb..71d1e3f 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -29,9 +29,6 @@ DefinitionBlock (
     )
 {
 
-#include "acpi-dsdt-dbug.dsl"
-
-
 /****************************************************************
  * PCI Bus definition
  ****************************************************************/
@@ -86,7 +83,6 @@ DefinitionBlock (
     }
 
 #include "acpi-dsdt-pci-crs.dsl"
-#include "acpi-dsdt-hpet.dsl"
 
 
 /****************************************************************
@@ -130,9 +126,6 @@ DefinitionBlock (
         }
     }
 
-#define DSDT_APPLESMC_STA piix_dsdt_applesmc_sta
-#include "acpi-dsdt-isa.dsl"
-
 
 /****************************************************************
  * PCI hotplug
@@ -297,7 +290,6 @@ DefinitionBlock (
 #include "hw/acpi/pc-hotplug.h"
 #define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE
 #include "acpi-dsdt-cpu-hotplug.dsl"
-#include "acpi-dsdt-mem-hotplug.dsl"
 
 
 /****************************************************************
@@ -318,6 +310,8 @@ DefinitionBlock (
             // CPU hotplug event
             \_SB.PRSC()
         }
+        External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE, DeviceObj)
+        External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj)
         Method(_E03) {
             // Memory hotplug event
             \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
diff --git a/hw/i386/acpi-dsdt.hex.generated b/hw/i386/acpi-dsdt.hex.generated
index 875570e..5c3500a 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,
+0x34,
 0x8,
-0xe,
 0x0,
 0x0,
 0x1,
-0xfc,
+0x26,
 0x42,
 0x58,
 0x50,
@@ -31,85 +31,11 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x4e,
 0x54,
 0x4c,
-0x28,
-0x8,
-0x14,
+0x13,
+0x9,
+0x12,
 0x20,
 0x10,
-0x49,
-0x4,
-0x5c,
-0x0,
-0x5b,
-0x80,
-0x44,
-0x42,
-0x47,
-0x5f,
-0x1,
-0xb,
-0x2,
-0x4,
-0x1,
-0x5b,
-0x81,
-0xb,
-0x44,
-0x42,
-0x47,
-0x5f,
-0x1,
-0x44,
-0x42,
-0x47,
-0x42,
-0x8,
-0x14,
-0x2c,
-0x44,
-0x42,
-0x55,
-0x47,
-0x1,
-0x98,
-0x68,
-0x60,
-0x96,
-0x60,
-0x60,
-0x74,
-0x87,
-0x60,
-0x1,
-0x61,
-0x70,
-0x0,
-0x62,
-0xa2,
-0x10,
-0x95,
-0x62,
-0x61,
-0x70,
-0x83,
-0x88,
-0x60,
-0x62,
-0x0,
-0x44,
-0x42,
-0x47,
-0x42,
-0x75,
-0x62,
-0x70,
-0xa,
-0xa,
-0x44,
-0x42,
-0x47,
-0x42,
-0x10,
 0x22,
 0x5f,
 0x53,
@@ -544,148 +470,6 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0xa4,
 0x60,
 0x10,
-0x4d,
-0x8,
-0x5f,
-0x53,
-0x42,
-0x5f,
-0x5b,
-0x82,
-0x45,
-0x8,
-0x48,
-0x50,
-0x45,
-0x54,
-0x8,
-0x5f,
-0x48,
-0x49,
-0x44,
-0xc,
-0x41,
-0xd0,
-0x1,
-0x3,
-0x8,
-0x5f,
-0x55,
-0x49,
-0x44,
-0x0,
-0x5b,
-0x80,
-0x48,
-0x50,
-0x54,
-0x4d,
-0x0,
-0xc,
-0x0,
-0x0,
-0xd0,
-0xfe,
-0xb,
-0x0,
-0x4,
-0x5b,
-0x81,
-0x10,
-0x48,
-0x50,
-0x54,
-0x4d,
-0x13,
-0x56,
-0x45,
-0x4e,
-0x44,
-0x20,
-0x50,
-0x52,
-0x44,
-0x5f,
-0x20,
-0x14,
-0x36,
-0x5f,
-0x53,
-0x54,
-0x41,
-0x0,
-0x70,
-0x56,
-0x45,
-0x4e,
-0x44,
-0x60,
-0x70,
-0x50,
-0x52,
-0x44,
-0x5f,
-0x61,
-0x7a,
-0x60,
-0xa,
-0x10,
-0x60,
-0xa0,
-0xc,
-0x91,
-0x93,
-0x60,
-0x0,
-0x93,
-0x60,
-0xb,
-0xff,
-0xff,
-0xa4,
-0x0,
-0xa0,
-0xe,
-0x91,
-0x93,
-0x61,
-0x0,
-0x94,
-0x61,
-0xc,
-0x0,
-0xe1,
-0xf5,
-0x5,
-0xa4,
-0x0,
-0xa4,
-0xa,
-0xf,
-0x8,
-0x5f,
-0x43,
-0x52,
-0x53,
-0x11,
-0x11,
-0xa,
-0xe,
-0x86,
-0x9,
-0x0,
-0x0,
-0x0,
-0x0,
-0xd0,
-0xfe,
-0x0,
-0x4,
-0x0,
-0x0,
-0x79,
-0x0,
-0x10,
 0x25,
 0x2e,
 0x5f,
@@ -811,10 +595,9 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x4e,
 0x1,
 0x10,
-0x4a,
-0x1e,
-0x2f,
-0x3,
+0x48,
+0x8,
+0x2e,
 0x5f,
 0x53,
 0x42,
@@ -823,420 +606,431 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x43,
 0x49,
 0x30,
-0x49,
-0x53,
-0x41,
-0x5f,
 0x5b,
-0x82,
-0x2c,
-0x53,
-0x4d,
+0x80,
+0x50,
 0x43,
-0x5f,
-0x8,
-0x5f,
-0x48,
-0x49,
-0x44,
-0xc,
-0x6,
-0x10,
-0x0,
-0x1,
-0x8,
-0x5f,
 0x53,
 0x54,
-0x41,
+0x1,
+0xb,
+0x0,
+0xae,
 0xa,
-0xf0,
 0x8,
-0x5f,
+0x5b,
+0x81,
+0x10,
+0x50,
 0x43,
-0x52,
 0x53,
-0x11,
-0x10,
-0xa,
-0xd,
-0x47,
-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xb,
+0x95,
+0x68,
+0xa,
+0x80,
+0x70,
+0x68,
+0x50,
+0x52,
+0x52,
+0x49,
+0xa4,
+0x50,
+0x52,
+0x52,
+0x30,
 0x5b,
 0x82,
-0x46,
-0x4,
-0x43,
-0x4f,
-0x4d,
-0x32,
+0x4c,
+0x7,
+0x4c,
+0x4e,
+0x4b,
+0x41,
 0x8,
 0x5f,
 0x48,
@@ -1245,499 +1039,377 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0xc,
 0x41,
 0xd0,
-0x5,
-0x1,
+0xc,
+0xf,
 0x8,
 0x5f,
 0x55,
 0x49,
 0x44,
-0xa,
-0x2,
-0x14,
-0x18,
-0x5f,
-0x53,
-0x54,
-0x41,
-0x0,
-0x70,
-0x43,
-0x42,
-0x45,
-0x4e,
-0x60,
-0xa0,
-0x6,
-0x93,
-0x60,
 0x0,
-0xa4,
-0x0,
-0xa1,
-0x4,
-0xa4,
-0xa,
-0xf,
 0x8,
 0x5f,
-0x43,
+0x50,
 0x52,
 0x53,
 0x11,
-0x10,
+0x16,
 0xa,
-0xd,
-0x47,
-0x1,
-0xf8,
-0x2,
-0xf8,
-0x2,
+0x13,
+0x89,
+0xe,
+0x0,
+0x9,
+0x3,
+0x5,
+0x0,
+0x0,
+0x0,
+0xa,
+0x0,
+0x0,
+0x0,
+0xb,
+0x0,
 0x0,
-0x8,
-0x22,
-0x8,
 0x0,
 0x79,
 0x0,
-0x10,
-0x48,
-0x8,
-0x2e,
+0x14,
+0xf,
 0x5f,
 0x53,
-0x42,
-0x5f,
+0x54,
+0x41,
+0x0,
+0xa4,
+0x49,
+0x51,
+0x53,
+0x54,
 0x50,
-0x43,
+0x52,
+0x51,
+0x30,
+0x14,
+0x11,
+0x5f,
+0x44,
 0x49,
+0x53,
+0x0,
+0x7d,
+0x50,
+0x52,
+0x51,
 0x30,
-0x5b,
+0xa,
 0x80,
 0x50,
+0x52,
+0x51,
+0x30,
+0x14,
+0xf,
+0x5f,
 0x43,
+0x52,
 0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
 0x51,
-0x31,
-0x8,
+0x32,
+0x14,
+0x11,
+0x5f,
+0x44,
+0x49,
+0x53,
+0x0,
+0x7d,
 0x50,
 0x52,
 0x51,
 0x32,
-0x8,
+0xa,
+0x80,
 0x50,
 0x52,
 0x51,
-0x33,
-0x8,
+0x32,
 0x14,
-0x13,
-0x49,
-0x51,
+0xf,
+0x5f,
+0x43,
+0x52,
 0x53,
-0x54,
-0x1,
-0xa0,
-0x9,
-0x7b,
-0xa,
-0x80,
-0x68,
 0x0,
 0xa4,
-0xa,
-0x9,
-0xa4,
-0xa,
-0xb,
-0x14,
-0x36,
 0x49,
 0x51,
 0x43,
 0x52,
-0x9,
-0x8,
 0x50,
 0x52,
+0x51,
+0x32,
+0x14,
+0x17,
+0x5f,
+0x53,
 0x52,
-0x30,
-0x11,
-0xe,
-0xa,
-0xb,
-0x89,
-0x6,
-0x0,
-0x9,
+0x53,
 0x1,
-0x0,
-0x0,
-0x0,
-0x0,
-0x79,
-0x0,
 0x8a,
-0x50,
-0x52,
-0x52,
-0x30,
+0x68,
 0xa,
 0x5,
 0x50,
 0x52,
 0x52,
 0x49,
-0xa0,
-0xb,
-0x95,
-0x68,
-0xa,
-0x80,
 0x70,
-0x68,
 0x50,
 0x52,
 0x52,
 0x49,
-0xa4,
 0x50,
 0x52,
-0x52,
-0x30,
+0x51,
+0x32,
 0x5b,
 0x82,
-0x4c,
+0x4d,
 0x7,
 0x4c,
 0x4e,
 0x4b,
-0x41,
+0x44,
 0x8,
 0x5f,
 0x48,
@@ -1753,7 +1425,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x55,
 0x49,
 0x44,
-0x0,
+0xa,
+0x3,
 0x8,
 0x5f,
 0x50,
@@ -1797,7 +1470,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x50,
 0x52,
 0x51,
-0x30,
+0x33,
 0x14,
 0x11,
 0x5f,
@@ -1809,13 +1482,13 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x50,
 0x52,
 0x51,
-0x30,
+0x33,
 0xa,
 0x80,
 0x50,
 0x52,
 0x51,
-0x30,
+0x33,
 0x14,
 0xf,
 0x5f,
@@ -1831,7 +1504,7 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x50,
 0x52,
 0x51,
-0x30,
+0x33,
 0x14,
 0x17,
 0x5f,
@@ -1855,15 +1528,15 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x50,
 0x52,
 0x51,
-0x30,
+0x33,
 0x5b,
 0x82,
-0x4c,
-0x7,
+0x4f,
+0x4,
 0x4c,
 0x4e,
 0x4b,
-0x42,
+0x53,
 0x8,
 0x5f,
 0x48,
@@ -1879,458 +1552,219 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x55,
 0x49,
 0x44,
-0x1,
+0xa,
+0x4,
 0x8,
 0x5f,
 0x50,
 0x52,
 0x53,
 0x11,
-0x16,
+0xe,
 0xa,
-0x13,
+0xb,
 0x89,
-0xe,
+0x6,
 0x0,
 0x9,
-0x3,
-0x5,
-0x0,
-0x0,
-0x0,
-0xa,
-0x0,
-0x0,
-0x0,
-0xb,
+0x1,
+0x9,
 0x0,
 0x0,
 0x0,
 0x79,
 0x0,
 0x14,
-0xf,
+0x9,
 0x5f,
 0x53,
 0x54,
 0x41,
 0x0,
 0xa4,
-0x49,
-0x51,
-0x53,
-0x54,
-0x50,
-0x52,
-0x51,
-0x31,
+0xa,
+0xb,
 0x14,
-0x11,
+0x6,
 0x5f,
 0x44,
 0x49,
 0x53,
 0x0,
-0x7d,
-0x50,
-0x52,
-0x51,
-0x31,
-0xa,
-0x80,
-0x50,
-0x52,
-0x51,
-0x31,
 0x14,
-0xf,
+0xb,
 0x5f,
 0x43,
 0x52,
 0x53,
 0x0,
 0xa4,
-0x49,
-0x51,
-0x43,
-0x52,
+0x5f,
 0x50,
 0x52,
-0x51,
-0x31,
+0x53,
 0x14,
-0x17,
+0x6,
 0x5f,
 0x53,
 0x52,
 0x53,
 0x1,
-0x8a,
-0x68,
-0xa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x50,
-0x52,
-0x51,
-0x33,
-0xa,
-0x80,
-0x50,
-0x52,
-0x51,
-0x33,
-0x14,
-0xf,
-0x5f,
-0x43,
-0x52,
-0x53,
-0x0,
-0xa4,
-0x49,
-0x51,
-0x43,
-0x52,
-0x50,
-0x52,
-0x51,
-0x33,
-0x14,
-0x17,
-0x5f,
-0x53,
-0x52,
-0x53,
-0x1,
-0x8a,
-0x68,
-0xa,
-0x5,
-0x50,
-0x52,
-0x52,
-0x49,
-0x70,
-0x50,
-0x52,
-0x52,
-0x49,
-0x50,
-0x52,
-0x51,
-0x33,
-0x5b,
-0x82,
-0x4f,
-0x4,
-0x4c,
-0x4e,
-0x4b,
-0x53,
-0x8,
-0x5f,
-0x48,
-0x49,
-0x44,
-0xc,
-0x41,
-0xd0,
-0xc,
-0xf,
-0x8,
-0x5f,
-0x55,
-0x49,
-0x44,
-0xa,
-0x4,
-0x8,
-0x5f,
-0x50,
-0x52,
-0x53,
-0x11,
-0xe,
-0xa,
-0xb,
-0x89,
-0x6,
-0x0,
-0x9,
-0x1,
-0x9,
-0x0,
-0x0,
-0x0,
-0x79,
-0x0,
-0x14,
-0x9,
-0x5f,
-0x53,
-0x54,
-0x41,
-0x0,
-0xa4,
-0xa,
-0xb,
-0x14,
-0x6,
-0x5f,
-0x44,
-0x49,
-0x53,
-0x0,
-0x14,
-0xb,
-0x5f,
-0x43,
-0x52,
-0x53,
-0x0,
-0xa4,
-0x5f,
-0x50,
-0x52,
-0x53,
-0x14,
-0x6,
-0x5f,
-0x53,
-0x52,
-0x53,
-0x1,
-0x10,
-0x42,
-0x11,
-0x5f,
-0x53,
-0x42,
-0x5f,
-0x14,
-0x35,
-0x43,
-0x50,
-0x4d,
-0x41,
-0x1,
 0x70,
 0x83,
 0x88,
@@ -2338,1045 +1772,119 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x50,
 0x4f,
 0x4e,
-0x68,
-0x0,
-0x60,
-0x70,
-0x11,
-0xb,
-0xa,
-0x8,
-0x0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58,
-0x4c,
-0x4d,
+0x44,
+0xc,
 0x41,
-0x58,
-0x5f,
-0x70,
-0x4c,
-0x45,
-0x4e,
-0x4c,
-0x4c,
-0x45,
-0x4e,
+0xd0,
+0xa,
+0x6,
+0x8,
 0x5f,
-0x5b,
-0x27,
-0x4d,
-0x4c,
-0x43,
-0x4b,
-0xa4,
-0x4d,
-0x52,
-0x33,
-0x32,
-0x5b,
-0x27,
-0x4d,
-0x4c,
 0x43,
-0x4b,
-0xa4,
-0x4d,
 0x52,
-0x36,
-0x34,
-0x14,
-0x24,
-0x4d,
-0x50,
-0x58,
-0x4d,
+0x53,
+0x11,
+0xd,
+0xa,
+0xa,
+0x47,
 0x1,
-0x5b,
-0x23,
-0x4d,
-0x4c,
-0x43,
-0x4b,
-0xff,
-0xff,
-0x70,
-0x99,
-0x68,
 0x0,
-0x4d,
-0x53,
-0x45,
-0x4c,
-0x70,
-0x4d,
-0x50,
-0x58,
+0xaf,
+0x0,
+0xaf,
+0x0,
+0x20,
+0x79,
+0x0,
+0x8,
 0x5f,
-0x60,
-0x5b,
-0x27,
-0x4d,
-0x4c,
-0x43,
-0x4b,
-0xa4,
-0x60,
-0x14,
-0x28,
-0x4d,
-0x4f,
 0x53,
 0x54,
-0x4,
-0x5b,
-0x23,
-0x4d,
-0x4c,
-0x43,
-0x4b,
-0xff,
-0xff,
-0x70,
-0x99,
-0x68,
-0x0,
-0x4d,
-0x53,
-0x45,
-0x4c,
-0x70,
-0x69,
-0x4d,
-0x4f,
-0x45,
-0x56,
-0x70,
-0x6a,
-0x4d,
-0x4f,
-0x53,
-0x43,
-0x5b,
-0x27,
-0x4d,
-0x4c,
-0x43,
-0x4b,
+0x41,
+0xa,
+0xb,
 0x10,
 0x45,
 0xd,
@@ -3592,6 +2100,3 @@ static unsigned char AcpiDsdtAmlCode[] = {
 0x46,
 0x0
 };
-static unsigned short piix_dsdt_applesmc_sta[] = {
-0x353
-};
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index e1cee5d..398aec1 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -34,7 +34,6 @@ DefinitionBlock (
     )
 {
 
-#include "acpi-dsdt-dbug.dsl"
 
     Scope(\_SB) {
         OperationRegion(PCST, SystemIO, 0xae00, 0x0c)
@@ -132,8 +131,6 @@ DefinitionBlock (
     }
 
 #include "acpi-dsdt-pci-crs.dsl"
-#include "acpi-dsdt-hpet.dsl"
-
 
 /****************************************************************
  * LPC ISA bridge
@@ -168,9 +165,6 @@ DefinitionBlock (
         }
     }
 
-#define DSDT_APPLESMC_STA q35_dsdt_applesmc_sta
-#include "acpi-dsdt-isa.dsl"
-
 
 /****************************************************************
  * PCI IRQs
@@ -405,7 +399,6 @@ DefinitionBlock (
 #include "hw/acpi/pc-hotplug.h"
 #define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE
 #include "acpi-dsdt-cpu-hotplug.dsl"
-#include "acpi-dsdt-mem-hotplug.dsl"
 
 
 /****************************************************************
@@ -422,6 +415,8 @@ DefinitionBlock (
             // CPU hotplug event
             \_SB.PRSC()
         }
+        External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE, DeviceObj)
+        External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj)
         Method(_E03) {
             // Memory hotplug event
             \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
diff --git a/hw/i386/q35-acpi-dsdt.hex.generated b/hw/i386/q35-acpi-dsdt.hex.generated
index 4807bdf..a82b9a7 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,
-0xf6,
-0x1f,
+0x22,
+0x1a,
 0x0,
 0x0,
 0x1,
-0x91,
+0xba,
 0x42,
 0x58,
 0x50,
@@ -31,85 +31,11 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x4e,
 0x54,
 0x4c,
-0x28,
-0x8,
-0x14,
+0x13,
+0x9,
+0x12,
 0x20,
 0x10,
-0x49,
-0x4,
-0x5c,
-0x0,
-0x5b,
-0x80,
-0x44,
-0x42,
-0x47,
-0x5f,
-0x1,
-0xb,
-0x2,
-0x4,
-0x1,
-0x5b,
-0x81,
-0xb,
-0x44,
-0x42,
-0x47,
-0x5f,
-0x1,
-0x44,
-0x42,
-0x47,
-0x42,
-0x8,
-0x14,
-0x2c,
-0x44,
-0x42,
-0x55,
-0x47,
-0x1,
-0x98,
-0x68,
-0x60,
-0x96,
-0x60,
-0x60,
-0x74,
-0x87,
-0x60,
-0x1,
-0x61,
-0x70,
-0x0,
-0x62,
-0xa2,
-0x10,
-0x95,
-0x62,
-0x61,
-0x70,
-0x83,
-0x88,
-0x60,
-0x62,
-0x0,
-0x44,
-0x42,
-0x47,
-0x42,
-0x75,
-0x62,
-0x70,
-0xa,
-0xa,
-0x44,
-0x42,
-0x47,
-0x42,
-0x10,
 0x29,
 0x5f,
 0x53,
@@ -711,148 +637,6 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xa4,
 0x60,
 0x10,
-0x4d,
-0x8,
-0x5f,
-0x53,
-0x42,
-0x5f,
-0x5b,
-0x82,
-0x45,
-0x8,
-0x48,
-0x50,
-0x45,
-0x54,
-0x8,
-0x5f,
-0x48,
-0x49,
-0x44,
-0xc,
-0x41,
-0xd0,
-0x1,
-0x3,
-0x8,
-0x5f,
-0x55,
-0x49,
-0x44,
-0x0,
-0x5b,
-0x80,
-0x48,
-0x50,
-0x54,
-0x4d,
-0x0,
-0xc,
-0x0,
-0x0,
-0xd0,
-0xfe,
-0xb,
-0x0,
-0x4,
-0x5b,
-0x81,
-0x10,
-0x48,
-0x50,
-0x54,
-0x4d,
-0x13,
-0x56,
-0x45,
-0x4e,
-0x44,
-0x20,
-0x50,
-0x52,
-0x44,
-0x5f,
-0x20,
-0x14,
-0x36,
-0x5f,
-0x53,
-0x54,
-0x41,
-0x0,
-0x70,
-0x56,
-0x45,
-0x4e,
-0x44,
-0x60,
-0x70,
-0x50,
-0x52,
-0x44,
-0x5f,
-0x61,
-0x7a,
-0x60,
-0xa,
-0x10,
-0x60,
-0xa0,
-0xc,
-0x91,
-0x93,
-0x60,
-0x0,
-0x93,
-0x60,
-0xb,
-0xff,
-0xff,
-0xa4,
-0x0,
-0xa0,
-0xe,
-0x91,
-0x93,
-0x61,
-0x0,
-0x94,
-0x61,
-0xc,
-0x0,
-0xe1,
-0xf5,
-0x5,
-0xa4,
-0x0,
-0xa4,
-0xa,
-0xf,
-0x8,
-0x5f,
-0x43,
-0x52,
-0x53,
-0x11,
-0x11,
-0xa,
-0xe,
-0x86,
-0x9,
-0x0,
-0x0,
-0x0,
-0x0,
-0xd0,
-0xfe,
-0x0,
-0x4,
-0x0,
-0x0,
-0x79,
-0x0,
-0x10,
 0x4c,
 0x7,
 0x2e,
@@ -977,597 +761,338 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x45,
 0x4e,
 0x1,
+0x8,
+0x50,
+0x49,
+0x43,
+0x46,
+0x0,
+0x14,
+0xc,
+0x5f,
+0x50,
+0x49,
+0x43,
+0x1,
+0x70,
+0x68,
+0x50,
+0x49,
+0x43,
+0x46,
 0x10,
-0x4a,
-0x1e,
-0x2f,
-0x3,
+0x8e,
+0x55,
+0x1,
 0x5f,
 0x53,
 0x42,
 0x5f,
+0x10,
+0x43,
+0xea,
 0x50,
 0x43,
 0x49,
 0x30,
-0x49,
-0x53,
-0x41,
-0x5f,
-0x5b,
-0x82,
-0x2c,
-0x53,
-0x4d,
-0x43,
-0x5f,
 0x8,
-0x5f,
-0x48,
-0x49,
-0x44,
-0xc,
-0x6,
-0x10,
-0x0,
-0x1,
-0x8,
-0x5f,
-0x53,
-0x54,
-0x41,
-0xa,
-0xf0,
-0x8,
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,
-0xf8,
-0x2,
-0xf8,
-0x2,
-0x0,
-0x8,
-0x22,
-0x8,
-0x0,
-0x79,
-0x0,
-0x8,
-0x50,
-0x49,
-0x43,
-0x46,
-0x0,
-0x14,
-0xc,
-0x5f,
-0x50,
-0x49,
-0x43,
-0x1,
-0x70,
-0x68,
-0x50,
-0x49,
-0x43,
-0x46,
-0x10,
-0x8e,
-0x55,
-0x1,
-0x5f,
-0x53,
-0x42,
-0x5f,
-0x10,
-0x43,
-0xea,
-0x50,
-0x43,
-0x49,
-0x30,
-0x8,
-0x50,
-0x52,
-0x54,
-0x50,
-0x12,
-0x4b,
-0x73,
-0x80,
-0x12,
-0xb,
-0x4,
-0xb,
-0xff,
-0xff,
-0x0,
-0x4c,
-0x4e,
-0x4b,
-0x45,
-0x0,
-0x12,
-0xb,
-0x4,
-0xb,
-0xff,
-0xff,
-0x1,
-0x4c,
-0x4e,
-0x4b,
-0x46,
-0x0,
-0x12,
-0xc,
-0x4,
-0xb,
-0xff,
-0xff,
-0xa,
-0x2,
-0x4c,
-0x4e,
-0x4b,
-0x47,
-0x0,
-0x12,
-0xc,
-0x4,
-0xb,
-0xff,
-0xff,
-0xa,
-0x3,
-0x4c,
-0x4e,
-0x4b,
-0x48,
-0x0,
-0x12,
-0xd,
+0x12,
+0xd,
 0x4,
 0xc,
 0xff,
 0xff,
-0x1,
+0x5,
 0x0,
 0x0,
 0x4c,
@@ -1581,7 +1106,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x1,
+0x5,
 0x0,
 0x1,
 0x4c,
@@ -1595,7 +1120,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x1,
+0x5,
 0x0,
 0xa,
 0x2,
@@ -1610,7 +1135,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x1,
+0x5,
 0x0,
 0xa,
 0x3,
@@ -1625,7 +1150,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x2,
+0x6,
 0x0,
 0x0,
 0x4c,
@@ -1639,7 +1164,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x2,
+0x6,
 0x0,
 0x1,
 0x4c,
@@ -1653,7 +1178,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x2,
+0x6,
 0x0,
 0xa,
 0x2,
@@ -1668,7 +1193,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x2,
+0x6,
 0x0,
 0xa,
 0x3,
@@ -1683,7 +1208,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x3,
+0x7,
 0x0,
 0x0,
 0x4c,
@@ -1697,7 +1222,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x3,
+0x7,
 0x0,
 0x1,
 0x4c,
@@ -1711,7 +1236,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x3,
+0x7,
 0x0,
 0xa,
 0x2,
@@ -1726,7 +1251,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x3,
+0x7,
 0x0,
 0xa,
 0x3,
@@ -1741,7 +1266,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x4,
+0x8,
 0x0,
 0x0,
 0x4c,
@@ -1755,7 +1280,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x4,
+0x8,
 0x0,
 0x1,
 0x4c,
@@ -1769,7 +1294,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x4,
+0x8,
 0x0,
 0xa,
 0x2,
@@ -1784,7 +1309,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x4,
+0x8,
 0x0,
 0xa,
 0x3,
@@ -1799,7 +1324,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x5,
+0x9,
 0x0,
 0x0,
 0x4c,
@@ -1813,7 +1338,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x5,
+0x9,
 0x0,
 0x1,
 0x4c,
@@ -1827,7 +1352,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x5,
+0x9,
 0x0,
 0xa,
 0x2,
@@ -1842,7 +1367,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x5,
+0x9,
 0x0,
 0xa,
 0x3,
@@ -1857,7 +1382,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x6,
+0xa,
 0x0,
 0x0,
 0x4c,
@@ -1871,7 +1396,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x6,
+0xa,
 0x0,
 0x1,
 0x4c,
@@ -1885,7 +1410,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x6,
+0xa,
 0x0,
 0xa,
 0x2,
@@ -1900,7 +1425,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x6,
+0xa,
 0x0,
 0xa,
 0x3,
@@ -1915,7 +1440,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x7,
+0xb,
 0x0,
 0x0,
 0x4c,
@@ -1929,7 +1454,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x7,
+0xb,
 0x0,
 0x1,
 0x4c,
@@ -1943,7 +1468,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x7,
+0xb,
 0x0,
 0xa,
 0x2,
@@ -1958,7 +1483,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x7,
+0xb,
 0x0,
 0xa,
 0x3,
@@ -1973,7 +1498,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x8,
+0xc,
 0x0,
 0x0,
 0x4c,
@@ -1987,7 +1512,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x8,
+0xc,
 0x0,
 0x1,
 0x4c,
@@ -2001,239 +1526,7 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0xc,
 0xff,
 0xff,
-0x8,
-0x0,
-0xa,
-0x2,
-0x4c,
-0x4e,
-0x4b,
-0x47,
-0x0,
-0x12,
-0xe,
-0x4,
-0xc,
-0xff,
-0xff,
-0x8,
-0x0,
-0xa,
-0x3,
-0x4c,
-0x4e,
-0x4b,
-0x48,
-0x0,
-0x12,
-0xd,
-0x4,
-0xc,
-0xff,
-0xff,
-0x9,
-0x0,
-0x0,
-0x4c,
-0x4e,
-0x4b,
-0x46,
-0x0,
-0x12,
-0xd,
-0x4,
-0xc,
-0xff,
-0xff,
-0x9,
-0x0,
-0x1,
-0x4c,
-0x4e,
-0x4b,
-0x47,
-0x0,
-0x12,
-0xe,
-0x4,
-0xc,
-0xff,
-0xff,
-0x9,
-0x0,
-0xa,
-0x2,
-0x4c,
-0x4e,
-0x4b,
-0x48,
-0x0,
-0x12,
-0xe,
-0x4,
-0xc,
-0xff,
-0xff,
-0x9,
-0x0,
-0xa,
-0x3,
-0x4c,
-0x4e,
-0x4b,
-0x45,
-0x0,
-0x12,
-0xd,
-0x4,
-0xc,
-0xff,
-0xff,
-0xa,
-0x0,
-0x0,
-0x4c,
-0x4e,
-0x4b,
-0x47,
-0x0,
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,
+0x4f,
+0x4e,
+0x60,
+0x0,
+0xa0,
+0xa,
+0x93,
+0x63,
+0x1,
+0x4e,
+0x54,
+0x46,
+0x59,
+0x60,
+0x1,
+0xa1,
+0x8,
+0x4e,
+0x54,
+0x46,
+0x59,
+0x60,
+0xa,
+0x3,
+0x75,
+0x60,
 0x5b,
-0x27,
-0x4d,
-0x4c,
+0x82,
+0x29,
+0x50,
+0x52,
+0x45,
+0x53,
+0x8,
+0x5f,
+0x48,
+0x49,
+0x44,
+0xc,
+0x41,
+0xd0,
+0xa,
+0x6,
+0x8,
+0x5f,
 0x43,
-0x4b,
+0x52,
+0x53,
+0x11,
+0xd,
+0xa,
+0xa,
+0x47,
+0x1,
+0xd8,
+0xc,
+0xd8,
+0xc,
+0x0,
+0x20,
+0x79,
+0x0,
+0x8,
+0x5f,
+0x53,
+0x54,
+0x41,
+0xa,
+0xb,
 0x10,
 0x42,
 0xa,
@@ -8182,6 +6690,3 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
 0x46,
 0x0
 };
-static unsigned short q35_dsdt_applesmc_sta[] = {
-0x3fa
-};
diff --git a/tests/acpi-test-data/pc/DSDT b/tests/acpi-test-data/pc/DSDT
index 9bcc9ba9540f768afeba95231229e093b538d020..76edb15b23cf1f9a0fcdb17807492553c1115b61 100644
GIT binary patch
delta 69
zcmV-L0J{Is9@8EQL{mgmQx5<D0fLbV8?kS)0h6x+eX|z@3k8!i4c3t*N&`*^T$3XL
bi~~y^T(d3%=>Y>lF<i4G3J(Lb2@XdA&e;<+

delta 67
zcmV-J0KEUx9?%{NL{mgmP!9kA0i2Nv8<RB%O0gxf0Rl}3lY$70lh*-#0!kjU5eex5
Zvs3~L1p+`Zv;7JW1Cw6|*0T%_M**QT6SDvS

diff --git a/tests/acpi-test-data/q35/DSDT b/tests/acpi-test-data/q35/DSDT
index c30ec0462acee10c55e1035ba0e6798a0739dc35..fb79eb4ed84fc0e95aa7a1eb6c64b941cec321d1 100644
GIT binary patch
delta 70
zcmV-M0J;CZLcu}`L{mgmK_LJD0b`L08?kR$0+Ut)e6zg;h8B}lAES{aN&`*^T$9QI
ci~~y^T(i{!=m7)}K`~sjMH~+Uv-clI0T*f(O8@`>

delta 68
zcmV-K0K5OeLcT%@L{mgmJ|O@A0ez7Q8<Qg%O0gwb0s>74lW-c0lYRnx0}x6cv;P|C
a0kir7h86-qF|+F&4+E2c8KblMA4dVp*A_<r

-- 
1.8.3.1

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

* [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl
  2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
                   ` (2 preceding siblings ...)
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 3/4] pc: move common parts of the DSDT " Paolo Bonzini
@ 2014-12-24 16:07 ` Paolo Bonzini
  2015-01-19 15:26   ` Michael S. Tsirkin
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm Paolo Bonzini
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/acpi-dsdt-common.dsl      | 345 +++++++++++++++++++++++++++++++++++++-
 hw/i386/acpi-dsdt-dbug.dsl        |  41 -----
 hw/i386/acpi-dsdt-hpet.dsl        |  48 ------
 hw/i386/acpi-dsdt-isa.dsl         | 132 ---------------
 hw/i386/acpi-dsdt-mem-hotplug.dsl | 176 -------------------
 5 files changed, 341 insertions(+), 401 deletions(-)
 delete mode 100644 hw/i386/acpi-dsdt-dbug.dsl
 delete mode 100644 hw/i386/acpi-dsdt-hpet.dsl
 delete mode 100644 hw/i386/acpi-dsdt-isa.dsl
 delete mode 100644 hw/i386/acpi-dsdt-mem-hotplug.dsl

diff --git a/hw/i386/acpi-dsdt-common.dsl b/hw/i386/acpi-dsdt-common.dsl
index 1929f8f..19e9753 100644
--- a/hw/i386/acpi-dsdt-common.dsl
+++ b/hw/i386/acpi-dsdt-common.dsl
@@ -24,10 +24,347 @@ DefinitionBlock ("acpi-dsdt-common.aml", "SSDT", 0x01, "BXPC", "BXSSDTCOMM", 0x1
     External(\_SB.PCI0.PCI, DeviceObj)
 
 #include "hw/acpi/pc-hotplug.h"
-#include "acpi-dsdt-dbug.dsl"
-#include "acpi-dsdt-hpet.dsl"
-#include "acpi-dsdt-isa.dsl"
-#include "acpi-dsdt-mem-hotplug.dsl"
+
+/****************************************************************
+ * Debugging
+ ****************************************************************/
+
+    Scope(\) {
+        /* Debug Output */
+        OperationRegion(DBG, SystemIO, 0x0402, 0x01)
+        Field(DBG, ByteAcc, NoLock, Preserve) {
+            DBGB,   8,
+        }
+
+        /* Debug method - use this method to send output to the QEMU
+         * BIOS debug port.  This method handles strings, integers,
+         * and buffers.  For example: DBUG("abc") DBUG(0x123) */
+        Method(DBUG, 1) {
+            ToHexString(Arg0, Local0)
+            ToBuffer(Local0, Local0)
+            Subtract(SizeOf(Local0), 1, Local1)
+            Store(Zero, Local2)
+            While (LLess(Local2, Local1)) {
+                Store(DerefOf(Index(Local0, Local2)), DBGB)
+                Increment(Local2)
+            }
+            Store(0x0A, DBGB)
+        }
+    }
+
+    /****************************************************************
+     * HPET
+     ****************************************************************/
+
+    Scope(\_SB) {
+        Device(HPET) {
+            Name(_HID, EISAID("PNP0103"))
+            Name(_UID, 0)
+            OperationRegion(HPTM, SystemMemory, 0xFED00000, 0x400)
+            Field(HPTM, DWordAcc, Lock, Preserve) {
+                VEND, 32,
+                PRD, 32,
+            }
+            Method(_STA, 0, NotSerialized) {
+                Store(VEND, Local0)
+                Store(PRD, Local1)
+                ShiftRight(Local0, 16, Local0)
+                If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
+                    Return (0x0)
+                }
+                If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
+                    Return (0x0)
+                }
+                Return (0x0F)
+            }
+            Name(_CRS, ResourceTemplate() {
+                Memory32Fixed(ReadOnly,
+                    0xFED00000,         // Address Base
+                    0x00000400,         // Address Length
+                    )
+            })
+        }
+    }
+
+    /* Common legacy ISA style devices. */
+    Scope(\_SB.PCI0.ISA) {
+
+        Device (SMC) {
+            Name(_HID, EisaId("APP0001"))
+            /* _STA will be patched to 0x0B if AppleSMC is present */
+            ACPI_EXTRACT_NAME_BYTE_CONST dsdt_applesmc_sta
+            Name(_STA, 0xF0)
+            Name(_CRS, ResourceTemplate () {
+                IO (Decode16, 0x0300, 0x0300, 0x01, 0x20)
+                IRQNoFlags() { 6 }
+            })
+        }
+
+        Device(RTC) {
+            Name(_HID, EisaId("PNP0B00"))
+            Name(_CRS, ResourceTemplate() {
+                IO(Decode16, 0x0070, 0x0070, 0x10, 0x02)
+                IRQNoFlags() { 8 }
+                IO(Decode16, 0x0072, 0x0072, 0x02, 0x06)
+            })
+        }
+
+        Device(KBD) {
+            Name(_HID, EisaId("PNP0303"))
+            Method(_STA, 0, NotSerialized) {
+                Return (0x0f)
+            }
+            Name(_CRS, ResourceTemplate() {
+                IO(Decode16, 0x0060, 0x0060, 0x01, 0x01)
+                IO(Decode16, 0x0064, 0x0064, 0x01, 0x01)
+                IRQNoFlags() { 1 }
+            })
+        }
+
+        Device(MOU) {
+            Name(_HID, EisaId("PNP0F13"))
+            Method(_STA, 0, NotSerialized) {
+                Return (0x0f)
+            }
+            Name(_CRS, ResourceTemplate() {
+                IRQNoFlags() { 12 }
+            })
+        }
+
+        External(FDEN)
+        Device(FDC0) {
+            Name(_HID, EisaId("PNP0700"))
+            Method(_STA, 0, NotSerialized) {
+                Store(FDEN, Local0)
+                If (LEqual(Local0, 0)) {
+                    Return (0x00)
+                } Else {
+                    Return (0x0F)
+                }
+            }
+            Name(_CRS, ResourceTemplate() {
+                IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
+                IO(Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
+                IRQNoFlags() { 6 }
+                DMA(Compatibility, NotBusMaster, Transfer8) { 2 }
+            })
+        }
+
+        External(LPEN)
+        Device(LPT) {
+            Name(_HID, EisaId("PNP0400"))
+            Method(_STA, 0, NotSerialized) {
+                Store(LPEN, Local0)
+                If (LEqual(Local0, 0)) {
+                    Return (0x00)
+                } Else {
+                    Return (0x0F)
+                }
+            }
+            Name(_CRS, ResourceTemplate() {
+                IO(Decode16, 0x0378, 0x0378, 0x08, 0x08)
+                IRQNoFlags() { 7 }
+            })
+        }
+
+        External(CAEN)
+        Device(COM1) {
+            Name(_HID, EisaId("PNP0501"))
+            Name(_UID, 0x01)
+            Method(_STA, 0, NotSerialized) {
+                Store(CAEN, Local0)
+                If (LEqual(Local0, 0)) {
+                    Return (0x00)
+                } Else {
+                    Return (0x0F)
+                }
+            }
+            Name(_CRS, ResourceTemplate() {
+                IO(Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
+                IRQNoFlags() { 4 }
+            })
+        }
+
+        External(CBEN)
+        Device(COM2) {
+            Name(_HID, EisaId("PNP0501"))
+            Name(_UID, 0x02)
+            Method(_STA, 0, NotSerialized) {
+                Store(CBEN, Local0)
+                If (LEqual(Local0, 0)) {
+                    Return (0x00)
+                } Else {
+                    Return (0x0F)
+                }
+            }
+            Name(_CRS, ResourceTemplate() {
+                IO(Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
+                IRQNoFlags() { 3 }
+            })
+        }
+    }
+
+    External(MEMORY_SLOT_NOTIFY_METHOD, MethodObj)
+
+    Scope(\_SB.PCI0) {
+        Device(MEMORY_HOTPLUG_DEVICE) {
+            Name(_HID, "PNP0A06")
+            Name(_UID, "Memory hotplug resources")
+            External(MEMORY_SLOTS_NUMBER, IntObj)
+
+            /* Memory hotplug IO registers */
+            OperationRegion(MEMORY_HOTPLUG_IO_REGION, SystemIO,
+                            ACPI_MEMORY_HOTPLUG_BASE,
+                            ACPI_MEMORY_HOTPLUG_IO_LEN)
+
+            Name(_CRS, ResourceTemplate() {
+                IO(Decode16, ACPI_MEMORY_HOTPLUG_BASE, ACPI_MEMORY_HOTPLUG_BASE,
+                   0, ACPI_MEMORY_HOTPLUG_IO_LEN, IO)
+            })
+
+            Method(_STA, 0) {
+                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
+                    Return(0x0)
+                }
+                /* present, functioning, decoding, not shown in UI */
+                Return(0xB)
+            }
+
+            Field(MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
+                MEMORY_SLOT_ADDR_LOW, 32,  // read only
+                MEMORY_SLOT_ADDR_HIGH, 32, // read only
+                MEMORY_SLOT_SIZE_LOW, 32,  // read only
+                MEMORY_SLOT_SIZE_HIGH, 32, // read only
+                MEMORY_SLOT_PROXIMITY, 32, // read only
+            }
+            Field(MEMORY_HOTPLUG_IO_REGION, ByteAcc, NoLock, Preserve) {
+                Offset(20),
+                MEMORY_SLOT_ENABLED,  1, // 1 if enabled, read only
+                MEMORY_SLOT_INSERT_EVENT, 1, // (read) 1 if has a insert event. (write) 1 to clear event
+            }
+
+            Mutex (MEMORY_SLOT_LOCK, 0)
+            Field (MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
+                MEMORY_SLOT_SLECTOR, 32,  // DIMM selector, write only
+                MEMORY_SLOT_OST_EVENT, 32,  // _OST event code, write only
+                MEMORY_SLOT_OST_STATUS, 32,  // _OST status code, write only
+            }
+
+            Method(MEMORY_SLOT_SCAN_METHOD, 0) {
+                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
+                     Return(Zero)
+                }
+
+                Store(Zero, Local0) // Mem devs iterrator
+                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
+                while (LLess(Local0, MEMORY_SLOTS_NUMBER)) {
+                    Store(Local0, MEMORY_SLOT_SLECTOR) // select Local0 DIMM
+                    If (LEqual(MEMORY_SLOT_INSERT_EVENT, One)) { // Memory device needs check
+                        MEMORY_SLOT_NOTIFY_METHOD(Local0, 1)
+                        Store(1, MEMORY_SLOT_INSERT_EVENT)
+                    }
+                    // TODO: handle memory eject request
+                    Add(Local0, One, Local0) // goto next DIMM
+                }
+                Release(MEMORY_SLOT_LOCK)
+                Return(One)
+            }
+
+            Method(MEMORY_SLOT_STATUS_METHOD, 1) {
+                Store(Zero, Local0)
+
+                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
+                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
+
+                If (LEqual(MEMORY_SLOT_ENABLED, One)) {
+                    Store(0xF, Local0)
+                }
+
+                Release(MEMORY_SLOT_LOCK)
+                Return(Local0)
+            }
+
+            Method(MEMORY_SLOT_CRS_METHOD, 1, Serialized) {
+                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
+                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
+
+                Name(MR64, ResourceTemplate() {
+                    QWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                    Cacheable, ReadWrite,
+                    0x0000000000000000,        // Address Space Granularity
+                    0x0000000000000000,        // Address Range Minimum
+                    0xFFFFFFFFFFFFFFFE,        // Address Range Maximum
+                    0x0000000000000000,        // Address Translation Offset
+                    0xFFFFFFFFFFFFFFFF,        // Address Length
+                    ,, MW64, AddressRangeMemory, TypeStatic)
+                })
+
+                CreateDWordField(MR64, 14, MINL)
+                CreateDWordField(MR64, 18, MINH)
+                CreateDWordField(MR64, 38, LENL)
+                CreateDWordField(MR64, 42, LENH)
+                CreateDWordField(MR64, 22, MAXL)
+                CreateDWordField(MR64, 26, MAXH)
+
+                Store(MEMORY_SLOT_ADDR_HIGH, MINH)
+                Store(MEMORY_SLOT_ADDR_LOW, MINL)
+                Store(MEMORY_SLOT_SIZE_HIGH, LENH)
+                Store(MEMORY_SLOT_SIZE_LOW, LENL)
+
+                // 64-bit math: MAX = MIN + LEN - 1
+                Add(MINL, LENL, MAXL)
+                Add(MINH, LENH, MAXH)
+                If (LLess(MAXL, MINL)) {
+                    Add(MAXH, One, MAXH)
+                }
+                If (LLess(MAXL, One)) {
+                    Subtract(MAXH, One, MAXH)
+                }
+                Subtract(MAXL, One, MAXL)
+
+                If (LEqual(MAXH, Zero)){
+                    Name(MR32, ResourceTemplate() {
+                        DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        Cacheable, ReadWrite,
+                        0x00000000,        // Address Space Granularity
+                        0x00000000,        // Address Range Minimum
+                        0xFFFFFFFE,        // Address Range Maximum
+                        0x00000000,        // Address Translation Offset
+                        0xFFFFFFFF,        // Address Length
+                        ,, MW32, AddressRangeMemory, TypeStatic)
+                    })
+                    CreateDWordField(MR32, MW32._MIN, MIN)
+                    CreateDWordField(MR32, MW32._MAX, MAX)
+                    CreateDWordField(MR32, MW32._LEN, LEN)
+                    Store(MINL, MIN)
+                    Store(MAXL, MAX)
+                    Store(LENL, LEN)
+
+                    Release(MEMORY_SLOT_LOCK)
+                    Return(MR32)
+                }
+
+                Release(MEMORY_SLOT_LOCK)
+                Return(MR64)
+            }
+
+            Method(MEMORY_SLOT_PROXIMITY_METHOD, 1) {
+                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
+                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
+                Store(MEMORY_SLOT_PROXIMITY, Local0)
+                Release(MEMORY_SLOT_LOCK)
+                Return(Local0)
+            }
+
+            Method(MEMORY_SLOT_OST_METHOD, 4) {
+                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
+                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
+                Store(Arg1, MEMORY_SLOT_OST_EVENT)
+                Store(Arg2, MEMORY_SLOT_OST_STATUS)
+                Release(MEMORY_SLOT_LOCK)
+            }
+        } // Device()
+    } // Scope()
 
 
 /****************************************************************
diff --git a/hw/i386/acpi-dsdt-dbug.dsl b/hw/i386/acpi-dsdt-dbug.dsl
deleted file mode 100644
index 86230f7..0000000
--- a/hw/i386/acpi-dsdt-dbug.dsl
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-/****************************************************************
- * Debugging
- ****************************************************************/
-
-Scope(\) {
-    /* Debug Output */
-    OperationRegion(DBG, SystemIO, 0x0402, 0x01)
-    Field(DBG, ByteAcc, NoLock, Preserve) {
-        DBGB,   8,
-    }
-
-    /* Debug method - use this method to send output to the QEMU
-     * BIOS debug port.  This method handles strings, integers,
-     * and buffers.  For example: DBUG("abc") DBUG(0x123) */
-    Method(DBUG, 1) {
-        ToHexString(Arg0, Local0)
-        ToBuffer(Local0, Local0)
-        Subtract(SizeOf(Local0), 1, Local1)
-        Store(Zero, Local2)
-        While (LLess(Local2, Local1)) {
-            Store(DerefOf(Index(Local0, Local2)), DBGB)
-            Increment(Local2)
-        }
-        Store(0x0A, DBGB)
-    }
-}
diff --git a/hw/i386/acpi-dsdt-hpet.dsl b/hw/i386/acpi-dsdt-hpet.dsl
deleted file mode 100644
index 44961b8..0000000
--- a/hw/i386/acpi-dsdt-hpet.dsl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-/****************************************************************
- * HPET
- ****************************************************************/
-
-Scope(\_SB) {
-    Device(HPET) {
-        Name(_HID, EISAID("PNP0103"))
-        Name(_UID, 0)
-        OperationRegion(HPTM, SystemMemory, 0xFED00000, 0x400)
-        Field(HPTM, DWordAcc, Lock, Preserve) {
-            VEND, 32,
-            PRD, 32,
-        }
-        Method(_STA, 0, NotSerialized) {
-            Store(VEND, Local0)
-            Store(PRD, Local1)
-            ShiftRight(Local0, 16, Local0)
-            If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
-                Return (0x0)
-            }
-            If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
-                Return (0x0)
-            }
-            Return (0x0F)
-        }
-        Name(_CRS, ResourceTemplate() {
-            Memory32Fixed(ReadOnly,
-                0xFED00000,         // Address Base
-                0x00000400,         // Address Length
-                )
-        })
-    }
-}
diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl
deleted file mode 100644
index a8851b0..0000000
--- a/hw/i386/acpi-dsdt-isa.dsl
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Common legacy ISA style devices. */
-Scope(\_SB.PCI0.ISA) {
-
-    Device (SMC) {
-        Name(_HID, EisaId("APP0001"))
-        /* _STA will be patched to 0x0B if AppleSMC is present */
-        ACPI_EXTRACT_NAME_BYTE_CONST dsdt_applesmc_sta
-        Name(_STA, 0xF0)
-        Name(_CRS, ResourceTemplate () {
-            IO (Decode16, 0x0300, 0x0300, 0x01, 0x20)
-            IRQNoFlags() { 6 }
-        })
-    }
-
-    Device(RTC) {
-        Name(_HID, EisaId("PNP0B00"))
-        Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x0070, 0x0070, 0x10, 0x02)
-            IRQNoFlags() { 8 }
-            IO(Decode16, 0x0072, 0x0072, 0x02, 0x06)
-        })
-    }
-
-    Device(KBD) {
-        Name(_HID, EisaId("PNP0303"))
-        Method(_STA, 0, NotSerialized) {
-            Return (0x0f)
-        }
-        Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x0060, 0x0060, 0x01, 0x01)
-            IO(Decode16, 0x0064, 0x0064, 0x01, 0x01)
-            IRQNoFlags() { 1 }
-        })
-    }
-
-    Device(MOU) {
-        Name(_HID, EisaId("PNP0F13"))
-        Method(_STA, 0, NotSerialized) {
-            Return (0x0f)
-        }
-        Name(_CRS, ResourceTemplate() {
-            IRQNoFlags() { 12 }
-        })
-    }
-
-    External(FDEN)
-    Device(FDC0) {
-        Name(_HID, EisaId("PNP0700"))
-        Method(_STA, 0, NotSerialized) {
-            Store(FDEN, Local0)
-            If (LEqual(Local0, 0)) {
-                Return (0x00)
-            } Else {
-                Return (0x0F)
-            }
-        }
-        Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
-            IO(Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
-            IRQNoFlags() { 6 }
-            DMA(Compatibility, NotBusMaster, Transfer8) { 2 }
-        })
-    }
-
-    External(LPEN)
-    Device(LPT) {
-        Name(_HID, EisaId("PNP0400"))
-        Method(_STA, 0, NotSerialized) {
-            Store(LPEN, Local0)
-            If (LEqual(Local0, 0)) {
-                Return (0x00)
-            } Else {
-                Return (0x0F)
-            }
-        }
-        Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x0378, 0x0378, 0x08, 0x08)
-            IRQNoFlags() { 7 }
-        })
-    }
-
-    External(CAEN)
-    Device(COM1) {
-        Name(_HID, EisaId("PNP0501"))
-        Name(_UID, 0x01)
-        Method(_STA, 0, NotSerialized) {
-            Store(CAEN, Local0)
-            If (LEqual(Local0, 0)) {
-                Return (0x00)
-            } Else {
-                Return (0x0F)
-            }
-        }
-        Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
-            IRQNoFlags() { 4 }
-        })
-    }
-
-    External(CBEN)
-    Device(COM2) {
-        Name(_HID, EisaId("PNP0501"))
-        Name(_UID, 0x02)
-        Method(_STA, 0, NotSerialized) {
-            Store(CBEN, Local0)
-            If (LEqual(Local0, 0)) {
-                Return (0x00)
-            } Else {
-                Return (0x0F)
-            }
-        }
-        Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
-            IRQNoFlags() { 3 }
-        })
-    }
-}
diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl
deleted file mode 100644
index 2a36c47..0000000
--- a/hw/i386/acpi-dsdt-mem-hotplug.dsl
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-    External(MEMORY_SLOT_NOTIFY_METHOD, MethodObj)
-
-    Scope(\_SB.PCI0) {
-        Device(MEMORY_HOTPLUG_DEVICE) {
-            Name(_HID, "PNP0A06")
-            Name(_UID, "Memory hotplug resources")
-            External(MEMORY_SLOTS_NUMBER, IntObj)
-
-            /* Memory hotplug IO registers */
-            OperationRegion(MEMORY_HOTPLUG_IO_REGION, SystemIO,
-                            ACPI_MEMORY_HOTPLUG_BASE,
-                            ACPI_MEMORY_HOTPLUG_IO_LEN)
-
-            Name(_CRS, ResourceTemplate() {
-                IO(Decode16, ACPI_MEMORY_HOTPLUG_BASE, ACPI_MEMORY_HOTPLUG_BASE,
-                   0, ACPI_MEMORY_HOTPLUG_IO_LEN, IO)
-            })
-
-            Method(_STA, 0) {
-                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
-                    Return(0x0)
-                }
-                /* present, functioning, decoding, not shown in UI */
-                Return(0xB)
-            }
-
-            Field(MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
-                MEMORY_SLOT_ADDR_LOW, 32,  // read only
-                MEMORY_SLOT_ADDR_HIGH, 32, // read only
-                MEMORY_SLOT_SIZE_LOW, 32,  // read only
-                MEMORY_SLOT_SIZE_HIGH, 32, // read only
-                MEMORY_SLOT_PROXIMITY, 32, // read only
-            }
-            Field(MEMORY_HOTPLUG_IO_REGION, ByteAcc, NoLock, Preserve) {
-                Offset(20),
-                MEMORY_SLOT_ENABLED,  1, // 1 if enabled, read only
-                MEMORY_SLOT_INSERT_EVENT, 1, // (read) 1 if has a insert event. (write) 1 to clear event
-            }
-
-            Mutex (MEMORY_SLOT_LOCK, 0)
-            Field (MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
-                MEMORY_SLOT_SLECTOR, 32,  // DIMM selector, write only
-                MEMORY_SLOT_OST_EVENT, 32,  // _OST event code, write only
-                MEMORY_SLOT_OST_STATUS, 32,  // _OST status code, write only
-            }
-
-            Method(MEMORY_SLOT_SCAN_METHOD, 0) {
-                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
-                     Return(Zero)
-                }
-
-                Store(Zero, Local0) // Mem devs iterrator
-                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
-                while (LLess(Local0, MEMORY_SLOTS_NUMBER)) {
-                    Store(Local0, MEMORY_SLOT_SLECTOR) // select Local0 DIMM
-                    If (LEqual(MEMORY_SLOT_INSERT_EVENT, One)) { // Memory device needs check
-                        MEMORY_SLOT_NOTIFY_METHOD(Local0, 1)
-                        Store(1, MEMORY_SLOT_INSERT_EVENT)
-                    }
-                    // TODO: handle memory eject request
-                    Add(Local0, One, Local0) // goto next DIMM
-                }
-                Release(MEMORY_SLOT_LOCK)
-                Return(One)
-            }
-
-            Method(MEMORY_SLOT_STATUS_METHOD, 1) {
-                Store(Zero, Local0)
-
-                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
-                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
-
-                If (LEqual(MEMORY_SLOT_ENABLED, One)) {
-                    Store(0xF, Local0)
-                }
-
-                Release(MEMORY_SLOT_LOCK)
-                Return(Local0)
-            }
-
-            Method(MEMORY_SLOT_CRS_METHOD, 1, Serialized) {
-                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
-                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
-
-                Name(MR64, ResourceTemplate() {
-                    QWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
-                    Cacheable, ReadWrite,
-                    0x0000000000000000,        // Address Space Granularity
-                    0x0000000000000000,        // Address Range Minimum
-                    0xFFFFFFFFFFFFFFFE,        // Address Range Maximum
-                    0x0000000000000000,        // Address Translation Offset
-                    0xFFFFFFFFFFFFFFFF,        // Address Length
-                    ,, MW64, AddressRangeMemory, TypeStatic)
-                })
-
-                CreateDWordField(MR64, 14, MINL)
-                CreateDWordField(MR64, 18, MINH)
-                CreateDWordField(MR64, 38, LENL)
-                CreateDWordField(MR64, 42, LENH)
-                CreateDWordField(MR64, 22, MAXL)
-                CreateDWordField(MR64, 26, MAXH)
-
-                Store(MEMORY_SLOT_ADDR_HIGH, MINH)
-                Store(MEMORY_SLOT_ADDR_LOW, MINL)
-                Store(MEMORY_SLOT_SIZE_HIGH, LENH)
-                Store(MEMORY_SLOT_SIZE_LOW, LENL)
-
-                // 64-bit math: MAX = MIN + LEN - 1
-                Add(MINL, LENL, MAXL)
-                Add(MINH, LENH, MAXH)
-                If (LLess(MAXL, MINL)) {
-                    Add(MAXH, One, MAXH)
-                }
-                If (LLess(MAXL, One)) {
-                    Subtract(MAXH, One, MAXH)
-                }
-                Subtract(MAXL, One, MAXL)
-
-                If (LEqual(MAXH, Zero)){
-                    Name(MR32, ResourceTemplate() {
-                        DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
-                        Cacheable, ReadWrite,
-                        0x00000000,        // Address Space Granularity
-                        0x00000000,        // Address Range Minimum
-                        0xFFFFFFFE,        // Address Range Maximum
-                        0x00000000,        // Address Translation Offset
-                        0xFFFFFFFF,        // Address Length
-                        ,, MW32, AddressRangeMemory, TypeStatic)
-                    })
-                    CreateDWordField(MR32, MW32._MIN, MIN)
-                    CreateDWordField(MR32, MW32._MAX, MAX)
-                    CreateDWordField(MR32, MW32._LEN, LEN)
-                    Store(MINL, MIN)
-                    Store(MAXL, MAX)
-                    Store(LENL, LEN)
-
-                    Release(MEMORY_SLOT_LOCK)
-                    Return(MR32)
-                }
-
-                Release(MEMORY_SLOT_LOCK)
-                Return(MR64)
-            }
-
-            Method(MEMORY_SLOT_PROXIMITY_METHOD, 1) {
-                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
-                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
-                Store(MEMORY_SLOT_PROXIMITY, Local0)
-                Release(MEMORY_SLOT_LOCK)
-                Return(Local0)
-            }
-
-            Method(MEMORY_SLOT_OST_METHOD, 4) {
-                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
-                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
-                Store(Arg1, MEMORY_SLOT_OST_EVENT)
-                Store(Arg2, MEMORY_SLOT_OST_STATUS)
-                Release(MEMORY_SLOT_LOCK)
-            }
-        } // Device()
-    } // Scope()
-- 
1.8.3.1

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

* [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm
  2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
                   ` (3 preceding siblings ...)
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl Paolo Bonzini
@ 2014-12-24 16:07 ` Paolo Bonzini
  2015-01-19 15:33   ` Michael S. Tsirkin
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 6/4] pc: clean up pre-2.1 compatibility code Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables Paolo Bonzini
  6 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

Add padding after the DSDT.  Tables that vary depending on the
command-line arguments will have to be byte-equivalent across QEMU
versions >= 2.2, while fixed tables (including the DSDT) can be
changed freely.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/acpi-build.c | 19 +++++++++++--------
 hw/i386/pc_piix.c    |  5 +++++
 include/hw/i386/pc.h |  2 ++
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 63f3d80..1bb3222 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -67,8 +67,6 @@
 #define ACPI_BUILD_LEGACY_CPU_AML_SIZE    97
 #define ACPI_BUILD_ALIGN_SIZE             0x1000
 
-#define ACPI_BUILD_TABLE_SIZE             0x20000
-
 /* #define DEBUG_ACPI_BUILD */
 #ifdef DEBUG_ACPI_BUILD
 #define ACPI_BUILD_DPRINTF(fmt, ...)        \
@@ -1614,6 +1612,10 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
     acpi_add_table(table_offsets, tables->table_data);
     build_fadt(tables->table_data, tables->linker, &pm, facs, dsdt);
 
+    if (guest_info->fixed_table_align) {
+        acpi_align_size(tables->table_data, guest_info->fixed_table_align);
+    }
+
     ssdt = tables->table_data->len;
     acpi_add_table(table_offsets, tables->table_data);
     build_ssdt(tables->table_data, tables->linker, &cpu, &pm, guest_info);
@@ -1696,15 +1698,16 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
         }
         g_array_set_size(tables->table_data, legacy_table_size);
     } else {
-        /* Make sure we have a buffer in case we need to resize the tables. */
-        if (tables->table_data->len > ACPI_BUILD_TABLE_SIZE / 2) {
-            /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots.  */
+        /* Suggest upgrading to the newer algorithm if close to the limit.
+         * As of QEMU 2.1, this fired with 160 VCPUs and 255 memory slots.
+         */
+        if (!guest_info->fixed_table_align &&
+            tables->table_data->len > guest_info->acpi_table_align / 2) {
             error_report("Warning: ACPI tables are larger than 64k.");
             error_report("Warning: migration may not work.");
-            error_report("Warning: please remove CPUs, NUMA nodes, "
-                         "memory slots or PCI bridges.");
+            error_report("Warning: please upgrade to a newer machine type.");
         }
-        acpi_align_size(tables->table_data, ACPI_BUILD_TABLE_SIZE);
+        acpi_align_size(tables->table_data, guest_info->acpi_table_align);
     }
 
     acpi_align_size(tables->linker, ACPI_BUILD_ALIGN_SIZE);
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 220f741..16de5c9 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -61,6 +61,8 @@ static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
 
 static bool has_acpi_build = true;
 static int legacy_acpi_table_size;
+static int fixed_table_align = 0;
+static int acpi_table_align = 131072;
 static bool smbios_defaults = true;
 static bool smbios_legacy_mode;
 static bool smbios_uuid_encoded = true;
@@ -165,6 +167,8 @@ static void pc_init1(MachineState *machine,
 
     guest_info->has_acpi_build = has_acpi_build;
     guest_info->legacy_acpi_table_size = legacy_acpi_table_size;
+    guest_info->fixed_table_align = fixed_table_align;
+    guest_info->acpi_table_align = acpi_table_align;
 
     guest_info->isapc_ram_fw = !pci_enabled;
     guest_info->has_reserved_memory = has_reserved_memory;
@@ -362,6 +366,7 @@ static void pc_compat_2_0(MachineState *machine)
      * QEMU 1.7 it is 6414.  For RHEL/CentOS 7.0 it is 6418.
      */
     legacy_acpi_table_size = 6652;
+    acpi_table_align = 4096;
     smbios_legacy_mode = true;
     has_reserved_memory = false;
     pc_set_legacy_acpi_data_size();
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index e475b92..70fb47c 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -102,6 +102,8 @@ struct PcGuestInfo {
     uint64_t *node_cpu;
     FWCfgState *fw_cfg;
     int legacy_acpi_table_size;
+    int fixed_table_align;
+    int acpi_table_align;
     bool has_acpi_build;
     bool has_reserved_memory;
 };
-- 
1.8.3.1

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

* [Qemu-devel] [PATCH v2 6/4] pc: clean up pre-2.1 compatibility code
  2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
                   ` (4 preceding siblings ...)
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm Paolo Bonzini
@ 2014-12-24 16:07 ` Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables Paolo Bonzini
  6 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

Now that the alignment is parameterized, we can share the call to
acpi_align_size between all three (1.7-2.0/2.1/2.2+) sizing algorithms.

Also, with the new rule that SSDT cannot change except with
machine-type compat code, the magic 97 constant for a CPU's
AML size is not anymore "legacy", so rename it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/acpi-build.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 1bb3222..df930b7 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -64,8 +64,8 @@
  * a little bit, there should be plenty of free space since the DSDT
  * shrunk by ~1.5k between QEMU 2.0 and QEMU 2.1.
  */
-#define ACPI_BUILD_LEGACY_CPU_AML_SIZE    97
-#define ACPI_BUILD_ALIGN_SIZE             0x1000
+#define ACPI_BUILD_CPU_AML_SIZE    97
+#define ACPI_BUILD_ALIGN_SIZE      0x1000
 
 /* #define DEBUG_ACPI_BUILD */
 #ifdef DEBUG_ACPI_BUILD
@@ -1688,10 +1688,9 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
          */
         int legacy_aml_len =
             guest_info->legacy_acpi_table_size +
-            ACPI_BUILD_LEGACY_CPU_AML_SIZE * max_cpus;
+            ACPI_BUILD_CPU_AML_SIZE * max_cpus;
         int legacy_table_size =
-            ROUND_UP(tables->table_data->len - aml_len + legacy_aml_len,
-                     ACPI_BUILD_ALIGN_SIZE);
+            tables->table_data->len - aml_len + legacy_aml_len;
         if (tables->table_data->len > legacy_table_size) {
             /* Should happen only with PCI bridges and -M pc-i440fx-2.0.  */
             error_report("Warning: migration may not work.");
@@ -1707,8 +1706,8 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
             error_report("Warning: migration may not work.");
             error_report("Warning: please upgrade to a newer machine type.");
         }
-        acpi_align_size(tables->table_data, guest_info->acpi_table_align);
     }
+    acpi_align_size(tables->table_data, guest_info->acpi_table_align);
 
     acpi_align_size(tables->linker, ACPI_BUILD_ALIGN_SIZE);
 
-- 
1.8.3.1

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

* [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables
  2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
                   ` (5 preceding siblings ...)
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 6/4] pc: clean up pre-2.1 compatibility code Paolo Bonzini
@ 2014-12-24 16:07 ` Paolo Bonzini
  2015-01-19 15:36   ` Michael S. Tsirkin
  6 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

The new algorithm introduced by the previous patch lets us make tables
smaller and avoid migration bugs due to large tables.

Use it for 2.3+ machine types by tweaking the default fixed_table_align
and acpi_table_align values.  At the same time, preserve backwards-compatible
logic for pc-i440fx-2.2.

Without this patch:
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
...
[    0.000000] init_memory_mapping: [mem 0x07000000-0x07fdffff] usable
[    0.000000] RAMDISK: [mem 0x07112000-0x07fdffff]

With this patch:
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007ffafff] usable
[    0.000000] BIOS-e820: [mem 0x0000000007ffb000-0x0000000007ffffff] reserved
...
[    0.000000] init_memory_mapping: [mem 0x07000000-0x07ffafff]
[    0.000000] RAMDISK: [mem 0x07122000-0x07feffff]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/pc_piix.c | 6 ++++--
 hw/i386/pc_q35.c  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 16de5c9..a5e36b9 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -61,8 +61,8 @@ static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
 
 static bool has_acpi_build = true;
 static int legacy_acpi_table_size;
-static int fixed_table_align = 0;
-static int acpi_table_align = 131072;
+static int fixed_table_align = 16384;
+static int acpi_table_align = 4096;
 static bool smbios_defaults = true;
 static bool smbios_legacy_mode;
 static bool smbios_uuid_encoded = true;
@@ -332,6 +332,8 @@ static void pc_compat_2_2(MachineState *machine)
     x86_cpu_compat_set_features("Haswell", FEAT_1_ECX, 0, CPUID_EXT_RDRAND);
     x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, 0, CPUID_EXT_F16C);
     x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, 0, CPUID_EXT_RDRAND);
+    fixed_table_align = 0;
+    acpi_table_align = 131072;
 }
 
 static void pc_compat_2_1(MachineState *machine)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 7ba0535..4fd9527 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -155,10 +155,12 @@ static void pc_q35_init(MachineState *machine)
     guest_info->has_acpi_build = has_acpi_build;
     guest_info->has_reserved_memory = has_reserved_memory;
 
-    /* Migration was not supported in 2.0 for Q35, so do not bother
-     * with this hack (see hw/i386/acpi-build.c).
+    /* Migration was not supported in 2.0 for Q35, so do not bother with
+     * hacks around the ACPI table size (see hw/i386/acpi-build.c).
      */
     guest_info->legacy_acpi_table_size = 0;
+    guest_info->fixed_table_align = 16384;
+    guest_info->acpi_table_align = 4096;
 
     if (smbios_defaults) {
         MachineClass *mc = MACHINE_GET_CLASS(machine);
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
@ 2015-01-19 15:15   ` Igor Mammedov
  2015-01-19 15:41     ` Paolo Bonzini
  2015-01-19 15:31   ` Michael S. Tsirkin
  1 sibling, 1 reply; 27+ messages in thread
From: Igor Mammedov @ 2015-01-19 15:15 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: mst, qemu-devel, dgilbert

On Wed, 24 Dec 2014 17:07:35 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:

> This part of the ACPI tables can vary in size across machine types, but
s/machine types/QEMU versions/ since it doesn't change its size on machine
type.

> does not depend on the command-line.  It is an SSDT just because it is
s/does not/its size does not/

> the same for i440fx and Q35, and making it an SSDT made the code a bit
it's in SSDT because we are patching its values and DSDT were supposed
to stay static (not only size but contents also).
I'd prefer to keep dynamic part in SSDT to maintain the same separation
for now.

> simpler.  However, it also complicates backwards compatibility, so
> merge it with the DSDT.
What are these complications?

> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/i386/acpi-build.c          |  55 +++++++++++++++++++++++++++---------------
>  tests/acpi-test-data/pc/DSDT  | Bin 3592 -> 3920 bytes
>  tests/acpi-test-data/pc/SSDT  | Bin 2279 -> 1951 bytes
>  tests/acpi-test-data/q35/DSDT | Bin 8182 -> 8510 bytes
>  tests/acpi-test-data/q35/SSDT | Bin 560 -> 232 bytes
>  5 files changed, 35 insertions(+), 20 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index a4d0c0c..e723fe1 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1061,26 +1061,18 @@ static void patch_pci_windows(PcPciInfo *pci, uint8_t *start, unsigned size)
>      }
>  }
>  
> +#define SSDT_MISC_SIZE (sizeof(ssdt_misc_aml) - sizeof(AcpiTableHeader))
> +
>  static void
> -build_ssdt(GArray *table_data, GArray *linker,
> -           AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc,
> -           PcPciInfo *pci, PcGuestInfo *guest_info)
> +fill_ssdt_misc(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
> +               PcPciInfo *pci)
>  {
>      MachineState *machine = MACHINE(qdev_get_machine());
>      uint32_t nr_mem = machine->ram_slots;
> -    unsigned acpi_cpus = guest_info->apic_id_limit;
> -    int ssdt_start = table_data->len;
>      uint8_t *ssdt_ptr;
> -    int i;
> -
> -    /* The current AML generator can cover the APIC ID range [0..255],
> -     * inclusive, for VCPU hotplug. */
> -    QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256);
> -    g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT);
>  
>      /* Copy header and patch values in the S3_ / S4_ / S5_ packages */
> -    ssdt_ptr = acpi_data_push(table_data, sizeof(ssdp_misc_aml));
> -    memcpy(ssdt_ptr, ssdp_misc_aml, sizeof(ssdp_misc_aml));
> +    ssdt_ptr = g_memdup(ssdp_misc_aml, sizeof(ssdp_misc_aml));
>      if (pm->s3_disabled) {
>          ssdt_ptr[acpi_s3_name[0]] = 'X';
>      }
> @@ -1099,6 +1091,27 @@ build_ssdt(GArray *table_data, GArray *linker,
>      ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
>                        ssdt_mctrl_nr_slots[0], 32, nr_mem);
>  
> +    memcpy(dest, ssdt_ptr + sizeof(AcpiTableHeader), SSDT_MISC_SIZE);
> +    g_free(ssdt_ptr);
> +}
> +
> +static void
> +build_ssdt(GArray *table_data, GArray *linker,
> +           AcpiCpuInfo *cpu, AcpiPmInfo *pm, PcGuestInfo *guest_info)
> +{
> +    MachineState *machine = MACHINE(qdev_get_machine());
> +    uint32_t nr_mem = machine->ram_slots;
> +    unsigned acpi_cpus = guest_info->apic_id_limit;
> +    int ssdt_start = table_data->len;
> +    int i;
> +
> +    acpi_data_push(table_data, sizeof(AcpiTableHeader));
> +
> +    /* The current AML generator can cover the APIC ID range [0..255],
> +     * inclusive, for VCPU hotplug. */
> +    QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256);
> +    g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT);
> +
>      {
>          GArray *sb_scope = build_alloc_array();
>          uint8_t op = 0x10; /* ScopeOp */
> @@ -1423,18 +1436,21 @@ build_dmar_q35(GArray *table_data, GArray *linker)
>  }
>  
>  static void
> -build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
> +build_dsdt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
> +           AcpiMiscInfo *misc, PcPciInfo *pci)
>  {
>      AcpiTableHeader *dsdt;
> +    size_t size;
>  
>      assert(misc->dsdt_code && misc->dsdt_size);
>  
> -    dsdt = acpi_data_push(table_data, misc->dsdt_size);
> +    size = misc->dsdt_size + SSDT_MISC_SIZE;
> +    dsdt = acpi_data_push(table_data, size);
>      memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
> +    fill_ssdt_misc(((uint8_t *)dsdt) + misc->dsdt_size, pm, misc, pci);
>  
>      memset(dsdt, 0, sizeof *dsdt);
> -    build_header(linker, table_data, dsdt, "DSDT",
> -                 misc->dsdt_size, 1);
> +    build_header(linker, table_data, dsdt, "DSDT", size, 1);
>  }
>  
>  /* Build final rsdt table */
> @@ -1591,7 +1607,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>  
>      /* DSDT is pointed to by FADT */
>      dsdt = tables->table_data->len;
> -    build_dsdt(tables->table_data, tables->linker, &misc);
> +    build_dsdt(tables->table_data, tables->linker, &pm, &misc, &pci);
>  
>      /* Count the size of the DSDT and SSDT, we will need it for legacy
>       * sizing of ACPI tables.
> @@ -1604,8 +1620,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>  
>      ssdt = tables->table_data->len;
>      acpi_add_table(table_offsets, tables->table_data);
> -    build_ssdt(tables->table_data, tables->linker, &cpu, &pm, &misc, &pci,
> -               guest_info);
> +    build_ssdt(tables->table_data, tables->linker, &cpu, &pm, guest_info);
>      aml_len += tables->table_data->len - ssdt;
>  
>      acpi_add_table(table_offsets, tables->table_data);
> diff --git a/tests/acpi-test-data/pc/DSDT b/tests/acpi-test-data/pc/DSDT
> index ee9cc6781cea3a9515b9a176eea3459f8e4d8655..9bcc9ba9540f768afeba95231229e093b538d020 100644
> GIT binary patch
> delta 350
> zcmZ9Iy-ve06os!tsH~fW{wM<jVrL=|uu~eV7&WPhO+iYfn~||AQ-KMIk(B|YyZ}$o
> zSKx_S?34xWbk6y%j<5W3@O_Ax&W!2;u=g)qN6X%1cMe=7nnD2JRtX9>o7I}DbVg`V
> zs;M6!x3nD_i2uRlZ;)q2>Dr)oWV=b9(4gZpX6s3x(t!Kuq1U>zr9<uNc{o4bA$>t=
> zBonEJR6XaY#LRHIlv#8w@|z?{QhSilCIF}&m6(>yIaWOdzeX7z?~^t|SU6IDblz%c
> z;L~rg8}F5wG7czHH+3A|mg>r|#k~tSjY{2*5XbgT`#bCbUR{KqoaV(=`c~fAdRfSA
> Ky+iFg4*UTB4N6r2
> 
> delta 19
> acmca0*CE5@66_Mf!N<VBn6i=UA1?qiYXuDe
> 
> diff --git a/tests/acpi-test-data/pc/SSDT b/tests/acpi-test-data/pc/SSDT
> index 558e4c85b031ec081045aec6cc382a680e9c6009..0dd46c68d186f6cb1fb7ee5ad935945fed4f31e8 100644
> GIT binary patch
> delta 23
> ecmaDZIG>*@IM^j*K05;g<F$!g(wlP`tJncn1_s0c
> 
> delta 352
> zcmZ9Iu};G<5Qfho6w66lQe{A5Wnm%_uu~cfEH$l(O+iYf%gERjF%(!kAszsb@&Y^o
> zkJGoHoD&xC^#A{N`tRho{yGxIWOmH~SnoybFUQ++;5soF0sto^G2CpvzPV0kC<vtn
> zqd?Gn`zVnAgYn-W&nAUygWW^wMstjVj?Wm?qdCC=_k}0C#+~AlP&0ZK&X2axoTDD8
> zM42I$&$-ZYW;tG}ta~N%>m*51I!GED0F;kfP7CH7E1!a2qb-m3(AXg?9I4(ruNBnr
> z;n$)c_litg2ehr~Dh_W7Z53PGxq#!SFi}^C3%Zm3hTX%;MZ#0le9}sv<So^!iE8T|
> MYW6trdGN6F1Ki?DumAu6
> 
> diff --git a/tests/acpi-test-data/q35/DSDT b/tests/acpi-test-data/q35/DSDT
> index ef0c75f4236de3e6f727e21991533f2bf8279dee..c30ec0462acee10c55e1035ba0e6798a0739dc35 100644
> GIT binary patch
> delta 350
> zcmZ9Iu};G<5QfhXD$7ZstunA7MkW#gE6_F;7&WP}O+iYf%gET30Toyoc>$2}0=xk5
> zK+KGkbIJlY{r~@+exLkx^fnNg&D`NO0K0t^pIh_JXl)8yCl(_B_#h=QS}fkbxlSi2
> z2&ERgq2NTDp+No*Mt_4mD~xZ0&JJ~>-NRlhU<|z8#~u#^2%_W;<{mYx$I*0m73~1^
> zP$kOtv3$sdmJ`SERAudRnO`JHlF~uax)7ke({gN>cdWb*e~orL-bCyAF!Q8(Zaq~{
> z!%I+$jd<N;+IgT|RabFzY4n+6vuhu492(ng3vohs((kYvc=VB2QRBQ=%7Ek*)vH1+
> K>pg1T@!$uPnoErU
> 
> delta 19
> acmdnz^v#~jCD<k8n>+&p<FAceZ{z_=+y_Mf
> 
> diff --git a/tests/acpi-test-data/q35/SSDT b/tests/acpi-test-data/q35/SSDT
> index 4e45510181c4038505ae1815b76799a2cd0e8808..3700bcc31e1469d4b9aafbf34963d937200a6f15 100644
> GIT binary patch
> delta 22
> dcmdnM@`8~oIM^lR1p@;Equ)d>>B+f_hXG9s2A2Q;
> 
> delta 351
> zcmZ9Iu};G<5QfhsRF;zhtui37vM}KY*eQ(#mYUSWrXZ!#Wn}EiRA6PQ`T`*30eFLU
> z;01UKo`P~tS>UGs|G(4klfT$|AgoQDYyq&(xj2{&w<o}jv={-vij=}=y<UEElZ;Ui
> zN-TCm!HG6Qf%+c|{{~r_7rqVlj;I^$3HI6nW8n2E_IMyb5G8kpGeXVkc{DlRLVJN`
> zpry8bET1!B)Yx&n(rM>fWj9jFgbq^Hg#hKFQKN!+$I7Sh*BHm+eYCC*Q%|bb_M(Cs
> z-hx`}#ydr7oCn5Lbrnaqg>jlq?|r~=P}puqh)cSY{)Roki;qN0kFtCt1Cn=CuXDYr
> M_o#WtgZbgd4{V`Jg8%>k
> 

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

* Re: [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl Paolo Bonzini
@ 2015-01-19 15:26   ` Michael S. Tsirkin
  2015-01-19 15:33     ` Paolo Bonzini
  0 siblings, 1 reply; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 15:26 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: imammedo, qemu-devel, dgilbert

On Wed, Dec 24, 2014 at 05:07:38PM +0100, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

This isn't a dependency of patches 5 and on, is it?

> ---
>  hw/i386/acpi-dsdt-common.dsl      | 345 +++++++++++++++++++++++++++++++++++++-
>  hw/i386/acpi-dsdt-dbug.dsl        |  41 -----
>  hw/i386/acpi-dsdt-hpet.dsl        |  48 ------
>  hw/i386/acpi-dsdt-isa.dsl         | 132 ---------------
>  hw/i386/acpi-dsdt-mem-hotplug.dsl | 176 -------------------
>  5 files changed, 341 insertions(+), 401 deletions(-)
>  delete mode 100644 hw/i386/acpi-dsdt-dbug.dsl
>  delete mode 100644 hw/i386/acpi-dsdt-hpet.dsl
>  delete mode 100644 hw/i386/acpi-dsdt-isa.dsl
>  delete mode 100644 hw/i386/acpi-dsdt-mem-hotplug.dsl
> 
> diff --git a/hw/i386/acpi-dsdt-common.dsl b/hw/i386/acpi-dsdt-common.dsl
> index 1929f8f..19e9753 100644
> --- a/hw/i386/acpi-dsdt-common.dsl
> +++ b/hw/i386/acpi-dsdt-common.dsl
> @@ -24,10 +24,347 @@ DefinitionBlock ("acpi-dsdt-common.aml", "SSDT", 0x01, "BXPC", "BXSSDTCOMM", 0x1
>      External(\_SB.PCI0.PCI, DeviceObj)
>  
>  #include "hw/acpi/pc-hotplug.h"
> -#include "acpi-dsdt-dbug.dsl"
> -#include "acpi-dsdt-hpet.dsl"
> -#include "acpi-dsdt-isa.dsl"
> -#include "acpi-dsdt-mem-hotplug.dsl"
> +
> +/****************************************************************
> + * Debugging
> + ****************************************************************/
> +
> +    Scope(\) {
> +        /* Debug Output */
> +        OperationRegion(DBG, SystemIO, 0x0402, 0x01)
> +        Field(DBG, ByteAcc, NoLock, Preserve) {
> +            DBGB,   8,
> +        }
> +
> +        /* Debug method - use this method to send output to the QEMU
> +         * BIOS debug port.  This method handles strings, integers,
> +         * and buffers.  For example: DBUG("abc") DBUG(0x123) */
> +        Method(DBUG, 1) {
> +            ToHexString(Arg0, Local0)
> +            ToBuffer(Local0, Local0)
> +            Subtract(SizeOf(Local0), 1, Local1)
> +            Store(Zero, Local2)
> +            While (LLess(Local2, Local1)) {
> +                Store(DerefOf(Index(Local0, Local2)), DBGB)
> +                Increment(Local2)
> +            }
> +            Store(0x0A, DBGB)
> +        }
> +    }
> +
> +    /****************************************************************
> +     * HPET
> +     ****************************************************************/
> +
> +    Scope(\_SB) {
> +        Device(HPET) {
> +            Name(_HID, EISAID("PNP0103"))
> +            Name(_UID, 0)
> +            OperationRegion(HPTM, SystemMemory, 0xFED00000, 0x400)
> +            Field(HPTM, DWordAcc, Lock, Preserve) {
> +                VEND, 32,
> +                PRD, 32,
> +            }
> +            Method(_STA, 0, NotSerialized) {
> +                Store(VEND, Local0)
> +                Store(PRD, Local1)
> +                ShiftRight(Local0, 16, Local0)
> +                If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
> +                    Return (0x0)
> +                }
> +                If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
> +                    Return (0x0)
> +                }
> +                Return (0x0F)
> +            }
> +            Name(_CRS, ResourceTemplate() {
> +                Memory32Fixed(ReadOnly,
> +                    0xFED00000,         // Address Base
> +                    0x00000400,         // Address Length
> +                    )
> +            })
> +        }
> +    }
> +
> +    /* Common legacy ISA style devices. */
> +    Scope(\_SB.PCI0.ISA) {
> +
> +        Device (SMC) {
> +            Name(_HID, EisaId("APP0001"))
> +            /* _STA will be patched to 0x0B if AppleSMC is present */
> +            ACPI_EXTRACT_NAME_BYTE_CONST dsdt_applesmc_sta
> +            Name(_STA, 0xF0)
> +            Name(_CRS, ResourceTemplate () {
> +                IO (Decode16, 0x0300, 0x0300, 0x01, 0x20)
> +                IRQNoFlags() { 6 }
> +            })
> +        }
> +
> +        Device(RTC) {
> +            Name(_HID, EisaId("PNP0B00"))
> +            Name(_CRS, ResourceTemplate() {
> +                IO(Decode16, 0x0070, 0x0070, 0x10, 0x02)
> +                IRQNoFlags() { 8 }
> +                IO(Decode16, 0x0072, 0x0072, 0x02, 0x06)
> +            })
> +        }
> +
> +        Device(KBD) {
> +            Name(_HID, EisaId("PNP0303"))
> +            Method(_STA, 0, NotSerialized) {
> +                Return (0x0f)
> +            }
> +            Name(_CRS, ResourceTemplate() {
> +                IO(Decode16, 0x0060, 0x0060, 0x01, 0x01)
> +                IO(Decode16, 0x0064, 0x0064, 0x01, 0x01)
> +                IRQNoFlags() { 1 }
> +            })
> +        }
> +
> +        Device(MOU) {
> +            Name(_HID, EisaId("PNP0F13"))
> +            Method(_STA, 0, NotSerialized) {
> +                Return (0x0f)
> +            }
> +            Name(_CRS, ResourceTemplate() {
> +                IRQNoFlags() { 12 }
> +            })
> +        }
> +
> +        External(FDEN)
> +        Device(FDC0) {
> +            Name(_HID, EisaId("PNP0700"))
> +            Method(_STA, 0, NotSerialized) {
> +                Store(FDEN, Local0)
> +                If (LEqual(Local0, 0)) {
> +                    Return (0x00)
> +                } Else {
> +                    Return (0x0F)
> +                }
> +            }
> +            Name(_CRS, ResourceTemplate() {
> +                IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
> +                IO(Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
> +                IRQNoFlags() { 6 }
> +                DMA(Compatibility, NotBusMaster, Transfer8) { 2 }
> +            })
> +        }
> +
> +        External(LPEN)
> +        Device(LPT) {
> +            Name(_HID, EisaId("PNP0400"))
> +            Method(_STA, 0, NotSerialized) {
> +                Store(LPEN, Local0)
> +                If (LEqual(Local0, 0)) {
> +                    Return (0x00)
> +                } Else {
> +                    Return (0x0F)
> +                }
> +            }
> +            Name(_CRS, ResourceTemplate() {
> +                IO(Decode16, 0x0378, 0x0378, 0x08, 0x08)
> +                IRQNoFlags() { 7 }
> +            })
> +        }
> +
> +        External(CAEN)
> +        Device(COM1) {
> +            Name(_HID, EisaId("PNP0501"))
> +            Name(_UID, 0x01)
> +            Method(_STA, 0, NotSerialized) {
> +                Store(CAEN, Local0)
> +                If (LEqual(Local0, 0)) {
> +                    Return (0x00)
> +                } Else {
> +                    Return (0x0F)
> +                }
> +            }
> +            Name(_CRS, ResourceTemplate() {
> +                IO(Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
> +                IRQNoFlags() { 4 }
> +            })
> +        }
> +
> +        External(CBEN)
> +        Device(COM2) {
> +            Name(_HID, EisaId("PNP0501"))
> +            Name(_UID, 0x02)
> +            Method(_STA, 0, NotSerialized) {
> +                Store(CBEN, Local0)
> +                If (LEqual(Local0, 0)) {
> +                    Return (0x00)
> +                } Else {
> +                    Return (0x0F)
> +                }
> +            }
> +            Name(_CRS, ResourceTemplate() {
> +                IO(Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
> +                IRQNoFlags() { 3 }
> +            })
> +        }
> +    }
> +
> +    External(MEMORY_SLOT_NOTIFY_METHOD, MethodObj)
> +
> +    Scope(\_SB.PCI0) {
> +        Device(MEMORY_HOTPLUG_DEVICE) {
> +            Name(_HID, "PNP0A06")
> +            Name(_UID, "Memory hotplug resources")
> +            External(MEMORY_SLOTS_NUMBER, IntObj)
> +
> +            /* Memory hotplug IO registers */
> +            OperationRegion(MEMORY_HOTPLUG_IO_REGION, SystemIO,
> +                            ACPI_MEMORY_HOTPLUG_BASE,
> +                            ACPI_MEMORY_HOTPLUG_IO_LEN)
> +
> +            Name(_CRS, ResourceTemplate() {
> +                IO(Decode16, ACPI_MEMORY_HOTPLUG_BASE, ACPI_MEMORY_HOTPLUG_BASE,
> +                   0, ACPI_MEMORY_HOTPLUG_IO_LEN, IO)
> +            })
> +
> +            Method(_STA, 0) {
> +                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
> +                    Return(0x0)
> +                }
> +                /* present, functioning, decoding, not shown in UI */
> +                Return(0xB)
> +            }
> +
> +            Field(MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
> +                MEMORY_SLOT_ADDR_LOW, 32,  // read only
> +                MEMORY_SLOT_ADDR_HIGH, 32, // read only
> +                MEMORY_SLOT_SIZE_LOW, 32,  // read only
> +                MEMORY_SLOT_SIZE_HIGH, 32, // read only
> +                MEMORY_SLOT_PROXIMITY, 32, // read only
> +            }
> +            Field(MEMORY_HOTPLUG_IO_REGION, ByteAcc, NoLock, Preserve) {
> +                Offset(20),
> +                MEMORY_SLOT_ENABLED,  1, // 1 if enabled, read only
> +                MEMORY_SLOT_INSERT_EVENT, 1, // (read) 1 if has a insert event. (write) 1 to clear event
> +            }
> +
> +            Mutex (MEMORY_SLOT_LOCK, 0)
> +            Field (MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
> +                MEMORY_SLOT_SLECTOR, 32,  // DIMM selector, write only
> +                MEMORY_SLOT_OST_EVENT, 32,  // _OST event code, write only
> +                MEMORY_SLOT_OST_STATUS, 32,  // _OST status code, write only
> +            }
> +
> +            Method(MEMORY_SLOT_SCAN_METHOD, 0) {
> +                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
> +                     Return(Zero)
> +                }
> +
> +                Store(Zero, Local0) // Mem devs iterrator
> +                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> +                while (LLess(Local0, MEMORY_SLOTS_NUMBER)) {
> +                    Store(Local0, MEMORY_SLOT_SLECTOR) // select Local0 DIMM
> +                    If (LEqual(MEMORY_SLOT_INSERT_EVENT, One)) { // Memory device needs check
> +                        MEMORY_SLOT_NOTIFY_METHOD(Local0, 1)
> +                        Store(1, MEMORY_SLOT_INSERT_EVENT)
> +                    }
> +                    // TODO: handle memory eject request
> +                    Add(Local0, One, Local0) // goto next DIMM
> +                }
> +                Release(MEMORY_SLOT_LOCK)
> +                Return(One)
> +            }
> +
> +            Method(MEMORY_SLOT_STATUS_METHOD, 1) {
> +                Store(Zero, Local0)
> +
> +                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> +                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> +
> +                If (LEqual(MEMORY_SLOT_ENABLED, One)) {
> +                    Store(0xF, Local0)
> +                }
> +
> +                Release(MEMORY_SLOT_LOCK)
> +                Return(Local0)
> +            }
> +
> +            Method(MEMORY_SLOT_CRS_METHOD, 1, Serialized) {
> +                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> +                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> +
> +                Name(MR64, ResourceTemplate() {
> +                    QWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
> +                    Cacheable, ReadWrite,
> +                    0x0000000000000000,        // Address Space Granularity
> +                    0x0000000000000000,        // Address Range Minimum
> +                    0xFFFFFFFFFFFFFFFE,        // Address Range Maximum
> +                    0x0000000000000000,        // Address Translation Offset
> +                    0xFFFFFFFFFFFFFFFF,        // Address Length
> +                    ,, MW64, AddressRangeMemory, TypeStatic)
> +                })
> +
> +                CreateDWordField(MR64, 14, MINL)
> +                CreateDWordField(MR64, 18, MINH)
> +                CreateDWordField(MR64, 38, LENL)
> +                CreateDWordField(MR64, 42, LENH)
> +                CreateDWordField(MR64, 22, MAXL)
> +                CreateDWordField(MR64, 26, MAXH)
> +
> +                Store(MEMORY_SLOT_ADDR_HIGH, MINH)
> +                Store(MEMORY_SLOT_ADDR_LOW, MINL)
> +                Store(MEMORY_SLOT_SIZE_HIGH, LENH)
> +                Store(MEMORY_SLOT_SIZE_LOW, LENL)
> +
> +                // 64-bit math: MAX = MIN + LEN - 1
> +                Add(MINL, LENL, MAXL)
> +                Add(MINH, LENH, MAXH)
> +                If (LLess(MAXL, MINL)) {
> +                    Add(MAXH, One, MAXH)
> +                }
> +                If (LLess(MAXL, One)) {
> +                    Subtract(MAXH, One, MAXH)
> +                }
> +                Subtract(MAXL, One, MAXL)
> +
> +                If (LEqual(MAXH, Zero)){
> +                    Name(MR32, ResourceTemplate() {
> +                        DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
> +                        Cacheable, ReadWrite,
> +                        0x00000000,        // Address Space Granularity
> +                        0x00000000,        // Address Range Minimum
> +                        0xFFFFFFFE,        // Address Range Maximum
> +                        0x00000000,        // Address Translation Offset
> +                        0xFFFFFFFF,        // Address Length
> +                        ,, MW32, AddressRangeMemory, TypeStatic)
> +                    })
> +                    CreateDWordField(MR32, MW32._MIN, MIN)
> +                    CreateDWordField(MR32, MW32._MAX, MAX)
> +                    CreateDWordField(MR32, MW32._LEN, LEN)
> +                    Store(MINL, MIN)
> +                    Store(MAXL, MAX)
> +                    Store(LENL, LEN)
> +
> +                    Release(MEMORY_SLOT_LOCK)
> +                    Return(MR32)
> +                }
> +
> +                Release(MEMORY_SLOT_LOCK)
> +                Return(MR64)
> +            }
> +
> +            Method(MEMORY_SLOT_PROXIMITY_METHOD, 1) {
> +                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> +                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> +                Store(MEMORY_SLOT_PROXIMITY, Local0)
> +                Release(MEMORY_SLOT_LOCK)
> +                Return(Local0)
> +            }
> +
> +            Method(MEMORY_SLOT_OST_METHOD, 4) {
> +                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> +                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> +                Store(Arg1, MEMORY_SLOT_OST_EVENT)
> +                Store(Arg2, MEMORY_SLOT_OST_STATUS)
> +                Release(MEMORY_SLOT_LOCK)
> +            }
> +        } // Device()
> +    } // Scope()
>  
>  
>  /****************************************************************
> diff --git a/hw/i386/acpi-dsdt-dbug.dsl b/hw/i386/acpi-dsdt-dbug.dsl
> deleted file mode 100644
> index 86230f7..0000000
> --- a/hw/i386/acpi-dsdt-dbug.dsl
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -/*
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> -
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> -
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -/****************************************************************
> - * Debugging
> - ****************************************************************/
> -
> -Scope(\) {
> -    /* Debug Output */
> -    OperationRegion(DBG, SystemIO, 0x0402, 0x01)
> -    Field(DBG, ByteAcc, NoLock, Preserve) {
> -        DBGB,   8,
> -    }
> -
> -    /* Debug method - use this method to send output to the QEMU
> -     * BIOS debug port.  This method handles strings, integers,
> -     * and buffers.  For example: DBUG("abc") DBUG(0x123) */
> -    Method(DBUG, 1) {
> -        ToHexString(Arg0, Local0)
> -        ToBuffer(Local0, Local0)
> -        Subtract(SizeOf(Local0), 1, Local1)
> -        Store(Zero, Local2)
> -        While (LLess(Local2, Local1)) {
> -            Store(DerefOf(Index(Local0, Local2)), DBGB)
> -            Increment(Local2)
> -        }
> -        Store(0x0A, DBGB)
> -    }
> -}
> diff --git a/hw/i386/acpi-dsdt-hpet.dsl b/hw/i386/acpi-dsdt-hpet.dsl
> deleted file mode 100644
> index 44961b8..0000000
> --- a/hw/i386/acpi-dsdt-hpet.dsl
> +++ /dev/null
> @@ -1,48 +0,0 @@
> -/*
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> -
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> -
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -/****************************************************************
> - * HPET
> - ****************************************************************/
> -
> -Scope(\_SB) {
> -    Device(HPET) {
> -        Name(_HID, EISAID("PNP0103"))
> -        Name(_UID, 0)
> -        OperationRegion(HPTM, SystemMemory, 0xFED00000, 0x400)
> -        Field(HPTM, DWordAcc, Lock, Preserve) {
> -            VEND, 32,
> -            PRD, 32,
> -        }
> -        Method(_STA, 0, NotSerialized) {
> -            Store(VEND, Local0)
> -            Store(PRD, Local1)
> -            ShiftRight(Local0, 16, Local0)
> -            If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
> -                Return (0x0)
> -            }
> -            If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
> -                Return (0x0)
> -            }
> -            Return (0x0F)
> -        }
> -        Name(_CRS, ResourceTemplate() {
> -            Memory32Fixed(ReadOnly,
> -                0xFED00000,         // Address Base
> -                0x00000400,         // Address Length
> -                )
> -        })
> -    }
> -}
> diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl
> deleted file mode 100644
> index a8851b0..0000000
> --- a/hw/i386/acpi-dsdt-isa.dsl
> +++ /dev/null
> @@ -1,132 +0,0 @@
> -/*
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> -
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> -
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -/* Common legacy ISA style devices. */
> -Scope(\_SB.PCI0.ISA) {
> -
> -    Device (SMC) {
> -        Name(_HID, EisaId("APP0001"))
> -        /* _STA will be patched to 0x0B if AppleSMC is present */
> -        ACPI_EXTRACT_NAME_BYTE_CONST dsdt_applesmc_sta
> -        Name(_STA, 0xF0)
> -        Name(_CRS, ResourceTemplate () {
> -            IO (Decode16, 0x0300, 0x0300, 0x01, 0x20)
> -            IRQNoFlags() { 6 }
> -        })
> -    }
> -
> -    Device(RTC) {
> -        Name(_HID, EisaId("PNP0B00"))
> -        Name(_CRS, ResourceTemplate() {
> -            IO(Decode16, 0x0070, 0x0070, 0x10, 0x02)
> -            IRQNoFlags() { 8 }
> -            IO(Decode16, 0x0072, 0x0072, 0x02, 0x06)
> -        })
> -    }
> -
> -    Device(KBD) {
> -        Name(_HID, EisaId("PNP0303"))
> -        Method(_STA, 0, NotSerialized) {
> -            Return (0x0f)
> -        }
> -        Name(_CRS, ResourceTemplate() {
> -            IO(Decode16, 0x0060, 0x0060, 0x01, 0x01)
> -            IO(Decode16, 0x0064, 0x0064, 0x01, 0x01)
> -            IRQNoFlags() { 1 }
> -        })
> -    }
> -
> -    Device(MOU) {
> -        Name(_HID, EisaId("PNP0F13"))
> -        Method(_STA, 0, NotSerialized) {
> -            Return (0x0f)
> -        }
> -        Name(_CRS, ResourceTemplate() {
> -            IRQNoFlags() { 12 }
> -        })
> -    }
> -
> -    External(FDEN)
> -    Device(FDC0) {
> -        Name(_HID, EisaId("PNP0700"))
> -        Method(_STA, 0, NotSerialized) {
> -            Store(FDEN, Local0)
> -            If (LEqual(Local0, 0)) {
> -                Return (0x00)
> -            } Else {
> -                Return (0x0F)
> -            }
> -        }
> -        Name(_CRS, ResourceTemplate() {
> -            IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
> -            IO(Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
> -            IRQNoFlags() { 6 }
> -            DMA(Compatibility, NotBusMaster, Transfer8) { 2 }
> -        })
> -    }
> -
> -    External(LPEN)
> -    Device(LPT) {
> -        Name(_HID, EisaId("PNP0400"))
> -        Method(_STA, 0, NotSerialized) {
> -            Store(LPEN, Local0)
> -            If (LEqual(Local0, 0)) {
> -                Return (0x00)
> -            } Else {
> -                Return (0x0F)
> -            }
> -        }
> -        Name(_CRS, ResourceTemplate() {
> -            IO(Decode16, 0x0378, 0x0378, 0x08, 0x08)
> -            IRQNoFlags() { 7 }
> -        })
> -    }
> -
> -    External(CAEN)
> -    Device(COM1) {
> -        Name(_HID, EisaId("PNP0501"))
> -        Name(_UID, 0x01)
> -        Method(_STA, 0, NotSerialized) {
> -            Store(CAEN, Local0)
> -            If (LEqual(Local0, 0)) {
> -                Return (0x00)
> -            } Else {
> -                Return (0x0F)
> -            }
> -        }
> -        Name(_CRS, ResourceTemplate() {
> -            IO(Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
> -            IRQNoFlags() { 4 }
> -        })
> -    }
> -
> -    External(CBEN)
> -    Device(COM2) {
> -        Name(_HID, EisaId("PNP0501"))
> -        Name(_UID, 0x02)
> -        Method(_STA, 0, NotSerialized) {
> -            Store(CBEN, Local0)
> -            If (LEqual(Local0, 0)) {
> -                Return (0x00)
> -            } Else {
> -                Return (0x0F)
> -            }
> -        }
> -        Name(_CRS, ResourceTemplate() {
> -            IO(Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
> -            IRQNoFlags() { 3 }
> -        })
> -    }
> -}
> diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl
> deleted file mode 100644
> index 2a36c47..0000000
> --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl
> +++ /dev/null
> @@ -1,176 +0,0 @@
> -/*
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> -
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> -
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -    External(MEMORY_SLOT_NOTIFY_METHOD, MethodObj)
> -
> -    Scope(\_SB.PCI0) {
> -        Device(MEMORY_HOTPLUG_DEVICE) {
> -            Name(_HID, "PNP0A06")
> -            Name(_UID, "Memory hotplug resources")
> -            External(MEMORY_SLOTS_NUMBER, IntObj)
> -
> -            /* Memory hotplug IO registers */
> -            OperationRegion(MEMORY_HOTPLUG_IO_REGION, SystemIO,
> -                            ACPI_MEMORY_HOTPLUG_BASE,
> -                            ACPI_MEMORY_HOTPLUG_IO_LEN)
> -
> -            Name(_CRS, ResourceTemplate() {
> -                IO(Decode16, ACPI_MEMORY_HOTPLUG_BASE, ACPI_MEMORY_HOTPLUG_BASE,
> -                   0, ACPI_MEMORY_HOTPLUG_IO_LEN, IO)
> -            })
> -
> -            Method(_STA, 0) {
> -                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
> -                    Return(0x0)
> -                }
> -                /* present, functioning, decoding, not shown in UI */
> -                Return(0xB)
> -            }
> -
> -            Field(MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
> -                MEMORY_SLOT_ADDR_LOW, 32,  // read only
> -                MEMORY_SLOT_ADDR_HIGH, 32, // read only
> -                MEMORY_SLOT_SIZE_LOW, 32,  // read only
> -                MEMORY_SLOT_SIZE_HIGH, 32, // read only
> -                MEMORY_SLOT_PROXIMITY, 32, // read only
> -            }
> -            Field(MEMORY_HOTPLUG_IO_REGION, ByteAcc, NoLock, Preserve) {
> -                Offset(20),
> -                MEMORY_SLOT_ENABLED,  1, // 1 if enabled, read only
> -                MEMORY_SLOT_INSERT_EVENT, 1, // (read) 1 if has a insert event. (write) 1 to clear event
> -            }
> -
> -            Mutex (MEMORY_SLOT_LOCK, 0)
> -            Field (MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
> -                MEMORY_SLOT_SLECTOR, 32,  // DIMM selector, write only
> -                MEMORY_SLOT_OST_EVENT, 32,  // _OST event code, write only
> -                MEMORY_SLOT_OST_STATUS, 32,  // _OST status code, write only
> -            }
> -
> -            Method(MEMORY_SLOT_SCAN_METHOD, 0) {
> -                If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
> -                     Return(Zero)
> -                }
> -
> -                Store(Zero, Local0) // Mem devs iterrator
> -                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> -                while (LLess(Local0, MEMORY_SLOTS_NUMBER)) {
> -                    Store(Local0, MEMORY_SLOT_SLECTOR) // select Local0 DIMM
> -                    If (LEqual(MEMORY_SLOT_INSERT_EVENT, One)) { // Memory device needs check
> -                        MEMORY_SLOT_NOTIFY_METHOD(Local0, 1)
> -                        Store(1, MEMORY_SLOT_INSERT_EVENT)
> -                    }
> -                    // TODO: handle memory eject request
> -                    Add(Local0, One, Local0) // goto next DIMM
> -                }
> -                Release(MEMORY_SLOT_LOCK)
> -                Return(One)
> -            }
> -
> -            Method(MEMORY_SLOT_STATUS_METHOD, 1) {
> -                Store(Zero, Local0)
> -
> -                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> -                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> -
> -                If (LEqual(MEMORY_SLOT_ENABLED, One)) {
> -                    Store(0xF, Local0)
> -                }
> -
> -                Release(MEMORY_SLOT_LOCK)
> -                Return(Local0)
> -            }
> -
> -            Method(MEMORY_SLOT_CRS_METHOD, 1, Serialized) {
> -                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> -                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> -
> -                Name(MR64, ResourceTemplate() {
> -                    QWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
> -                    Cacheable, ReadWrite,
> -                    0x0000000000000000,        // Address Space Granularity
> -                    0x0000000000000000,        // Address Range Minimum
> -                    0xFFFFFFFFFFFFFFFE,        // Address Range Maximum
> -                    0x0000000000000000,        // Address Translation Offset
> -                    0xFFFFFFFFFFFFFFFF,        // Address Length
> -                    ,, MW64, AddressRangeMemory, TypeStatic)
> -                })
> -
> -                CreateDWordField(MR64, 14, MINL)
> -                CreateDWordField(MR64, 18, MINH)
> -                CreateDWordField(MR64, 38, LENL)
> -                CreateDWordField(MR64, 42, LENH)
> -                CreateDWordField(MR64, 22, MAXL)
> -                CreateDWordField(MR64, 26, MAXH)
> -
> -                Store(MEMORY_SLOT_ADDR_HIGH, MINH)
> -                Store(MEMORY_SLOT_ADDR_LOW, MINL)
> -                Store(MEMORY_SLOT_SIZE_HIGH, LENH)
> -                Store(MEMORY_SLOT_SIZE_LOW, LENL)
> -
> -                // 64-bit math: MAX = MIN + LEN - 1
> -                Add(MINL, LENL, MAXL)
> -                Add(MINH, LENH, MAXH)
> -                If (LLess(MAXL, MINL)) {
> -                    Add(MAXH, One, MAXH)
> -                }
> -                If (LLess(MAXL, One)) {
> -                    Subtract(MAXH, One, MAXH)
> -                }
> -                Subtract(MAXL, One, MAXL)
> -
> -                If (LEqual(MAXH, Zero)){
> -                    Name(MR32, ResourceTemplate() {
> -                        DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
> -                        Cacheable, ReadWrite,
> -                        0x00000000,        // Address Space Granularity
> -                        0x00000000,        // Address Range Minimum
> -                        0xFFFFFFFE,        // Address Range Maximum
> -                        0x00000000,        // Address Translation Offset
> -                        0xFFFFFFFF,        // Address Length
> -                        ,, MW32, AddressRangeMemory, TypeStatic)
> -                    })
> -                    CreateDWordField(MR32, MW32._MIN, MIN)
> -                    CreateDWordField(MR32, MW32._MAX, MAX)
> -                    CreateDWordField(MR32, MW32._LEN, LEN)
> -                    Store(MINL, MIN)
> -                    Store(MAXL, MAX)
> -                    Store(LENL, LEN)
> -
> -                    Release(MEMORY_SLOT_LOCK)
> -                    Return(MR32)
> -                }
> -
> -                Release(MEMORY_SLOT_LOCK)
> -                Return(MR64)
> -            }
> -
> -            Method(MEMORY_SLOT_PROXIMITY_METHOD, 1) {
> -                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> -                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> -                Store(MEMORY_SLOT_PROXIMITY, Local0)
> -                Release(MEMORY_SLOT_LOCK)
> -                Return(Local0)
> -            }
> -
> -            Method(MEMORY_SLOT_OST_METHOD, 4) {
> -                Acquire(MEMORY_SLOT_LOCK, 0xFFFF)
> -                Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM
> -                Store(Arg1, MEMORY_SLOT_OST_EVENT)
> -                Store(Arg2, MEMORY_SLOT_OST_STATUS)
> -                Release(MEMORY_SLOT_LOCK)
> -            }
> -        } // Device()
> -    } // Scope()
> -- 
> 1.8.3.1
> 
> 

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
  2015-01-19 15:15   ` Igor Mammedov
@ 2015-01-19 15:31   ` Michael S. Tsirkin
  1 sibling, 0 replies; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 15:31 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: imammedo, qemu-devel, dgilbert

On Wed, Dec 24, 2014 at 05:07:35PM +0100, Paolo Bonzini wrote:
> This part of the ACPI tables can vary in size across machine types, but
> does not depend on the command-line.  It is an SSDT just because it is
> the same for i440fx and Q35, and making it an SSDT made the code a bit
> simpler.  However, it also complicates backwards compatibility, so
> merge it with the DSDT.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/i386/acpi-build.c          |  55 +++++++++++++++++++++++++++---------------
>  tests/acpi-test-data/pc/DSDT  | Bin 3592 -> 3920 bytes
>  tests/acpi-test-data/pc/SSDT  | Bin 2279 -> 1951 bytes
>  tests/acpi-test-data/q35/DSDT | Bin 8182 -> 8510 bytes
>  tests/acpi-test-data/q35/SSDT | Bin 560 -> 232 bytes
>  5 files changed, 35 insertions(+), 20 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index a4d0c0c..e723fe1 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1061,26 +1061,18 @@ static void patch_pci_windows(PcPciInfo *pci, uint8_t *start, unsigned size)
>      }
>  }
>  
> +#define SSDT_MISC_SIZE (sizeof(ssdt_misc_aml) - sizeof(AcpiTableHeader))
> +
>  static void
> -build_ssdt(GArray *table_data, GArray *linker,
> -           AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc,
> -           PcPciInfo *pci, PcGuestInfo *guest_info)
> +fill_ssdt_misc(uint8_t *dest, AcpiPmInfo *pm, AcpiMiscInfo *misc,
> +               PcPciInfo *pci)
>  {
>      MachineState *machine = MACHINE(qdev_get_machine());
>      uint32_t nr_mem = machine->ram_slots;
> -    unsigned acpi_cpus = guest_info->apic_id_limit;
> -    int ssdt_start = table_data->len;
>      uint8_t *ssdt_ptr;
> -    int i;
> -
> -    /* The current AML generator can cover the APIC ID range [0..255],
> -     * inclusive, for VCPU hotplug. */
> -    QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256);
> -    g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT);
>  
>      /* Copy header and patch values in the S3_ / S4_ / S5_ packages */
> -    ssdt_ptr = acpi_data_push(table_data, sizeof(ssdp_misc_aml));
> -    memcpy(ssdt_ptr, ssdp_misc_aml, sizeof(ssdp_misc_aml));
> +    ssdt_ptr = g_memdup(ssdp_misc_aml, sizeof(ssdp_misc_aml));
>      if (pm->s3_disabled) {
>          ssdt_ptr[acpi_s3_name[0]] = 'X';
>      }
> @@ -1099,6 +1091,27 @@ build_ssdt(GArray *table_data, GArray *linker,
>      ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
>                        ssdt_mctrl_nr_slots[0], 32, nr_mem);
>  
> +    memcpy(dest, ssdt_ptr + sizeof(AcpiTableHeader), SSDT_MISC_SIZE);
> +    g_free(ssdt_ptr);
> +}

We are trying to avoid low-level memory manipulation
around acpi generation.
Maybe you can rewrite it to push the data into GArray?
After all, that's what rest of the code uses.


> +
> +static void
> +build_ssdt(GArray *table_data, GArray *linker,
> +           AcpiCpuInfo *cpu, AcpiPmInfo *pm, PcGuestInfo *guest_info)
> +{
> +    MachineState *machine = MACHINE(qdev_get_machine());
> +    uint32_t nr_mem = machine->ram_slots;
> +    unsigned acpi_cpus = guest_info->apic_id_limit;
> +    int ssdt_start = table_data->len;
> +    int i;
> +
> +    acpi_data_push(table_data, sizeof(AcpiTableHeader));
> +
> +    /* The current AML generator can cover the APIC ID range [0..255],
> +     * inclusive, for VCPU hotplug. */
> +    QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256);
> +    g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT);
> +
>      {
>          GArray *sb_scope = build_alloc_array();
>          uint8_t op = 0x10; /* ScopeOp */
> @@ -1423,18 +1436,21 @@ build_dmar_q35(GArray *table_data, GArray *linker)
>  }
>  
>  static void
> -build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
> +build_dsdt(GArray *table_data, GArray *linker, AcpiPmInfo *pm,
> +           AcpiMiscInfo *misc, PcPciInfo *pci)
>  {
>      AcpiTableHeader *dsdt;
> +    size_t size;
>  
>      assert(misc->dsdt_code && misc->dsdt_size);
>  
> -    dsdt = acpi_data_push(table_data, misc->dsdt_size);
> +    size = misc->dsdt_size + SSDT_MISC_SIZE;
> +    dsdt = acpi_data_push(table_data, size);
>      memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
> +    fill_ssdt_misc(((uint8_t *)dsdt) + misc->dsdt_size, pm, misc, pci);

I prefer avoiding pointer math above.
If doing pushes here, I would do:

AcpiTableHeader *dsdt = acpi_data_push(table_data, misc->dsdt_size);
AcpiTableHeader *ssdt = acpi_data_push(table_data, SSDT_MISC_SIZE);



>  
>      memset(dsdt, 0, sizeof *dsdt);
> -    build_header(linker, table_data, dsdt, "DSDT",
> -                 misc->dsdt_size, 1);
> +    build_header(linker, table_data, dsdt, "DSDT", size, 1);

You can just save the size at start of function, then replace size
with
    table_data->len - dsdt_start
like we do e.g. for dmar.

>  }
>  
>  /* Build final rsdt table */
> @@ -1591,7 +1607,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>  
>      /* DSDT is pointed to by FADT */
>      dsdt = tables->table_data->len;
> -    build_dsdt(tables->table_data, tables->linker, &misc);
> +    build_dsdt(tables->table_data, tables->linker, &pm, &misc, &pci);
>  
>      /* Count the size of the DSDT and SSDT, we will need it for legacy
>       * sizing of ACPI tables.
> @@ -1604,8 +1620,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>  
>      ssdt = tables->table_data->len;
>      acpi_add_table(table_offsets, tables->table_data);
> -    build_ssdt(tables->table_data, tables->linker, &cpu, &pm, &misc, &pci,
> -               guest_info);
> +    build_ssdt(tables->table_data, tables->linker, &cpu, &pm, guest_info);
>      aml_len += tables->table_data->len - ssdt;
>  
>      acpi_add_table(table_offsets, tables->table_data);
> diff --git a/tests/acpi-test-data/pc/DSDT b/tests/acpi-test-data/pc/DSDT
> index ee9cc6781cea3a9515b9a176eea3459f8e4d8655..9bcc9ba9540f768afeba95231229e093b538d020 100644
> GIT binary patch
> delta 350
> zcmZ9Iy-ve06os!tsH~fW{wM<jVrL=|uu~eV7&WPhO+iYfn~||AQ-KMIk(B|YyZ}$o
> zSKx_S?34xWbk6y%j<5W3@O_Ax&W!2;u=g)qN6X%1cMe=7nnD2JRtX9>o7I}DbVg`V
> zs;M6!x3nD_i2uRlZ;)q2>Dr)oWV=b9(4gZpX6s3x(t!Kuq1U>zr9<uNc{o4bA$>t=
> zBonEJR6XaY#LRHIlv#8w@|z?{QhSilCIF}&m6(>yIaWOdzeX7z?~^t|SU6IDblz%c
> z;L~rg8}F5wG7czHH+3A|mg>r|#k~tSjY{2*5XbgT`#bCbUR{KqoaV(=`c~fAdRfSA
> Ky+iFg4*UTB4N6r2
> 
> delta 19
> acmca0*CE5@66_Mf!N<VBn6i=UA1?qiYXuDe
> 
> diff --git a/tests/acpi-test-data/pc/SSDT b/tests/acpi-test-data/pc/SSDT
> index 558e4c85b031ec081045aec6cc382a680e9c6009..0dd46c68d186f6cb1fb7ee5ad935945fed4f31e8 100644
> GIT binary patch
> delta 23
> ecmaDZIG>*@IM^j*K05;g<F$!g(wlP`tJncn1_s0c
> 
> delta 352
> zcmZ9Iu};G<5Qfho6w66lQe{A5Wnm%_uu~cfEH$l(O+iYf%gERjF%(!kAszsb@&Y^o
> zkJGoHoD&xC^#A{N`tRho{yGxIWOmH~SnoybFUQ++;5soF0sto^G2CpvzPV0kC<vtn
> zqd?Gn`zVnAgYn-W&nAUygWW^wMstjVj?Wm?qdCC=_k}0C#+~AlP&0ZK&X2axoTDD8
> zM42I$&$-ZYW;tG}ta~N%>m*51I!GED0F;kfP7CH7E1!a2qb-m3(AXg?9I4(ruNBnr
> z;n$)c_litg2ehr~Dh_W7Z53PGxq#!SFi}^C3%Zm3hTX%;MZ#0le9}sv<So^!iE8T|
> MYW6trdGN6F1Ki?DumAu6
> 
> diff --git a/tests/acpi-test-data/q35/DSDT b/tests/acpi-test-data/q35/DSDT
> index ef0c75f4236de3e6f727e21991533f2bf8279dee..c30ec0462acee10c55e1035ba0e6798a0739dc35 100644
> GIT binary patch
> delta 350
> zcmZ9Iu};G<5QfhXD$7ZstunA7MkW#gE6_F;7&WP}O+iYf%gET30Toyoc>$2}0=xk5
> zK+KGkbIJlY{r~@+exLkx^fnNg&D`NO0K0t^pIh_JXl)8yCl(_B_#h=QS}fkbxlSi2
> z2&ERgq2NTDp+No*Mt_4mD~xZ0&JJ~>-NRlhU<|z8#~u#^2%_W;<{mYx$I*0m73~1^
> zP$kOtv3$sdmJ`SERAudRnO`JHlF~uax)7ke({gN>cdWb*e~orL-bCyAF!Q8(Zaq~{
> z!%I+$jd<N;+IgT|RabFzY4n+6vuhu492(ng3vohs((kYvc=VB2QRBQ=%7Ek*)vH1+
> K>pg1T@!$uPnoErU
> 
> delta 19
> acmdnz^v#~jCD<k8n>+&p<FAceZ{z_=+y_Mf
> 
> diff --git a/tests/acpi-test-data/q35/SSDT b/tests/acpi-test-data/q35/SSDT
> index 4e45510181c4038505ae1815b76799a2cd0e8808..3700bcc31e1469d4b9aafbf34963d937200a6f15 100644
> GIT binary patch
> delta 22
> dcmdnM@`8~oIM^lR1p@;Equ)d>>B+f_hXG9s2A2Q;
> 
> delta 351
> zcmZ9Iu};G<5QfhsRF;zhtui37vM}KY*eQ(#mYUSWrXZ!#Wn}EiRA6PQ`T`*30eFLU
> z;01UKo`P~tS>UGs|G(4klfT$|AgoQDYyq&(xj2{&w<o}jv={-vij=}=y<UEElZ;Ui
> zN-TCm!HG6Qf%+c|{{~r_7rqVlj;I^$3HI6nW8n2E_IMyb5G8kpGeXVkc{DlRLVJN`
> zpry8bET1!B)Yx&n(rM>fWj9jFgbq^Hg#hKFQKN!+$I7Sh*BHm+eYCC*Q%|bb_M(Cs
> z-hx`}#ydr7oCn5Lbrnaqg>jlq?|r~=P}puqh)cSY{)Roki;qN0kFtCt1Cn=CuXDYr
> M_o#WtgZbgd4{V`Jg8%>k

Binary diffs break whenever I rebase, no need to include them -
just remind in commit log that they need to be updated.


> -- 
> 1.8.3.1
> 
> 

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

* Re: [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm Paolo Bonzini
@ 2015-01-19 15:33   ` Michael S. Tsirkin
  0 siblings, 0 replies; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 15:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: imammedo, qemu-devel, dgilbert

On Wed, Dec 24, 2014 at 05:07:39PM +0100, Paolo Bonzini wrote:
> Add padding after the DSDT.  Tables that vary depending on the
> command-line arguments will have to be byte-equivalent across QEMU
> versions >= 2.2, while fixed tables (including the DSDT) can be
> changed freely.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/i386/acpi-build.c | 19 +++++++++++--------
>  hw/i386/pc_piix.c    |  5 +++++
>  include/hw/i386/pc.h |  2 ++
>  3 files changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 63f3d80..1bb3222 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -67,8 +67,6 @@
>  #define ACPI_BUILD_LEGACY_CPU_AML_SIZE    97
>  #define ACPI_BUILD_ALIGN_SIZE             0x1000
>  
> -#define ACPI_BUILD_TABLE_SIZE             0x20000
> -
>  /* #define DEBUG_ACPI_BUILD */
>  #ifdef DEBUG_ACPI_BUILD
>  #define ACPI_BUILD_DPRINTF(fmt, ...)        \
> @@ -1614,6 +1612,10 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>      acpi_add_table(table_offsets, tables->table_data);
>      build_fadt(tables->table_data, tables->linker, &pm, facs, dsdt);
>  
> +    if (guest_info->fixed_table_align) {
> +        acpi_align_size(tables->table_data, guest_info->fixed_table_align);
> +    }
> +
>      ssdt = tables->table_data->len;
>      acpi_add_table(table_offsets, tables->table_data);
>      build_ssdt(tables->table_data, tables->linker, &cpu, &pm, guest_info);
> @@ -1696,15 +1698,16 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
>          }
>          g_array_set_size(tables->table_data, legacy_table_size);
>      } else {
> -        /* Make sure we have a buffer in case we need to resize the tables. */
> -        if (tables->table_data->len > ACPI_BUILD_TABLE_SIZE / 2) {
> -            /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots.  */
> +        /* Suggest upgrading to the newer algorithm if close to the limit.
> +         * As of QEMU 2.1, this fired with 160 VCPUs and 255 memory slots.
> +         */
> +        if (!guest_info->fixed_table_align &&
> +            tables->table_data->len > guest_info->acpi_table_align / 2) {
>              error_report("Warning: ACPI tables are larger than 64k.");
>              error_report("Warning: migration may not work.");
> -            error_report("Warning: please remove CPUs, NUMA nodes, "
> -                         "memory slots or PCI bridges.");
> +            error_report("Warning: please upgrade to a newer machine type.");
>          }
> -        acpi_align_size(tables->table_data, ACPI_BUILD_TABLE_SIZE);
> +        acpi_align_size(tables->table_data, guest_info->acpi_table_align);
>      }
>  
>      acpi_align_size(tables->linker, ACPI_BUILD_ALIGN_SIZE);
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 220f741..16de5c9 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -61,6 +61,8 @@ static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
>  
>  static bool has_acpi_build = true;
>  static int legacy_acpi_table_size;
> +static int fixed_table_align = 0;
> +static int acpi_table_align = 131072;

I prefer hex please: 0x20000

>  static bool smbios_defaults = true;
>  static bool smbios_legacy_mode;
>  static bool smbios_uuid_encoded = true;
> @@ -165,6 +167,8 @@ static void pc_init1(MachineState *machine,
>  
>      guest_info->has_acpi_build = has_acpi_build;
>      guest_info->legacy_acpi_table_size = legacy_acpi_table_size;
> +    guest_info->fixed_table_align = fixed_table_align;
> +    guest_info->acpi_table_align = acpi_table_align;
>  
>      guest_info->isapc_ram_fw = !pci_enabled;
>      guest_info->has_reserved_memory = has_reserved_memory;
> @@ -362,6 +366,7 @@ static void pc_compat_2_0(MachineState *machine)
>       * QEMU 1.7 it is 6414.  For RHEL/CentOS 7.0 it is 6418.
>       */
>      legacy_acpi_table_size = 6652;
> +    acpi_table_align = 4096;
>      smbios_legacy_mode = true;
>      has_reserved_memory = false;
>      pc_set_legacy_acpi_data_size();
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index e475b92..70fb47c 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -102,6 +102,8 @@ struct PcGuestInfo {
>      uint64_t *node_cpu;
>      FWCfgState *fw_cfg;
>      int legacy_acpi_table_size;
> +    int fixed_table_align;
> +    int acpi_table_align;
>      bool has_acpi_build;
>      bool has_reserved_memory;
>  };
> -- 
> 1.8.3.1
> 
> 

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

* Re: [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl
  2015-01-19 15:26   ` Michael S. Tsirkin
@ 2015-01-19 15:33     ` Paolo Bonzini
  2015-01-19 15:38       ` Michael S. Tsirkin
  0 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2015-01-19 15:33 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: imammedo, qemu-devel, dgilbert



On 19/01/2015 16:26, Michael S. Tsirkin wrote:
> On Wed, Dec 24, 2014 at 05:07:38PM +0100, Paolo Bonzini wrote:
>> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> This isn't a dependency of patches 5 and on, is it?

No, it isn't.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables Paolo Bonzini
@ 2015-01-19 15:36   ` Michael S. Tsirkin
  0 siblings, 0 replies; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 15:36 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: imammedo, qemu-devel, dgilbert

On Wed, Dec 24, 2014 at 05:07:41PM +0100, Paolo Bonzini wrote:
> The new algorithm introduced by the previous patch lets us make tables
> smaller and avoid migration bugs due to large tables.
> 
> Use it for 2.3+ machine types by tweaking the default fixed_table_align
> and acpi_table_align values.  At the same time, preserve backwards-compatible
> logic for pc-i440fx-2.2.
> 
> Without this patch:
> [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
> [    0.000000] BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
> ...
> [    0.000000] init_memory_mapping: [mem 0x07000000-0x07fdffff] usable
> [    0.000000] RAMDISK: [mem 0x07112000-0x07fdffff]
> 
> With this patch:
> [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007ffafff] usable
> [    0.000000] BIOS-e820: [mem 0x0000000007ffb000-0x0000000007ffffff] reserved
> ...
> [    0.000000] init_memory_mapping: [mem 0x07000000-0x07ffafff]
> [    0.000000] RAMDISK: [mem 0x07122000-0x07feffff]
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/i386/pc_piix.c | 6 ++++--
>  hw/i386/pc_q35.c  | 6 ++++--
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 16de5c9..a5e36b9 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -61,8 +61,8 @@ static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
>  
>  static bool has_acpi_build = true;
>  static int legacy_acpi_table_size;
> -static int fixed_table_align = 0;
> -static int acpi_table_align = 131072;
> +static int fixed_table_align = 16384;
> +static int acpi_table_align = 4096;

same here - hex please.

>  static bool smbios_defaults = true;
>  static bool smbios_legacy_mode;
>  static bool smbios_uuid_encoded = true;
> @@ -332,6 +332,8 @@ static void pc_compat_2_2(MachineState *machine)
>      x86_cpu_compat_set_features("Haswell", FEAT_1_ECX, 0, CPUID_EXT_RDRAND);
>      x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, 0, CPUID_EXT_F16C);
>      x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, 0, CPUID_EXT_RDRAND);
> +    fixed_table_align = 0;
> +    acpi_table_align = 131072;
>  }
>  
>  static void pc_compat_2_1(MachineState *machine)
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 7ba0535..4fd9527 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -155,10 +155,12 @@ static void pc_q35_init(MachineState *machine)
>      guest_info->has_acpi_build = has_acpi_build;
>      guest_info->has_reserved_memory = has_reserved_memory;
>  
> -    /* Migration was not supported in 2.0 for Q35, so do not bother
> -     * with this hack (see hw/i386/acpi-build.c).
> +    /* Migration was not supported in 2.0 for Q35, so do not bother with
> +     * hacks around the ACPI table size (see hw/i386/acpi-build.c).
>       */
>      guest_info->legacy_acpi_table_size = 0;
> +    guest_info->fixed_table_align = 16384;
> +    guest_info->acpi_table_align = 4096;
>  
>      if (smbios_defaults) {
>          MachineClass *mc = MACHINE_GET_CLASS(machine);


-- 
MST

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

* Re: [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl
  2015-01-19 15:33     ` Paolo Bonzini
@ 2015-01-19 15:38       ` Michael S. Tsirkin
  0 siblings, 0 replies; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 15:38 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: imammedo, qemu-devel, dgilbert

On Mon, Jan 19, 2015 at 04:33:56PM +0100, Paolo Bonzini wrote:
> 
> 
> On 19/01/2015 16:26, Michael S. Tsirkin wrote:
> > On Wed, Dec 24, 2014 at 05:07:38PM +0100, Paolo Bonzini wrote:
> >> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > This isn't a dependency of patches 5 and on, is it?
> 
> No, it isn't.
> 
> Paolo

In that case maybe you can comment (in commit log too) on why you think
it's preferable to put them all in a single file.

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 15:15   ` Igor Mammedov
@ 2015-01-19 15:41     ` Paolo Bonzini
  2015-01-19 17:14       ` Igor Mammedov
  0 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2015-01-19 15:41 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: mst, qemu-devel, dgilbert



On 19/01/2015 16:15, Igor Mammedov wrote:
> On Wed, 24 Dec 2014 17:07:35 +0100
> Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
>> This part of the ACPI tables can vary in size across machine types, but
> s/machine types/QEMU versions/ since it doesn't change its size on machine
> type.

Right.

>> does not depend on the command-line.  It is an SSDT just because it is
> s/does not/its size does not/

Right.

>> the same for i440fx and Q35, and making it an SSDT made the code a bit
> it's in SSDT because we are patching its values and DSDT were supposed
> to stay static (not only size but contents also).
> I'd prefer to keep dynamic part in SSDT to maintain the same separation
> for now.

The DSDT is being patched anyway for the SMC.  So "the DSDT is dynamic,
the SSDT is static" is not something that happens anyway.  The truth is
"the SSDT (apart from ssdt-misc) defines Devices each of which comes
from a template".  This patch removes the "apart from ssdt-misc" part,
and also moves the patching of the SMC out of the per-machine-type AML,
since it is shared anyway.

>> simpler.  However, it also complicates backwards compatibility, so
>> merge it with the DSDT.
> What are these complications?

The complication arises if we want to make the SSDT exactly the same for
all QEMU versions, given a (machine type, command line) pair.  Then you
either cannot do any change to ssdt-misc, or you have to keep different
copies for each machine type.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 15:41     ` Paolo Bonzini
@ 2015-01-19 17:14       ` Igor Mammedov
  2015-01-19 17:26         ` Paolo Bonzini
  0 siblings, 1 reply; 27+ messages in thread
From: Igor Mammedov @ 2015-01-19 17:14 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: mst, qemu-devel, dgilbert

On Mon, 19 Jan 2015 16:41:26 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:

> 
> 
> On 19/01/2015 16:15, Igor Mammedov wrote:
> > On Wed, 24 Dec 2014 17:07:35 +0100
> > Paolo Bonzini <pbonzini@redhat.com> wrote:
> > 
> >> This part of the ACPI tables can vary in size across machine types, but
> > s/machine types/QEMU versions/ since it doesn't change its size on machine
> > type.
> 
> Right.
> 
> >> does not depend on the command-line.  It is an SSDT just because it is
> > s/does not/its size does not/
> 
> Right.
> 
> >> the same for i440fx and Q35, and making it an SSDT made the code a bit
> > it's in SSDT because we are patching its values and DSDT were supposed
> > to stay static (not only size but contents also).
> > I'd prefer to keep dynamic part in SSDT to maintain the same separation
> > for now.
> 
> The DSDT is being patched anyway for the SMC.  So "the DSDT is dynamic,
> the SSDT is static" is not something that happens anyway.  The truth is
> "the SSDT (apart from ssdt-misc) defines Devices each of which comes
> from a template".  This patch removes the "apart from ssdt-misc" part,
> and also moves the patching of the SMC out of the per-machine-type AML,
> since it is shared anyway.
I'm fine with moving "SMC out of the per-machine-type AML", should be
a separate patch anyway. But patch-able SMC being in DSDT is our mistake
that we allowed it to slip there and should be better moved to SSDT rather
than staying in DSDT and making thing more complex.
It's also candidate for trimming, i.e. dropping it from tables altogether
if device is not present in QEMU, same applies to _S[34] Packages when
respective features are disabled and to PEVT device template.

> 
> >> simpler.  However, it also complicates backwards compatibility, so
> >> merge it with the DSDT.
> > What are these complications?
> 
> The complication arises if we want to make the SSDT exactly the same for
> all QEMU versions, given a (machine type, command line) pair.  Then you
> either cannot do any change to ssdt-misc, or you have to keep different
> copies for each machine type.
With resizable ROM blobs in master, there shouldn't be an issue with
migration in new QEMU versions if size of SSDT changes.
So question is if we still need SSDT version-ing and per machine type
SSDT compatibility? /it's better not to do version-ing at all if it could
be avoided, due to maintenance headache it brings along/


PS:
could you split binary/hex blobs update in separate patch(s), to simplify
review/testing of series.

> 
> Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 17:14       ` Igor Mammedov
@ 2015-01-19 17:26         ` Paolo Bonzini
  2015-01-19 19:29           ` Michael S. Tsirkin
  0 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2015-01-19 17:26 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: mst, qemu-devel, dgilbert



On 19/01/2015 18:14, Igor Mammedov wrote:
> I'm fine with moving "SMC out of the per-machine-type AML", should be
> a separate patch anyway. But patch-able SMC being in DSDT is our mistake
> that we allowed it to slip there and should be better moved to SSDT rather
> than staying in DSDT and making thing more complex.
> It's also candidate for trimming, i.e. dropping it from tables altogether
> if device is not present in QEMU, same applies to _S[34] Packages when
> respective features are disabled and to PEVT device template.

Yes, trimming is better than putting it in the DSDT, at least for simple
devices such as SMC and pvpanic.

>> > 
>>>> > >> simpler.  However, it also complicates backwards compatibility, so
>>>> > >> merge it with the DSDT.
>>> > > What are these complications?
>> > 
>> > The complication arises if we want to make the SSDT exactly the same for
>> > all QEMU versions, given a (machine type, command line) pair.  Then you
>> > either cannot do any change to ssdt-misc, or you have to keep different
>> > copies for each machine type.
> With resizable ROM blobs in master, there shouldn't be an issue with
> migration in new QEMU versions if size of SSDT changes.

There is only a very small issue that remains (the RSDP pointer is wrong
if the size changes), so we probably should apply anyway the patch of
mine that allows the DSDT size to change; and we probably should pay
attention to SSDT, and version it.

("Let's just ignore the SSDT" was exactly what I feared when I disagreed
with putting in resizable ROM blobs first.  But now that it's in, I
cannot really argue otherwise).

> So question is if we still need SSDT version-ing and per machine type
> SSDT compatibility? /it's better not to do version-ing at all if it could
> be avoided, due to maintenance headache it brings along/

I'm okay with re-evaluating that after your patches go in.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 17:26         ` Paolo Bonzini
@ 2015-01-19 19:29           ` Michael S. Tsirkin
  2015-01-19 19:33             ` Michael S. Tsirkin
  2015-01-20  9:59             ` Igor Mammedov
  0 siblings, 2 replies; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 19:29 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Igor Mammedov, qemu-devel, dgilbert

On Mon, Jan 19, 2015 at 06:26:55PM +0100, Paolo Bonzini wrote:
> 
> 
> On 19/01/2015 18:14, Igor Mammedov wrote:
> > I'm fine with moving "SMC out of the per-machine-type AML", should be
> > a separate patch anyway. But patch-able SMC being in DSDT is our mistake
> > that we allowed it to slip there and should be better moved to SSDT rather
> > than staying in DSDT and making thing more complex.
> > It's also candidate for trimming, i.e. dropping it from tables altogether
> > if device is not present in QEMU, same applies to _S[34] Packages when
> > respective features are disabled and to PEVT device template.
> 
> Yes, trimming is better than putting it in the DSDT, at least for simple
> devices such as SMC and pvpanic.
> 
> >> > 
> >>>> > >> simpler.  However, it also complicates backwards compatibility, so
> >>>> > >> merge it with the DSDT.
> >>> > > What are these complications?
> >> > 
> >> > The complication arises if we want to make the SSDT exactly the same for
> >> > all QEMU versions, given a (machine type, command line) pair.  Then you
> >> > either cannot do any change to ssdt-misc, or you have to keep different
> >> > copies for each machine type.
> > With resizable ROM blobs in master, there shouldn't be an issue with
> > migration in new QEMU versions if size of SSDT changes.
> 
> There is only a very small issue that remains (the RSDP pointer is wrong
> if the size changes),

Yes - for new machine types I'll send a patch to put it
in memory.
For old ones - there's a race, and it's painful to fix.  If we do want
to try fixing it, one solution is to fail migration if attempted before
rsdp is shadowed. Useful?

> so we probably should apply anyway the patch of
> mine that allows the DSDT size to change; and we probably should pay
> attention to SSDT, and version it.
> 
> ("Let's just ignore the SSDT" was exactly what I feared when I disagreed
> with putting in resizable ROM blobs first.  But now that it's in, I
> cannot really argue otherwise).

I don't have a strong opinion here. you guys arrive
at a rough consensus.:w


> > So question is if we still need SSDT version-ing and per machine type
> > SSDT compatibility? /it's better not to do version-ing at all if it could
> > be avoided, due to maintenance headache it brings along/
> 
> I'm okay with re-evaluating that after your patches go in.
> 
> Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 19:29           ` Michael S. Tsirkin
@ 2015-01-19 19:33             ` Michael S. Tsirkin
  2015-01-19 19:57               ` Paolo Bonzini
  2015-01-20  9:59             ` Igor Mammedov
  1 sibling, 1 reply; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 19:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Igor Mammedov, qemu-devel, dgilbert

On Mon, Jan 19, 2015 at 09:29:57PM +0200, Michael S. Tsirkin wrote:
> On Mon, Jan 19, 2015 at 06:26:55PM +0100, Paolo Bonzini wrote:
> > 
> > 
> > On 19/01/2015 18:14, Igor Mammedov wrote:
> > > I'm fine with moving "SMC out of the per-machine-type AML", should be
> > > a separate patch anyway. But patch-able SMC being in DSDT is our mistake
> > > that we allowed it to slip there and should be better moved to SSDT rather
> > > than staying in DSDT and making thing more complex.
> > > It's also candidate for trimming, i.e. dropping it from tables altogether
> > > if device is not present in QEMU, same applies to _S[34] Packages when
> > > respective features are disabled and to PEVT device template.
> > 
> > Yes, trimming is better than putting it in the DSDT, at least for simple
> > devices such as SMC and pvpanic.
> > 
> > >> > 
> > >>>> > >> simpler.  However, it also complicates backwards compatibility, so
> > >>>> > >> merge it with the DSDT.
> > >>> > > What are these complications?
> > >> > 
> > >> > The complication arises if we want to make the SSDT exactly the same for
> > >> > all QEMU versions, given a (machine type, command line) pair.  Then you
> > >> > either cannot do any change to ssdt-misc, or you have to keep different
> > >> > copies for each machine type.
> > > With resizable ROM blobs in master, there shouldn't be an issue with
> > > migration in new QEMU versions if size of SSDT changes.
> > 
> > There is only a very small issue that remains (the RSDP pointer is wrong
> > if the size changes),
> 
> Yes - for new machine types I'll send a patch to put it
> in memory.
> For old ones - there's a race, and it's painful to fix.  If we do want
> to try fixing it, one solution is to fail migration if attempted before
> rsdp is shadowed. Useful?
> 
> > so we probably should apply anyway the patch of
> > mine that allows the DSDT size to change; and we probably should pay
> > attention to SSDT, and version it.

Oh, missed that.
You mean this: "Add padding after the DSDT"?
Right but e.g. Igor's patches likely move RSDT anyway, no?

> > ("Let's just ignore the SSDT" was exactly what I feared when I disagreed
> > with putting in resizable ROM blobs first.  But now that it's in, I
> > cannot really argue otherwise).
> 
> I don't have a strong opinion here. you guys arrive
> at a rough consensus.:w
> 
> 
> > > So question is if we still need SSDT version-ing and per machine type
> > > SSDT compatibility? /it's better not to do version-ing at all if it could
> > > be avoided, due to maintenance headache it brings along/
> > 
> > I'm okay with re-evaluating that after your patches go in.
> > 
> > Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 19:33             ` Michael S. Tsirkin
@ 2015-01-19 19:57               ` Paolo Bonzini
  2015-01-19 21:27                 ` Michael S. Tsirkin
  0 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2015-01-19 19:57 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Igor Mammedov, qemu-devel, dgilbert



On 19/01/2015 20:33, Michael S. Tsirkin wrote:
>>> > > so we probably should apply anyway the patch of
>>> > > mine that allows the DSDT size to change; and we probably should pay
>>> > > attention to SSDT, and version it.
> Oh, missed that.
> You mean this: "Add padding after the DSDT"?

Yes.

> Right but e.g. Igor's patches likely move RSDT anyway, no?

Yes, but for future machine types we can be more careful.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 19:57               ` Paolo Bonzini
@ 2015-01-19 21:27                 ` Michael S. Tsirkin
  0 siblings, 0 replies; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-19 21:27 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Igor Mammedov, qemu-devel, dgilbert

On Mon, Jan 19, 2015 at 08:57:55PM +0100, Paolo Bonzini wrote:
> 
> 
> On 19/01/2015 20:33, Michael S. Tsirkin wrote:
> >>> > > so we probably should apply anyway the patch of
> >>> > > mine that allows the DSDT size to change; and we probably should pay
> >>> > > attention to SSDT, and version it.
> > Oh, missed that.
> > You mean this: "Add padding after the DSDT"?
> 
> Yes.
> 
> > Right but e.g. Igor's patches likely move RSDT anyway, no?
> 
> Yes, but for future machine types we can be more careful.
> 
> Paolo

Yes absolutely, I'm not arguing against these patches.
I was merely observing that they probably won't help with
the specific problem.

-- 
MST

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-19 19:29           ` Michael S. Tsirkin
  2015-01-19 19:33             ` Michael S. Tsirkin
@ 2015-01-20  9:59             ` Igor Mammedov
  2015-01-20 10:34               ` Paolo Bonzini
  2015-01-20 10:35               ` Michael S. Tsirkin
  1 sibling, 2 replies; 27+ messages in thread
From: Igor Mammedov @ 2015-01-20  9:59 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Paolo Bonzini, qemu-devel, dgilbert

On Mon, 19 Jan 2015 21:29:57 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Jan 19, 2015 at 06:26:55PM +0100, Paolo Bonzini wrote:
> > 
> > 
> > On 19/01/2015 18:14, Igor Mammedov wrote:
> > > I'm fine with moving "SMC out of the per-machine-type AML", should be
> > > a separate patch anyway. But patch-able SMC being in DSDT is our mistake
> > > that we allowed it to slip there and should be better moved to SSDT rather
> > > than staying in DSDT and making thing more complex.
> > > It's also candidate for trimming, i.e. dropping it from tables altogether
> > > if device is not present in QEMU, same applies to _S[34] Packages when
> > > respective features are disabled and to PEVT device template.
> > 
> > Yes, trimming is better than putting it in the DSDT, at least for simple
> > devices such as SMC and pvpanic.
So are we dropping 1-2/4 from this series?
I need to know on top of what to rebase. I'll take care of moving SMC to SSDT.

> > 
> > >> > 
> > >>>> > >> simpler.  However, it also complicates backwards compatibility, so
> > >>>> > >> merge it with the DSDT.
> > >>> > > What are these complications?
> > >> > 
> > >> > The complication arises if we want to make the SSDT exactly the same for
> > >> > all QEMU versions, given a (machine type, command line) pair.  Then you
> > >> > either cannot do any change to ssdt-misc, or you have to keep different
> > >> > copies for each machine type.
> > > With resizable ROM blobs in master, there shouldn't be an issue with
> > > migration in new QEMU versions if size of SSDT changes.
> > 
> > There is only a very small issue that remains (the RSDP pointer is wrong
> > if the size changes),
> 
> Yes - for new machine types I'll send a patch to put it
> in memory.
> For old ones - there's a race, and it's painful to fix.  If we do want
> to try fixing it, one solution is to fail migration if attempted before
> rsdp is shadowed. Useful?
There were my patches on list that move RSDT at the start of blob,
which fixes issue for new machine types. That patches however
weren't doing good job for old machine types. I can respin that series
fixing new machines and we can fix old machines in separate patch later.

> 
> > so we probably should apply anyway the patch of
> > mine that allows the DSDT size to change; and we probably should pay
> > attention to SSDT, and version it.
> > 
> > ("Let's just ignore the SSDT" was exactly what I feared when I disagreed
> > with putting in resizable ROM blobs first.  But now that it's in, I
> > cannot really argue otherwise).
> 
> I don't have a strong opinion here. you guys arrive
> at a rough consensus.:w
> 
> 
> > > So question is if we still need SSDT version-ing and per machine type
> > > SSDT compatibility? /it's better not to do version-ing at all if it could
> > > be avoided, due to maintenance headache it brings along/
> > 
> > I'm okay with re-evaluating that after your patches go in.
> > 
> > Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-20  9:59             ` Igor Mammedov
@ 2015-01-20 10:34               ` Paolo Bonzini
  2015-01-20 10:35               ` Michael S. Tsirkin
  1 sibling, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2015-01-20 10:34 UTC (permalink / raw)
  To: Igor Mammedov, Michael S. Tsirkin; +Cc: qemu-devel, dgilbert



On 20/01/2015 10:59, Igor Mammedov wrote:
>>> > > Yes, trimming is better than putting it in the DSDT, at least for simple
>>> > > devices such as SMC and pvpanic.
> So are we dropping 1-2/4 from this series?
> I need to know on top of what to rebase. I'll take care of moving SMC to SSDT.

Do not rebase on anything.  You go first.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-20  9:59             ` Igor Mammedov
  2015-01-20 10:34               ` Paolo Bonzini
@ 2015-01-20 10:35               ` Michael S. Tsirkin
  2015-01-20 12:41                 ` Igor Mammedov
  1 sibling, 1 reply; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-20 10:35 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: Paolo Bonzini, qemu-devel, dgilbert

On Tue, Jan 20, 2015 at 10:59:43AM +0100, Igor Mammedov wrote:
> On Mon, 19 Jan 2015 21:29:57 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Mon, Jan 19, 2015 at 06:26:55PM +0100, Paolo Bonzini wrote:
> > > 
> > > 
> > > On 19/01/2015 18:14, Igor Mammedov wrote:
> > > > I'm fine with moving "SMC out of the per-machine-type AML", should be
> > > > a separate patch anyway. But patch-able SMC being in DSDT is our mistake
> > > > that we allowed it to slip there and should be better moved to SSDT rather
> > > > than staying in DSDT and making thing more complex.
> > > > It's also candidate for trimming, i.e. dropping it from tables altogether
> > > > if device is not present in QEMU, same applies to _S[34] Packages when
> > > > respective features are disabled and to PEVT device template.
> > > 
> > > Yes, trimming is better than putting it in the DSDT, at least for simple
> > > devices such as SMC and pvpanic.
> So are we dropping 1-2/4 from this series?
> I need to know on top of what to rebase. I'll take care of moving SMC to SSDT.
> 
> > > 
> > > >> > 
> > > >>>> > >> simpler.  However, it also complicates backwards compatibility, so
> > > >>>> > >> merge it with the DSDT.
> > > >>> > > What are these complications?
> > > >> > 
> > > >> > The complication arises if we want to make the SSDT exactly the same for
> > > >> > all QEMU versions, given a (machine type, command line) pair.  Then you
> > > >> > either cannot do any change to ssdt-misc, or you have to keep different
> > > >> > copies for each machine type.
> > > > With resizable ROM blobs in master, there shouldn't be an issue with
> > > > migration in new QEMU versions if size of SSDT changes.
> > > 
> > > There is only a very small issue that remains (the RSDP pointer is wrong
> > > if the size changes),
> > 
> > Yes - for new machine types I'll send a patch to put it
> > in memory.
> > For old ones - there's a race, and it's painful to fix.  If we do want
> > to try fixing it, one solution is to fail migration if attempted before
> > rsdp is shadowed. Useful?
> There were my patches on list that move RSDT at the start of blob,
> which fixes issue for new machine types.

I don't see the point - IMO for new machine types, we can just put RSDP
in a memory region, have it migrated.

> That patches however
> weren't doing good job for old machine types. I can respin that series
> fixing new machines and we can fix old machines in separate patch later.

I don't think it's worth it since I don't see an easy way for old
machine types.  A harder way would be to allow rom files to share an MR.
We could then stick RSDP at the tail of the MR, and look for it on
incoming migration: if there, fix it up.

Needs reworking of rom_add_blob API.

> > 
> > > so we probably should apply anyway the patch of
> > > mine that allows the DSDT size to change; and we probably should pay
> > > attention to SSDT, and version it.
> > > 
> > > ("Let's just ignore the SSDT" was exactly what I feared when I disagreed
> > > with putting in resizable ROM blobs first.  But now that it's in, I
> > > cannot really argue otherwise).
> > 
> > I don't have a strong opinion here. you guys arrive
> > at a rough consensus.:w
> > 
> > 
> > > > So question is if we still need SSDT version-ing and per machine type
> > > > SSDT compatibility? /it's better not to do version-ing at all if it could
> > > > be avoided, due to maintenance headache it brings along/
> > > 
> > > I'm okay with re-evaluating that after your patches go in.
> > > 
> > > Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-20 10:35               ` Michael S. Tsirkin
@ 2015-01-20 12:41                 ` Igor Mammedov
  2015-01-20 12:56                   ` Michael S. Tsirkin
  0 siblings, 1 reply; 27+ messages in thread
From: Igor Mammedov @ 2015-01-20 12:41 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Paolo Bonzini, qemu-devel, dgilbert

On Tue, 20 Jan 2015 12:35:47 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Tue, Jan 20, 2015 at 10:59:43AM +0100, Igor Mammedov wrote:
> > On Mon, 19 Jan 2015 21:29:57 +0200
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > 
> > > On Mon, Jan 19, 2015 at 06:26:55PM +0100, Paolo Bonzini wrote:
> > > > 
> > > > 
> > > > On 19/01/2015 18:14, Igor Mammedov wrote:
> > > > > I'm fine with moving "SMC out of the per-machine-type AML", should be
> > > > > a separate patch anyway. But patch-able SMC being in DSDT is our mistake
> > > > > that we allowed it to slip there and should be better moved to SSDT rather
> > > > > than staying in DSDT and making thing more complex.
> > > > > It's also candidate for trimming, i.e. dropping it from tables altogether
> > > > > if device is not present in QEMU, same applies to _S[34] Packages when
> > > > > respective features are disabled and to PEVT device template.
> > > > 
> > > > Yes, trimming is better than putting it in the DSDT, at least for simple
> > > > devices such as SMC and pvpanic.
> > So are we dropping 1-2/4 from this series?
> > I need to know on top of what to rebase. I'll take care of moving SMC to SSDT.
> > 
> > > > 
> > > > >> > 
> > > > >>>> > >> simpler.  However, it also complicates backwards compatibility, so
> > > > >>>> > >> merge it with the DSDT.
> > > > >>> > > What are these complications?
> > > > >> > 
> > > > >> > The complication arises if we want to make the SSDT exactly the same for
> > > > >> > all QEMU versions, given a (machine type, command line) pair.  Then you
> > > > >> > either cannot do any change to ssdt-misc, or you have to keep different
> > > > >> > copies for each machine type.
> > > > > With resizable ROM blobs in master, there shouldn't be an issue with
> > > > > migration in new QEMU versions if size of SSDT changes.
> > > > 
> > > > There is only a very small issue that remains (the RSDP pointer is wrong
> > > > if the size changes),
> > > 
> > > Yes - for new machine types I'll send a patch to put it
> > > in memory.
> > > For old ones - there's a race, and it's painful to fix.  If we do want
> > > to try fixing it, one solution is to fail migration if attempted before
> > > rsdp is shadowed. Useful?
> > There were my patches on list that move RSDT at the start of blob,
> > which fixes issue for new machine types.
> 
> I don't see the point - IMO for new machine types, we can just put RSDP
> in a memory region, have it migrated.
you mean to put it into ROM blob, that should will cover not only migration
issue but also reboot after bridge hotplug, since updated RSDP will be used.

> 
> > That patches however
> > weren't doing good job for old machine types. I can respin that series
> > fixing new machines and we can fix old machines in separate patch later.
> 
> I don't think it's worth it since I don't see an easy way for old
> machine types.  A harder way would be to allow rom files to share an MR.
> We could then stick RSDP at the tail of the MR, and look for it on
> incoming migration: if there, fix it up.
> 
> Needs reworking of rom_add_blob API.
> 
> > > 
> > > > so we probably should apply anyway the patch of
> > > > mine that allows the DSDT size to change; and we probably should pay
> > > > attention to SSDT, and version it.
> > > > 
> > > > ("Let's just ignore the SSDT" was exactly what I feared when I disagreed
> > > > with putting in resizable ROM blobs first.  But now that it's in, I
> > > > cannot really argue otherwise).
> > > 
> > > I don't have a strong opinion here. you guys arrive
> > > at a rough consensus.:w
> > > 
> > > 
> > > > > So question is if we still need SSDT version-ing and per machine type
> > > > > SSDT compatibility? /it's better not to do version-ing at all if it could
> > > > > be avoided, due to maintenance headache it brings along/
> > > > 
> > > > I'm okay with re-evaluating that after your patches go in.
> > > > 
> > > > Paolo

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

* Re: [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT
  2015-01-20 12:41                 ` Igor Mammedov
@ 2015-01-20 12:56                   ` Michael S. Tsirkin
  0 siblings, 0 replies; 27+ messages in thread
From: Michael S. Tsirkin @ 2015-01-20 12:56 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: Paolo Bonzini, qemu-devel, dgilbert

On Tue, Jan 20, 2015 at 01:41:16PM +0100, Igor Mammedov wrote:
> On Tue, 20 Jan 2015 12:35:47 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Tue, Jan 20, 2015 at 10:59:43AM +0100, Igor Mammedov wrote:
> > > On Mon, 19 Jan 2015 21:29:57 +0200
> > > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > > 
> > > > On Mon, Jan 19, 2015 at 06:26:55PM +0100, Paolo Bonzini wrote:
> > > > > 
> > > > > 
> > > > > On 19/01/2015 18:14, Igor Mammedov wrote:
> > > > > > I'm fine with moving "SMC out of the per-machine-type AML", should be
> > > > > > a separate patch anyway. But patch-able SMC being in DSDT is our mistake
> > > > > > that we allowed it to slip there and should be better moved to SSDT rather
> > > > > > than staying in DSDT and making thing more complex.
> > > > > > It's also candidate for trimming, i.e. dropping it from tables altogether
> > > > > > if device is not present in QEMU, same applies to _S[34] Packages when
> > > > > > respective features are disabled and to PEVT device template.
> > > > > 
> > > > > Yes, trimming is better than putting it in the DSDT, at least for simple
> > > > > devices such as SMC and pvpanic.
> > > So are we dropping 1-2/4 from this series?
> > > I need to know on top of what to rebase. I'll take care of moving SMC to SSDT.
> > > 
> > > > > 
> > > > > >> > 
> > > > > >>>> > >> simpler.  However, it also complicates backwards compatibility, so
> > > > > >>>> > >> merge it with the DSDT.
> > > > > >>> > > What are these complications?
> > > > > >> > 
> > > > > >> > The complication arises if we want to make the SSDT exactly the same for
> > > > > >> > all QEMU versions, given a (machine type, command line) pair.  Then you
> > > > > >> > either cannot do any change to ssdt-misc, or you have to keep different
> > > > > >> > copies for each machine type.
> > > > > > With resizable ROM blobs in master, there shouldn't be an issue with
> > > > > > migration in new QEMU versions if size of SSDT changes.
> > > > > 
> > > > > There is only a very small issue that remains (the RSDP pointer is wrong
> > > > > if the size changes),
> > > > 
> > > > Yes - for new machine types I'll send a patch to put it
> > > > in memory.
> > > > For old ones - there's a race, and it's painful to fix.  If we do want
> > > > to try fixing it, one solution is to fail migration if attempted before
> > > > rsdp is shadowed. Useful?
> > > There were my patches on list that move RSDT at the start of blob,
> > > which fixes issue for new machine types.
> > 
> > I don't see the point - IMO for new machine types, we can just put RSDP
> > in a memory region, have it migrated.
> you mean to put it into ROM blob, that should will cover not only migration
> issue but also reboot after bridge hotplug, since updated RSDP will be used.

Exactly.
We can reuse the original rom blob but it's tricky given
existing APIs.

> > 
> > > That patches however
> > > weren't doing good job for old machine types. I can respin that series
> > > fixing new machines and we can fix old machines in separate patch later.
> > 
> > I don't think it's worth it since I don't see an easy way for old
> > machine types.  A harder way would be to allow rom files to share an MR.
> > We could then stick RSDP at the tail of the MR, and look for it on
> > incoming migration: if there, fix it up.
> > 
> > Needs reworking of rom_add_blob API.
> > 
> > > > 
> > > > > so we probably should apply anyway the patch of
> > > > > mine that allows the DSDT size to change; and we probably should pay
> > > > > attention to SSDT, and version it.
> > > > > 
> > > > > ("Let's just ignore the SSDT" was exactly what I feared when I disagreed
> > > > > with putting in resizable ROM blobs first.  But now that it's in, I
> > > > > cannot really argue otherwise).
> > > > 
> > > > I don't have a strong opinion here. you guys arrive
> > > > at a rough consensus.:w
> > > > 
> > > > 
> > > > > > So question is if we still need SSDT version-ing and per machine type
> > > > > > SSDT compatibility? /it's better not to do version-ing at all if it could
> > > > > > be avoided, due to maintenance headache it brings along/
> > > > > 
> > > > > I'm okay with re-evaluating that after your patches go in.
> > > > > 
> > > > > Paolo

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

end of thread, other threads:[~2015-01-20 12:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
2015-01-19 15:15   ` Igor Mammedov
2015-01-19 15:41     ` Paolo Bonzini
2015-01-19 17:14       ` Igor Mammedov
2015-01-19 17:26         ` Paolo Bonzini
2015-01-19 19:29           ` Michael S. Tsirkin
2015-01-19 19:33             ` Michael S. Tsirkin
2015-01-19 19:57               ` Paolo Bonzini
2015-01-19 21:27                 ` Michael S. Tsirkin
2015-01-20  9:59             ` Igor Mammedov
2015-01-20 10:34               ` Paolo Bonzini
2015-01-20 10:35               ` Michael S. Tsirkin
2015-01-20 12:41                 ` Igor Mammedov
2015-01-20 12:56                   ` Michael S. Tsirkin
2015-01-19 15:31   ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 2/4] pc: rename ssdt-misc to dsdt-common Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 3/4] pc: move common parts of the DSDT " Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl Paolo Bonzini
2015-01-19 15:26   ` Michael S. Tsirkin
2015-01-19 15:33     ` Paolo Bonzini
2015-01-19 15:38       ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm Paolo Bonzini
2015-01-19 15:33   ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 6/4] pc: clean up pre-2.1 compatibility code Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables Paolo Bonzini
2015-01-19 15:36   ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.