All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 00/16] acpi: i386 tweaks
@ 2020-05-15 15:04 Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 01/16] qtest: allow DSDT acpi table changes Gerd Hoffmann
                   ` (20 more replies)
  0 siblings, 21 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

First batch of microvm patches, some generic acpi stuff.
Split the acpi-build.c monster, specifically split the
pc and q35 and pci bits into a separate file which we
can skip building at some point in the future.

v2 changes: leave acpi-build.c largely as-is, move useful
bits to other places to allow them being reused, specifically:

 * move isa device generator functions to individual isa devices.
 * move fw_cfg generator function to fw_cfg.c

v3 changes: fix rtc, support multiple lpt devices.

v4 changes:
 * drop merged patches.
 * split rtc crs change to separata patch.
 * added two cleanup patches.
 * picked up ack & review tags.

v5 changes:
 * add comment for rtc crs update.
 * add even more cleanup patches.
 * picked up ack & review tags.

v6 changes:
 * floppy: move cmos_get_fd_drive_type.
 * picked up ack & review tags.

take care,
  Gerd

Gerd Hoffmann (16):
  qtest: allow DSDT acpi table changes
  acpi: move aml builder code for rtc device
  acpi: rtc: use a single crs range
  acpi: serial: don't use _STA method
  acpi: move aml builder code for serial device
  acpi: parallel: don't use _STA method
  acpi: move aml builder code for parallel device
  acpi: move aml builder code for floppy device
  floppy: make isa_fdc_get_drive_max_chs static
  floppy: move cmos_get_fd_drive_type() from pc
  acpi: move aml builder code for i8042 (kbd+mouse) device
  acpi: factor out fw_cfg_add_acpi_dsdt()
  acpi: simplify build_isa_devices_aml()
  acpi: drop serial/parallel enable bits from dsdt
  acpi: drop build_piix4_pm()
  acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.

 hw/i386/fw_cfg.h                            |   1 +
 include/hw/block/fdc.h                      |   3 +-
 include/hw/i386/pc.h                        |   1 -
 tests/qtest/bios-tables-test-allowed-diff.h |  17 ++
 hw/block/fdc.c                              | 111 ++++++-
 hw/char/parallel.c                          |  22 ++
 hw/char/serial-isa.c                        |  22 ++
 hw/i386/acpi-build.c                        | 312 +-------------------
 hw/i386/fw_cfg.c                            |  28 ++
 hw/i386/pc.c                                |  25 --
 hw/input/pckbd.c                            |  31 ++
 hw/rtc/mc146818rtc.c                        |  24 ++
 stubs/cmos.c                                |   7 +
 stubs/Makefile.objs                         |   1 +
 14 files changed, 269 insertions(+), 336 deletions(-)
 create mode 100644 stubs/cmos.c

-- 
2.18.4



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

* [PATCH v6 01/16] qtest: allow DSDT acpi table changes
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 02/16] acpi: move aml builder code for rtc device Gerd Hoffmann
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 tests/qtest/bios-tables-test-allowed-diff.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8bf4..6a052c50447a 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1 +1,18 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
+"tests/data/acpi/pc/DSDT.acpihmat",
+"tests/data/acpi/pc/DSDT.bridge",
+"tests/data/acpi/pc/DSDT.cphp",
+"tests/data/acpi/pc/DSDT.dimmpxm",
+"tests/data/acpi/pc/DSDT.ipmikcs",
+"tests/data/acpi/pc/DSDT.memhp",
+"tests/data/acpi/pc/DSDT.numamem",
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.numamem",
-- 
2.18.4



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

* [PATCH v6 02/16] acpi: move aml builder code for rtc device
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 01/16] qtest: allow DSDT acpi table changes Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 03/16] acpi: rtc: use a single crs range Gerd Hoffmann
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/i386/acpi-build.c | 17 -----------------
 hw/rtc/mc146818rtc.c | 22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 2e15f6848e7e..0bfa2dd23fcc 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1137,22 +1137,6 @@ static Aml *build_fdc_device_aml(ISADevice *fdc)
     return dev;
 }
 
-static Aml *build_rtc_device_aml(void)
-{
-    Aml *dev;
-    Aml *crs;
-
-    dev = aml_device("RTC");
-    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0B00")));
-    crs = aml_resource_template();
-    aml_append(crs, aml_io(AML_DECODE16, 0x0070, 0x0070, 0x10, 0x02));
-    aml_append(crs, aml_irq_no_flags(8));
-    aml_append(crs, aml_io(AML_DECODE16, 0x0072, 0x0072, 0x02, 0x06));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-
-    return dev;
-}
-
 static Aml *build_kbd_device_aml(void)
 {
     Aml *dev;
@@ -1278,7 +1262,6 @@ static void build_isa_devices_aml(Aml *table)
     Aml *scope = aml_scope("_SB.PCI0.ISA");
     Object *obj = object_resolve_path_type("", TYPE_ISA_BUS, &ambiguous);
 
-    aml_append(scope, build_rtc_device_aml());
     aml_append(scope, build_kbd_device_aml());
     aml_append(scope, build_mouse_device_aml());
     if (fdc) {
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index 9c30cbdcd76f..fe05a4488e43 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -27,6 +27,7 @@
 #include "qemu/cutils.h"
 #include "qemu/module.h"
 #include "qemu/bcd.h"
+#include "hw/acpi/aml-build.h"
 #include "hw/irq.h"
 #include "hw/qdev-properties.h"
 #include "qemu/timer.h"
@@ -1007,13 +1008,34 @@ static void rtc_resetdev(DeviceState *d)
     }
 }
 
+static void rtc_build_aml(ISADevice *isadev, Aml *scope)
+{
+    Aml *dev;
+    Aml *crs;
+
+    crs = aml_resource_template();
+    aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE, RTC_ISA_BASE,
+                           0x10, 0x02));
+    aml_append(crs, aml_irq_no_flags(RTC_ISA_IRQ));
+    aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE + 2, RTC_ISA_BASE + 2,
+                           0x02, 0x06));
+
+    dev = aml_device("RTC");
+    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0B00")));
+    aml_append(dev, aml_name_decl("_CRS", crs));
+
+    aml_append(scope, dev);
+}
+
 static void rtc_class_initfn(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
+    ISADeviceClass *isa = ISA_DEVICE_CLASS(klass);
 
     dc->realize = rtc_realizefn;
     dc->reset = rtc_resetdev;
     dc->vmsd = &vmstate_rtc;
+    isa->build_aml = rtc_build_aml;
     device_class_set_props(dc, mc146818rtc_properties);
 }
 
-- 
2.18.4



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

* [PATCH v6 03/16] acpi: rtc: use a single crs range
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 01/16] qtest: allow DSDT acpi table changes Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 02/16] acpi: move aml builder code for rtc device Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 04/16] acpi: serial: don't use _STA method Gerd Hoffmann
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Use a single io range for _CRS instead of two,
following what real hardware does.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/rtc/mc146818rtc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index fe05a4488e43..1e9fa0f33fed 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -1013,12 +1013,14 @@ static void rtc_build_aml(ISADevice *isadev, Aml *scope)
     Aml *dev;
     Aml *crs;
 
+    /*
+     * Reserving 8 io ports here, following what physical hardware
+     * does, even though qemu only responds to the first two ports.
+     */
     crs = aml_resource_template();
     aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE, RTC_ISA_BASE,
-                           0x10, 0x02));
+                           0x01, 0x08));
     aml_append(crs, aml_irq_no_flags(RTC_ISA_IRQ));
-    aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE + 2, RTC_ISA_BASE + 2,
-                           0x02, 0x06));
 
     dev = aml_device("RTC");
     aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0B00")));
-- 
2.18.4



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

* [PATCH v6 04/16] acpi: serial: don't use _STA method
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 03/16] acpi: rtc: use a single crs range Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 05/16] acpi: move aml builder code for serial device Gerd Hoffmann
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

The _STA method dates back to the days where we had a static DSDT.  The
device is listed in the DSDT table unconditionally and the _STA method
checks a bit in the isa bridge pci config space to figure whenever a
given is isa device is present or not, then evaluates to 0x0f (present)
or 0x00 (absent).

These days the DSDT is generated by qemu anyway, so if a device is not
present we can simply drop it from the DSDT instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/i386/acpi-build.c | 32 ++++++++------------------------
 1 file changed, 8 insertions(+), 24 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 0bfa2dd23fcc..3a82730a0d19 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1208,50 +1208,34 @@ static Aml *build_lpt_device_aml(void)
     return dev;
 }
 
-static Aml *build_com_device_aml(uint8_t uid)
+static void build_com_device_aml(Aml *scope, uint8_t uid)
 {
     Aml *dev;
     Aml *crs;
-    Aml *method;
-    Aml *if_ctx;
-    Aml *else_ctx;
-    Aml *zero = aml_int(0);
-    Aml *is_present = aml_local(0);
-    const char *enabled_field = "CAEN";
     uint8_t irq = 4;
     uint16_t io_port = 0x03F8;
 
     assert(uid == 1 || uid == 2);
     if (uid == 2) {
-        enabled_field = "CBEN";
         irq = 3;
         io_port = 0x02F8;
     }
+    if (!memory_region_present(get_system_io(), io_port)) {
+        return;
+    }
 
     dev = aml_device("COM%d", uid);
     aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0501")));
     aml_append(dev, aml_name_decl("_UID", aml_int(uid)));
 
-    method = aml_method("_STA", 0, AML_NOTSERIALIZED);
-    aml_append(method, aml_store(aml_name("%s", enabled_field), is_present));
-    if_ctx = aml_if(aml_equal(is_present, zero));
-    {
-        aml_append(if_ctx, aml_return(aml_int(0x00)));
-    }
-    aml_append(method, if_ctx);
-    else_ctx = aml_else();
-    {
-        aml_append(else_ctx, aml_return(aml_int(0x0f)));
-    }
-    aml_append(method, else_ctx);
-    aml_append(dev, method);
+    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
 
     crs = aml_resource_template();
     aml_append(crs, aml_io(AML_DECODE16, io_port, io_port, 0x00, 0x08));
     aml_append(crs, aml_irq_no_flags(irq));
     aml_append(dev, aml_name_decl("_CRS", crs));
 
-    return dev;
+    aml_append(scope, dev);
 }
 
 static void build_isa_devices_aml(Aml *table)
@@ -1268,8 +1252,8 @@ static void build_isa_devices_aml(Aml *table)
         aml_append(scope, build_fdc_device_aml(fdc));
     }
     aml_append(scope, build_lpt_device_aml());
-    aml_append(scope, build_com_device_aml(1));
-    aml_append(scope, build_com_device_aml(2));
+    build_com_device_aml(scope, 1);
+    build_com_device_aml(scope, 2);
 
     if (ambiguous) {
         error_report("Multiple ISA busses, unable to define IPMI ACPI data");
-- 
2.18.4



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

* [PATCH v6 05/16] acpi: move aml builder code for serial device
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (3 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 04/16] acpi: serial: don't use _STA method Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 06/16] acpi: parallel: don't use _STA method Gerd Hoffmann
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

The code uses the isa_serial_io array to figure what the device uid is.
Side effect is that acpi antries are not limited to port 1+2 any more,
we'll also get entries for ports 3+4.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/char/serial-isa.c | 22 ++++++++++++++++++++++
 hw/i386/acpi-build.c | 32 --------------------------------
 2 files changed, 22 insertions(+), 32 deletions(-)

diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index f9b6eed7833d..165e320e65f0 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -27,6 +27,7 @@
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
+#include "hw/acpi/aml-build.h"
 #include "hw/char/serial.h"
 #include "hw/isa/isa.h"
 #include "hw/qdev-properties.h"
@@ -81,6 +82,25 @@ static void serial_isa_realizefn(DeviceState *dev, Error **errp)
     isa_register_ioport(isadev, &s->io, isa->iobase);
 }
 
+static void serial_isa_build_aml(ISADevice *isadev, Aml *scope)
+{
+    ISASerialState *isa = ISA_SERIAL(isadev);
+    Aml *dev;
+    Aml *crs;
+
+    crs = aml_resource_template();
+    aml_append(crs, aml_io(AML_DECODE16, isa->iobase, isa->iobase, 0x00, 0x08));
+    aml_append(crs, aml_irq_no_flags(isa->isairq));
+
+    dev = aml_device("COM%d", isa->index + 1);
+    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0501")));
+    aml_append(dev, aml_name_decl("_UID", aml_int(isa->index + 1)));
+    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
+    aml_append(dev, aml_name_decl("_CRS", crs));
+
+    aml_append(scope, dev);
+}
+
 static const VMStateDescription vmstate_isa_serial = {
     .name = "serial",
     .version_id = 3,
@@ -103,9 +123,11 @@ static Property serial_isa_properties[] = {
 static void serial_isa_class_initfn(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
+    ISADeviceClass *isa = ISA_DEVICE_CLASS(klass);
 
     dc->realize = serial_isa_realizefn;
     dc->vmsd = &vmstate_isa_serial;
+    isa->build_aml = serial_isa_build_aml;
     device_class_set_props(dc, serial_isa_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 3a82730a0d19..0e6a5151f4c3 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1208,36 +1208,6 @@ static Aml *build_lpt_device_aml(void)
     return dev;
 }
 
-static void build_com_device_aml(Aml *scope, uint8_t uid)
-{
-    Aml *dev;
-    Aml *crs;
-    uint8_t irq = 4;
-    uint16_t io_port = 0x03F8;
-
-    assert(uid == 1 || uid == 2);
-    if (uid == 2) {
-        irq = 3;
-        io_port = 0x02F8;
-    }
-    if (!memory_region_present(get_system_io(), io_port)) {
-        return;
-    }
-
-    dev = aml_device("COM%d", uid);
-    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0501")));
-    aml_append(dev, aml_name_decl("_UID", aml_int(uid)));
-
-    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
-
-    crs = aml_resource_template();
-    aml_append(crs, aml_io(AML_DECODE16, io_port, io_port, 0x00, 0x08));
-    aml_append(crs, aml_irq_no_flags(irq));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-
-    aml_append(scope, dev);
-}
-
 static void build_isa_devices_aml(Aml *table)
 {
     ISADevice *fdc = pc_find_fdc0();
@@ -1252,8 +1222,6 @@ static void build_isa_devices_aml(Aml *table)
         aml_append(scope, build_fdc_device_aml(fdc));
     }
     aml_append(scope, build_lpt_device_aml());
-    build_com_device_aml(scope, 1);
-    build_com_device_aml(scope, 2);
 
     if (ambiguous) {
         error_report("Multiple ISA busses, unable to define IPMI ACPI data");
-- 
2.18.4



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

* [PATCH v6 06/16] acpi: parallel: don't use _STA method
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (4 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 05/16] acpi: move aml builder code for serial device Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 07/16] acpi: move aml builder code for parallel device Gerd Hoffmann
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

The _STA method dates back to the days where we had a static DSDT.  The
device is listed in the DSDT table unconditionally and the _STA method
checks a bit in the isa bridge pci config space to figure whenever a
given is isa device is present or not, then evaluates to 0x0f (present)
or 0x00 (absent).

These days the DSDT is generated by qemu anyway, so if a device is not
present we can simply drop it from the DSDT instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-build.c | 29 ++++++++---------------------
 1 file changed, 8 insertions(+), 21 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 0e6a5151f4c3..2188a2b99d18 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1173,39 +1173,26 @@ static Aml *build_mouse_device_aml(void)
     return dev;
 }
 
-static Aml *build_lpt_device_aml(void)
+static void build_lpt_device_aml(Aml *scope)
 {
     Aml *dev;
     Aml *crs;
-    Aml *method;
-    Aml *if_ctx;
-    Aml *else_ctx;
-    Aml *zero = aml_int(0);
-    Aml *is_present = aml_local(0);
+
+    if (!memory_region_present(get_system_io(), 0x0378)) {
+        return;
+    }
 
     dev = aml_device("LPT");
     aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0400")));
 
-    method = aml_method("_STA", 0, AML_NOTSERIALIZED);
-    aml_append(method, aml_store(aml_name("LPEN"), is_present));
-    if_ctx = aml_if(aml_equal(is_present, zero));
-    {
-        aml_append(if_ctx, aml_return(aml_int(0x00)));
-    }
-    aml_append(method, if_ctx);
-    else_ctx = aml_else();
-    {
-        aml_append(else_ctx, aml_return(aml_int(0x0f)));
-    }
-    aml_append(method, else_ctx);
-    aml_append(dev, method);
+    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
 
     crs = aml_resource_template();
     aml_append(crs, aml_io(AML_DECODE16, 0x0378, 0x0378, 0x08, 0x08));
     aml_append(crs, aml_irq_no_flags(7));
     aml_append(dev, aml_name_decl("_CRS", crs));
 
-    return dev;
+    aml_append(scope, dev);
 }
 
 static void build_isa_devices_aml(Aml *table)
@@ -1221,7 +1208,7 @@ static void build_isa_devices_aml(Aml *table)
     if (fdc) {
         aml_append(scope, build_fdc_device_aml(fdc));
     }
-    aml_append(scope, build_lpt_device_aml());
+    build_lpt_device_aml(scope);
 
     if (ambiguous) {
         error_report("Multiple ISA busses, unable to define IPMI ACPI data");
-- 
2.18.4



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

* [PATCH v6 07/16] acpi: move aml builder code for parallel device
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (5 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 06/16] acpi: parallel: don't use _STA method Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 08/16] acpi: move aml builder code for floppy device Gerd Hoffmann
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Also adds support for multiple LPT devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/char/parallel.c   | 22 ++++++++++++++++++++++
 hw/i386/acpi-build.c | 23 -----------------------
 2 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/hw/char/parallel.c b/hw/char/parallel.c
index 8dd67d13759b..c0f34bf924ec 100644
--- a/hw/char/parallel.c
+++ b/hw/char/parallel.c
@@ -28,6 +28,7 @@
 #include "qemu/module.h"
 #include "chardev/char-parallel.h"
 #include "chardev/char-fe.h"
+#include "hw/acpi/aml-build.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
 #include "hw/qdev-properties.h"
@@ -568,6 +569,25 @@ static void parallel_isa_realizefn(DeviceState *dev, Error **errp)
                              s, "parallel");
 }
 
+static void parallel_isa_build_aml(ISADevice *isadev, Aml *scope)
+{
+    ISAParallelState *isa = ISA_PARALLEL(isadev);
+    Aml *dev;
+    Aml *crs;
+
+    crs = aml_resource_template();
+    aml_append(crs, aml_io(AML_DECODE16, isa->iobase, isa->iobase, 0x08, 0x08));
+    aml_append(crs, aml_irq_no_flags(isa->isairq));
+
+    dev = aml_device("LPT%d", isa->index + 1);
+    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0400")));
+    aml_append(dev, aml_name_decl("_UID", aml_int(isa->index + 1)));
+    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
+    aml_append(dev, aml_name_decl("_CRS", crs));
+
+    aml_append(scope, dev);
+}
+
 /* Memory mapped interface */
 static uint64_t parallel_mm_readfn(void *opaque, hwaddr addr, unsigned size)
 {
@@ -624,9 +644,11 @@ static Property parallel_isa_properties[] = {
 static void parallel_isa_class_initfn(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
+    ISADeviceClass *isa = ISA_DEVICE_CLASS(klass);
 
     dc->realize = parallel_isa_realizefn;
     dc->vmsd = &vmstate_parallel_isa;
+    isa->build_aml = parallel_isa_build_aml;
     device_class_set_props(dc, parallel_isa_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 2188a2b99d18..443db94deb5b 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1173,28 +1173,6 @@ static Aml *build_mouse_device_aml(void)
     return dev;
 }
 
-static void build_lpt_device_aml(Aml *scope)
-{
-    Aml *dev;
-    Aml *crs;
-
-    if (!memory_region_present(get_system_io(), 0x0378)) {
-        return;
-    }
-
-    dev = aml_device("LPT");
-    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0400")));
-
-    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
-
-    crs = aml_resource_template();
-    aml_append(crs, aml_io(AML_DECODE16, 0x0378, 0x0378, 0x08, 0x08));
-    aml_append(crs, aml_irq_no_flags(7));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-
-    aml_append(scope, dev);
-}
-
 static void build_isa_devices_aml(Aml *table)
 {
     ISADevice *fdc = pc_find_fdc0();
@@ -1208,7 +1186,6 @@ static void build_isa_devices_aml(Aml *table)
     if (fdc) {
         aml_append(scope, build_fdc_device_aml(fdc));
     }
-    build_lpt_device_aml(scope);
 
     if (ambiguous) {
         error_report("Multiple ISA busses, unable to define IPMI ACPI data");
-- 
2.18.4



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

* [PATCH v6 08/16] acpi: move aml builder code for floppy device
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (6 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 07/16] acpi: move aml builder code for parallel device Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-06-09 14:28   ` Michael S. Tsirkin
  2020-05-15 15:04 ` [PATCH v6 09/16] floppy: make isa_fdc_get_drive_max_chs static Gerd Hoffmann
                   ` (12 subsequent siblings)
  20 siblings, 1 reply; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/block/fdc.c       | 83 ++++++++++++++++++++++++++++++++++++++++++++
 hw/i386/acpi-build.c | 83 --------------------------------------------
 stubs/cmos.c         |  7 ++++
 stubs/Makefile.objs  |  1 +
 4 files changed, 91 insertions(+), 83 deletions(-)
 create mode 100644 stubs/cmos.c

diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index c5fb9d6ece77..b4d2eaf66dcd 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -32,6 +32,8 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
+#include "hw/i386/pc.h"
+#include "hw/acpi/aml-build.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
 #include "hw/qdev-properties.h"
@@ -2765,6 +2767,85 @@ void isa_fdc_get_drive_max_chs(FloppyDriveType type,
     (*maxc)--;
 }
 
+static Aml *build_fdinfo_aml(int idx, FloppyDriveType type)
+{
+    Aml *dev, *fdi;
+    uint8_t maxc, maxh, maxs;
+
+    isa_fdc_get_drive_max_chs(type, &maxc, &maxh, &maxs);
+
+    dev = aml_device("FLP%c", 'A' + idx);
+
+    aml_append(dev, aml_name_decl("_ADR", aml_int(idx)));
+
+    fdi = aml_package(16);
+    aml_append(fdi, aml_int(idx));  /* Drive Number */
+    aml_append(fdi,
+        aml_int(cmos_get_fd_drive_type(type)));  /* Device Type */
+    /*
+     * the values below are the limits of the drive, and are thus independent
+     * of the inserted media
+     */
+    aml_append(fdi, aml_int(maxc));  /* Maximum Cylinder Number */
+    aml_append(fdi, aml_int(maxs));  /* Maximum Sector Number */
+    aml_append(fdi, aml_int(maxh));  /* Maximum Head Number */
+    /*
+     * SeaBIOS returns the below values for int 0x13 func 0x08 regardless of
+     * the drive type, so shall we
+     */
+    aml_append(fdi, aml_int(0xAF));  /* disk_specify_1 */
+    aml_append(fdi, aml_int(0x02));  /* disk_specify_2 */
+    aml_append(fdi, aml_int(0x25));  /* disk_motor_wait */
+    aml_append(fdi, aml_int(0x02));  /* disk_sector_siz */
+    aml_append(fdi, aml_int(0x12));  /* disk_eot */
+    aml_append(fdi, aml_int(0x1B));  /* disk_rw_gap */
+    aml_append(fdi, aml_int(0xFF));  /* disk_dtl */
+    aml_append(fdi, aml_int(0x6C));  /* disk_formt_gap */
+    aml_append(fdi, aml_int(0xF6));  /* disk_fill */
+    aml_append(fdi, aml_int(0x0F));  /* disk_head_sttl */
+    aml_append(fdi, aml_int(0x08));  /* disk_motor_strt */
+
+    aml_append(dev, aml_name_decl("_FDI", fdi));
+    return dev;
+}
+
+static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
+{
+    Aml *dev;
+    Aml *crs;
+    int i;
+
+#define ACPI_FDE_MAX_FD 4
+    uint32_t fde_buf[5] = {
+        0, 0, 0, 0,     /* presence of floppy drives #0 - #3 */
+        cpu_to_le32(2)  /* tape presence (2 == never present) */
+    };
+
+    crs = aml_resource_template();
+    aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04));
+    aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01));
+    aml_append(crs, aml_irq_no_flags(6));
+    aml_append(crs,
+        aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2));
+
+    dev = aml_device("FDC0");
+    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700")));
+    aml_append(dev, aml_name_decl("_CRS", crs));
+
+    for (i = 0; i < MIN(MAX_FD, ACPI_FDE_MAX_FD); i++) {
+        FloppyDriveType type = isa_fdc_get_drive_type(isadev, i);
+
+        if (type < FLOPPY_DRIVE_TYPE_NONE) {
+            fde_buf[i] = cpu_to_le32(1);  /* drive present */
+            aml_append(dev, build_fdinfo_aml(i, type));
+        }
+    }
+    aml_append(dev, aml_name_decl("_FDE",
+               aml_buffer(sizeof(fde_buf), (uint8_t *)fde_buf)));
+
+    aml_append(scope, dev);
+}
+
 static const VMStateDescription vmstate_isa_fdc ={
     .name = "fdc",
     .version_id = 2,
@@ -2798,11 +2879,13 @@ static Property isa_fdc_properties[] = {
 static void isabus_fdc_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
+    ISADeviceClass *isa = ISA_DEVICE_CLASS(klass);
 
     dc->realize = isabus_fdc_realize;
     dc->fw_name = "fdc";
     dc->reset = fdctrl_external_reset_isa;
     dc->vmsd = &vmstate_isa_fdc;
+    isa->build_aml = fdc_isa_build_aml;
     device_class_set_props(dc, isa_fdc_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 443db94deb5b..775936e28b9a 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1058,85 +1058,6 @@ static void build_hpet_aml(Aml *table)
     aml_append(table, scope);
 }
 
-static Aml *build_fdinfo_aml(int idx, FloppyDriveType type)
-{
-    Aml *dev, *fdi;
-    uint8_t maxc, maxh, maxs;
-
-    isa_fdc_get_drive_max_chs(type, &maxc, &maxh, &maxs);
-
-    dev = aml_device("FLP%c", 'A' + idx);
-
-    aml_append(dev, aml_name_decl("_ADR", aml_int(idx)));
-
-    fdi = aml_package(16);
-    aml_append(fdi, aml_int(idx));  /* Drive Number */
-    aml_append(fdi,
-        aml_int(cmos_get_fd_drive_type(type)));  /* Device Type */
-    /*
-     * the values below are the limits of the drive, and are thus independent
-     * of the inserted media
-     */
-    aml_append(fdi, aml_int(maxc));  /* Maximum Cylinder Number */
-    aml_append(fdi, aml_int(maxs));  /* Maximum Sector Number */
-    aml_append(fdi, aml_int(maxh));  /* Maximum Head Number */
-    /*
-     * SeaBIOS returns the below values for int 0x13 func 0x08 regardless of
-     * the drive type, so shall we
-     */
-    aml_append(fdi, aml_int(0xAF));  /* disk_specify_1 */
-    aml_append(fdi, aml_int(0x02));  /* disk_specify_2 */
-    aml_append(fdi, aml_int(0x25));  /* disk_motor_wait */
-    aml_append(fdi, aml_int(0x02));  /* disk_sector_siz */
-    aml_append(fdi, aml_int(0x12));  /* disk_eot */
-    aml_append(fdi, aml_int(0x1B));  /* disk_rw_gap */
-    aml_append(fdi, aml_int(0xFF));  /* disk_dtl */
-    aml_append(fdi, aml_int(0x6C));  /* disk_formt_gap */
-    aml_append(fdi, aml_int(0xF6));  /* disk_fill */
-    aml_append(fdi, aml_int(0x0F));  /* disk_head_sttl */
-    aml_append(fdi, aml_int(0x08));  /* disk_motor_strt */
-
-    aml_append(dev, aml_name_decl("_FDI", fdi));
-    return dev;
-}
-
-static Aml *build_fdc_device_aml(ISADevice *fdc)
-{
-    int i;
-    Aml *dev;
-    Aml *crs;
-
-#define ACPI_FDE_MAX_FD 4
-    uint32_t fde_buf[5] = {
-        0, 0, 0, 0,     /* presence of floppy drives #0 - #3 */
-        cpu_to_le32(2)  /* tape presence (2 == never present) */
-    };
-
-    dev = aml_device("FDC0");
-    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700")));
-
-    crs = aml_resource_template();
-    aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04));
-    aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01));
-    aml_append(crs, aml_irq_no_flags(6));
-    aml_append(crs,
-        aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-
-    for (i = 0; i < MIN(MAX_FD, ACPI_FDE_MAX_FD); i++) {
-        FloppyDriveType type = isa_fdc_get_drive_type(fdc, i);
-
-        if (type < FLOPPY_DRIVE_TYPE_NONE) {
-            fde_buf[i] = cpu_to_le32(1);  /* drive present */
-            aml_append(dev, build_fdinfo_aml(i, type));
-        }
-    }
-    aml_append(dev, aml_name_decl("_FDE",
-               aml_buffer(sizeof(fde_buf), (uint8_t *)fde_buf)));
-
-    return dev;
-}
-
 static Aml *build_kbd_device_aml(void)
 {
     Aml *dev;
@@ -1175,7 +1096,6 @@ static Aml *build_mouse_device_aml(void)
 
 static void build_isa_devices_aml(Aml *table)
 {
-    ISADevice *fdc = pc_find_fdc0();
     bool ambiguous;
 
     Aml *scope = aml_scope("_SB.PCI0.ISA");
@@ -1183,9 +1103,6 @@ static void build_isa_devices_aml(Aml *table)
 
     aml_append(scope, build_kbd_device_aml());
     aml_append(scope, build_mouse_device_aml());
-    if (fdc) {
-        aml_append(scope, build_fdc_device_aml(fdc));
-    }
 
     if (ambiguous) {
         error_report("Multiple ISA busses, unable to define IPMI ACPI data");
diff --git a/stubs/cmos.c b/stubs/cmos.c
new file mode 100644
index 000000000000..416cbe4055ff
--- /dev/null
+++ b/stubs/cmos.c
@@ -0,0 +1,7 @@
+#include "qemu/osdep.h"
+#include "hw/i386/pc.h"
+
+int cmos_get_fd_drive_type(FloppyDriveType fd0)
+{
+    return 0;
+}
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 45be5dc0ed78..3cbe472d1c6c 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -3,6 +3,7 @@ stub-obj-y += bdrv-next-monitor-owned.o
 stub-obj-y += blk-commit-all.o
 stub-obj-y += blockdev-close-all-bdrv-states.o
 stub-obj-y += clock-warp.o
+stub-obj-y += cmos.o
 stub-obj-y += cpu-get-clock.o
 stub-obj-y += cpu-get-icount.o
 stub-obj-y += dump.o
-- 
2.18.4



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

* [PATCH v6 09/16] floppy: make isa_fdc_get_drive_max_chs static
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (7 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 08/16] acpi: move aml builder code for floppy device Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc Gerd Hoffmann
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

acpi aml generator needs this, but it is in floppy code now
so we can make the function static.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
---
 include/hw/block/fdc.h | 2 --
 hw/block/fdc.c         | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h
index c15ff4c62315..5d71cf972268 100644
--- a/include/hw/block/fdc.h
+++ b/include/hw/block/fdc.h
@@ -16,7 +16,5 @@ void sun4m_fdctrl_init(qemu_irq irq, hwaddr io_base,
                        DriveInfo **fds, qemu_irq *fdc_tc);
 
 FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i);
-void isa_fdc_get_drive_max_chs(FloppyDriveType type,
-                               uint8_t *maxc, uint8_t *maxh, uint8_t *maxs);
 
 #endif
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index b4d2eaf66dcd..8024c822cea3 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -2744,8 +2744,8 @@ FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i)
     return isa->state.drives[i].drive;
 }
 
-void isa_fdc_get_drive_max_chs(FloppyDriveType type,
-                               uint8_t *maxc, uint8_t *maxh, uint8_t *maxs)
+static void isa_fdc_get_drive_max_chs(FloppyDriveType type, uint8_t *maxc,
+                                      uint8_t *maxh, uint8_t *maxs)
 {
     const FDFormat *fdf;
 
-- 
2.18.4



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

* [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (8 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 09/16] floppy: make isa_fdc_get_drive_max_chs static Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-19 14:51   ` Philippe Mathieu-Daudé
  2020-05-15 15:04 ` [PATCH v6 11/16] acpi: move aml builder code for i8042 (kbd+mouse) device Gerd Hoffmann
                   ` (10 subsequent siblings)
  20 siblings, 1 reply; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

---
 include/hw/block/fdc.h |  1 +
 include/hw/i386/pc.h   |  1 -
 hw/block/fdc.c         | 26 +++++++++++++++++++++++++-
 hw/i386/pc.c           | 25 -------------------------
 4 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h
index 5d71cf972268..479cebc0a330 100644
--- a/include/hw/block/fdc.h
+++ b/include/hw/block/fdc.h
@@ -16,5 +16,6 @@ void sun4m_fdctrl_init(qemu_irq irq, hwaddr io_base,
                        DriveInfo **fds, qemu_irq *fdc_tc);
 
 FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i);
+int cmos_get_fd_drive_type(FloppyDriveType fd0);
 
 #endif
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 8d764f965cd3..5e3b19ab78fc 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -176,7 +176,6 @@ typedef void (*cpu_set_smm_t)(int smm, void *arg);
 void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs);
 
 ISADevice *pc_find_fdc0(void);
-int cmos_get_fd_drive_type(FloppyDriveType fd0);
 
 /* port92.c */
 #define PORT92_A20_LINE "a20"
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 8024c822cea3..ea0fb8ee15b9 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -32,7 +32,6 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
-#include "hw/i386/pc.h"
 #include "hw/acpi/aml-build.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
@@ -2809,6 +2808,31 @@ static Aml *build_fdinfo_aml(int idx, FloppyDriveType type)
     return dev;
 }
 
+int cmos_get_fd_drive_type(FloppyDriveType fd0)
+{
+    int val;
+
+    switch (fd0) {
+    case FLOPPY_DRIVE_TYPE_144:
+        /* 1.44 Mb 3"5 drive */
+        val = 4;
+        break;
+    case FLOPPY_DRIVE_TYPE_288:
+        /* 2.88 Mb 3"5 drive */
+        val = 5;
+        break;
+    case FLOPPY_DRIVE_TYPE_120:
+        /* 1.2 Mb 5"5 drive */
+        val = 2;
+        break;
+    case FLOPPY_DRIVE_TYPE_NONE:
+    default:
+        val = 0;
+        break;
+    }
+    return val;
+}
+
 static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
 {
     Aml *dev;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2128f3d6fe8b..c5db7be6d8b1 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -385,31 +385,6 @@ static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size)
 
 #define REG_EQUIPMENT_BYTE          0x14
 
-int cmos_get_fd_drive_type(FloppyDriveType fd0)
-{
-    int val;
-
-    switch (fd0) {
-    case FLOPPY_DRIVE_TYPE_144:
-        /* 1.44 Mb 3"5 drive */
-        val = 4;
-        break;
-    case FLOPPY_DRIVE_TYPE_288:
-        /* 2.88 Mb 3"5 drive */
-        val = 5;
-        break;
-    case FLOPPY_DRIVE_TYPE_120:
-        /* 1.2 Mb 5"5 drive */
-        val = 2;
-        break;
-    case FLOPPY_DRIVE_TYPE_NONE:
-    default:
-        val = 0;
-        break;
-    }
-    return val;
-}
-
 static void cmos_init_hd(ISADevice *s, int type_ofs, int info_ofs,
                          int16_t cylinders, int8_t heads, int8_t sectors)
 {
-- 
2.18.4



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

* [PATCH v6 11/16] acpi: move aml builder code for i8042 (kbd+mouse) device
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (9 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 12/16] acpi: factor out fw_cfg_add_acpi_dsdt() Gerd Hoffmann
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-build.c | 39 ---------------------------------------
 hw/input/pckbd.c     | 31 +++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 39 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 775936e28b9a..829e20664fff 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1058,42 +1058,6 @@ static void build_hpet_aml(Aml *table)
     aml_append(table, scope);
 }
 
-static Aml *build_kbd_device_aml(void)
-{
-    Aml *dev;
-    Aml *crs;
-
-    dev = aml_device("KBD");
-    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0303")));
-
-    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
-
-    crs = aml_resource_template();
-    aml_append(crs, aml_io(AML_DECODE16, 0x0060, 0x0060, 0x01, 0x01));
-    aml_append(crs, aml_io(AML_DECODE16, 0x0064, 0x0064, 0x01, 0x01));
-    aml_append(crs, aml_irq_no_flags(1));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-
-    return dev;
-}
-
-static Aml *build_mouse_device_aml(void)
-{
-    Aml *dev;
-    Aml *crs;
-
-    dev = aml_device("MOU");
-    aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0F13")));
-
-    aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
-
-    crs = aml_resource_template();
-    aml_append(crs, aml_irq_no_flags(12));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-
-    return dev;
-}
-
 static void build_isa_devices_aml(Aml *table)
 {
     bool ambiguous;
@@ -1101,9 +1065,6 @@ static void build_isa_devices_aml(Aml *table)
     Aml *scope = aml_scope("_SB.PCI0.ISA");
     Object *obj = object_resolve_path_type("", TYPE_ISA_BUS, &ambiguous);
 
-    aml_append(scope, build_kbd_device_aml());
-    aml_append(scope, build_mouse_device_aml());
-
     if (ambiguous) {
         error_report("Multiple ISA busses, unable to define IPMI ACPI data");
     } else if (!obj) {
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 60a41303203a..29d633ca9478 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -26,6 +26,7 @@
 #include "qemu/log.h"
 #include "hw/isa/isa.h"
 #include "migration/vmstate.h"
+#include "hw/acpi/aml-build.h"
 #include "hw/input/ps2.h"
 #include "hw/irq.h"
 #include "hw/input/i8042.h"
@@ -561,12 +562,42 @@ static void i8042_realizefn(DeviceState *dev, Error **errp)
     qemu_register_reset(kbd_reset, s);
 }
 
+static void i8042_build_aml(ISADevice *isadev, Aml *scope)
+{
+    Aml *kbd;
+    Aml *mou;
+    Aml *crs;
+
+    crs = aml_resource_template();
+    aml_append(crs, aml_io(AML_DECODE16, 0x0060, 0x0060, 0x01, 0x01));
+    aml_append(crs, aml_io(AML_DECODE16, 0x0064, 0x0064, 0x01, 0x01));
+    aml_append(crs, aml_irq_no_flags(1));
+
+    kbd = aml_device("KBD");
+    aml_append(kbd, aml_name_decl("_HID", aml_eisaid("PNP0303")));
+    aml_append(kbd, aml_name_decl("_STA", aml_int(0xf)));
+    aml_append(kbd, aml_name_decl("_CRS", crs));
+
+    crs = aml_resource_template();
+    aml_append(crs, aml_irq_no_flags(12));
+
+    mou = aml_device("MOU");
+    aml_append(mou, aml_name_decl("_HID", aml_eisaid("PNP0F13")));
+    aml_append(mou, aml_name_decl("_STA", aml_int(0xf)));
+    aml_append(mou, aml_name_decl("_CRS", crs));
+
+    aml_append(scope, kbd);
+    aml_append(scope, mou);
+}
+
 static void i8042_class_initfn(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
+    ISADeviceClass *isa = ISA_DEVICE_CLASS(klass);
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    isa->build_aml = i8042_build_aml;
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
-- 
2.18.4



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

* [PATCH v6 12/16] acpi: factor out fw_cfg_add_acpi_dsdt()
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (10 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 11/16] acpi: move aml builder code for i8042 (kbd+mouse) device Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 13/16] acpi: simplify build_isa_devices_aml() Gerd Hoffmann
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Add helper function to add fw_cfg device,
also move code to hw/i386/fw_cfg.c.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/fw_cfg.h     |  1 +
 hw/i386/acpi-build.c | 24 +-----------------------
 hw/i386/fw_cfg.c     | 28 ++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/hw/i386/fw_cfg.h b/hw/i386/fw_cfg.h
index 9e742787792b..275f15c1c5e8 100644
--- a/hw/i386/fw_cfg.h
+++ b/hw/i386/fw_cfg.h
@@ -25,5 +25,6 @@ FWCfgState *fw_cfg_arch_create(MachineState *ms,
                                uint16_t apic_id_limit);
 void fw_cfg_build_smbios(MachineState *ms, FWCfgState *fw_cfg);
 void fw_cfg_build_feature_control(MachineState *ms, FWCfgState *fw_cfg);
+void fw_cfg_add_acpi_dsdt(Aml *scope, FWCfgState *fw_cfg);
 
 #endif
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 829e20664fff..cb3913d2ee76 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1880,30 +1880,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
 
     /* create fw_cfg node, unconditionally */
     {
-        /* when using port i/o, the 8-bit data register *always* overlaps
-         * with half of the 16-bit control register. Hence, the total size
-         * of the i/o region used is FW_CFG_CTL_SIZE; when using DMA, the
-         * DMA control register is located at FW_CFG_DMA_IO_BASE + 4 */
-        uint8_t io_size = object_property_get_bool(OBJECT(x86ms->fw_cfg),
-                                                   "dma_enabled", NULL) ?
-                          ROUND_UP(FW_CFG_CTL_SIZE, 4) + sizeof(dma_addr_t) :
-                          FW_CFG_CTL_SIZE;
-
         scope = aml_scope("\\_SB.PCI0");
-        dev = aml_device("FWCF");
-
-        aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0002")));
-
-        /* device present, functioning, decoding, not shown in UI */
-        aml_append(dev, aml_name_decl("_STA", aml_int(0xB)));
-
-        crs = aml_resource_template();
-        aml_append(crs,
-            aml_io(AML_DECODE16, FW_CFG_IO_BASE, FW_CFG_IO_BASE, 0x01, io_size)
-        );
-        aml_append(dev, aml_name_decl("_CRS", crs));
-
-        aml_append(scope, dev);
+        fw_cfg_add_acpi_dsdt(scope, x86ms->fw_cfg);
         aml_append(dsdt, scope);
     }
 
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index da60ada59462..c55abfb01abb 100644
--- a/hw/i386/fw_cfg.c
+++ b/hw/i386/fw_cfg.c
@@ -15,6 +15,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/numa.h"
 #include "hw/acpi/acpi.h"
+#include "hw/acpi/aml-build.h"
 #include "hw/firmware/smbios.h"
 #include "hw/i386/fw_cfg.h"
 #include "hw/timer/hpet.h"
@@ -179,3 +180,30 @@ void fw_cfg_build_feature_control(MachineState *ms, FWCfgState *fw_cfg)
     *val = cpu_to_le64(feature_control_bits | FEATURE_CONTROL_LOCKED);
     fw_cfg_add_file(fw_cfg, "etc/msr_feature_control", val, sizeof(*val));
 }
+
+void fw_cfg_add_acpi_dsdt(Aml *scope, FWCfgState *fw_cfg)
+{
+    /*
+     * when using port i/o, the 8-bit data register *always* overlaps
+     * with half of the 16-bit control register. Hence, the total size
+     * of the i/o region used is FW_CFG_CTL_SIZE; when using DMA, the
+     * DMA control register is located at FW_CFG_DMA_IO_BASE + 4
+     */
+    Object *obj = OBJECT(fw_cfg);
+    uint8_t io_size = object_property_get_bool(obj, "dma_enabled", NULL) ?
+        ROUND_UP(FW_CFG_CTL_SIZE, 4) + sizeof(dma_addr_t) :
+        FW_CFG_CTL_SIZE;
+    Aml *dev = aml_device("FWCF");
+    Aml *crs = aml_resource_template();
+
+    aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0002")));
+
+    /* device present, functioning, decoding, not shown in UI */
+    aml_append(dev, aml_name_decl("_STA", aml_int(0xB)));
+
+    aml_append(crs,
+        aml_io(AML_DECODE16, FW_CFG_IO_BASE, FW_CFG_IO_BASE, 0x01, io_size));
+
+    aml_append(dev, aml_name_decl("_CRS", crs));
+    aml_append(scope, dev);
+}
-- 
2.18.4



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

* [PATCH v6 13/16] acpi: simplify build_isa_devices_aml()
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (11 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 12/16] acpi: factor out fw_cfg_add_acpi_dsdt() Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 14/16] acpi: drop serial/parallel enable bits from dsdt Gerd Hoffmann
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

x86 machines can have a single ISA bus only.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/i386/acpi-build.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index cb3913d2ee76..1922868f3401 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1061,19 +1061,14 @@ static void build_hpet_aml(Aml *table)
 static void build_isa_devices_aml(Aml *table)
 {
     bool ambiguous;
-
-    Aml *scope = aml_scope("_SB.PCI0.ISA");
     Object *obj = object_resolve_path_type("", TYPE_ISA_BUS, &ambiguous);
+    Aml *scope;
 
-    if (ambiguous) {
-        error_report("Multiple ISA busses, unable to define IPMI ACPI data");
-    } else if (!obj) {
-        error_report("No ISA bus, unable to define IPMI ACPI data");
-    } else {
-        build_acpi_ipmi_devices(scope, BUS(obj), "\\_SB.PCI0.ISA");
-        isa_build_aml(ISA_BUS(obj), scope);
-    }
+    assert(obj && !ambiguous);
 
+    scope = aml_scope("_SB.PCI0.ISA");
+    build_acpi_ipmi_devices(scope, BUS(obj), "\\_SB.PCI0.ISA");
+    isa_build_aml(ISA_BUS(obj), scope);
     aml_append(table, scope);
 }
 
-- 
2.18.4



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

* [PATCH v6 14/16] acpi: drop serial/parallel enable bits from dsdt
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (12 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 13/16] acpi: simplify build_isa_devices_aml() Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-15 15:04 ` [PATCH v6 15/16] acpi: drop build_piix4_pm() Gerd Hoffmann
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

The _STA methods for COM+LPT used to reference them,
but that isn't the case any more.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-build.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 1922868f3401..765409a90eb6 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1437,15 +1437,6 @@ static void build_q35_isa_bridge(Aml *table)
     aml_append(field, aml_named_field("LPTD", 2));
     aml_append(dev, field);
 
-    aml_append(dev, aml_operation_region("LPCE", AML_PCI_CONFIG,
-                                         aml_int(0x82), 0x02));
-    /* enable bits */
-    field = aml_field("LPCE", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE);
-    aml_append(field, aml_named_field("CAEN", 1));
-    aml_append(field, aml_named_field("CBEN", 1));
-    aml_append(field, aml_named_field("LPEN", 1));
-    aml_append(dev, field);
-
     aml_append(scope, dev);
     aml_append(table, scope);
 }
@@ -1469,7 +1460,6 @@ static void build_piix4_isa_bridge(Aml *table)
 {
     Aml *dev;
     Aml *scope;
-    Aml *field;
 
     scope =  aml_scope("_SB.PCI0");
     dev = aml_device("ISA");
@@ -1478,19 +1468,6 @@ static void build_piix4_isa_bridge(Aml *table)
     /* PIIX PCI to ISA irq remapping */
     aml_append(dev, aml_operation_region("P40C", AML_PCI_CONFIG,
                                          aml_int(0x60), 0x04));
-    /* enable bits */
-    field = aml_field("^PX13.P13C", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE);
-    /* Offset(0x5f),, 7, */
-    aml_append(field, aml_reserved_field(0x2f8));
-    aml_append(field, aml_reserved_field(7));
-    aml_append(field, aml_named_field("LPEN", 1));
-    /* Offset(0x67),, 3, */
-    aml_append(field, aml_reserved_field(0x38));
-    aml_append(field, aml_reserved_field(3));
-    aml_append(field, aml_named_field("CAEN", 1));
-    aml_append(field, aml_reserved_field(3));
-    aml_append(field, aml_named_field("CBEN", 1));
-    aml_append(dev, field);
 
     aml_append(scope, dev);
     aml_append(table, scope);
-- 
2.18.4



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

* [PATCH v6 15/16] acpi: drop build_piix4_pm()
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (13 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 14/16] acpi: drop serial/parallel enable bits from dsdt Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-20 10:20   ` Igor Mammedow
  2020-05-15 15:04 ` [PATCH v6 16/16] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion Gerd Hoffmann
                   ` (5 subsequent siblings)
  20 siblings, 1 reply; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

The _SB.PCI0.PX13.P13C opregion (holds isa device enable bits)
is not used any more, remove it from DSDT.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/i386/acpi-build.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 765409a90eb6..c1e63cce5e8e 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1441,21 +1441,6 @@ static void build_q35_isa_bridge(Aml *table)
     aml_append(table, scope);
 }
 
-static void build_piix4_pm(Aml *table)
-{
-    Aml *dev;
-    Aml *scope;
-
-    scope =  aml_scope("_SB.PCI0");
-    dev = aml_device("PX13");
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0x00010003)));
-
-    aml_append(dev, aml_operation_region("P13C", AML_PCI_CONFIG,
-                                         aml_int(0x00), 0xff));
-    aml_append(scope, dev);
-    aml_append(table, scope);
-}
-
 static void build_piix4_isa_bridge(Aml *table)
 {
     Aml *dev;
@@ -1607,7 +1592,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
         aml_append(dsdt, sb_scope);
 
         build_hpet_aml(dsdt);
-        build_piix4_pm(dsdt);
         build_piix4_isa_bridge(dsdt);
         build_isa_devices_aml(dsdt);
         build_piix4_pci_hotplug(dsdt);
-- 
2.18.4



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

* [PATCH v6 16/16] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (14 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 15/16] acpi: drop build_piix4_pm() Gerd Hoffmann
@ 2020-05-15 15:04 ` Gerd Hoffmann
  2020-05-16  0:23 ` [PATCH v6 00/16] acpi: i386 tweaks no-reply
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-15 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Gerd Hoffmann, Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

Seems to be unused.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-build.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index c1e63cce5e8e..1afb47b09ee9 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1417,7 +1417,6 @@ static void build_q35_isa_bridge(Aml *table)
 {
     Aml *dev;
     Aml *scope;
-    Aml *field;
 
     scope =  aml_scope("_SB.PCI0");
     dev = aml_device("ISA");
@@ -1427,16 +1426,6 @@ static void build_q35_isa_bridge(Aml *table)
     aml_append(dev, aml_operation_region("PIRQ", AML_PCI_CONFIG,
                                          aml_int(0x60), 0x0C));
 
-    aml_append(dev, aml_operation_region("LPCD", AML_PCI_CONFIG,
-                                         aml_int(0x80), 0x02));
-    field = aml_field("LPCD", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE);
-    aml_append(field, aml_named_field("COMA", 3));
-    aml_append(field, aml_reserved_field(1));
-    aml_append(field, aml_named_field("COMB", 3));
-    aml_append(field, aml_reserved_field(1));
-    aml_append(field, aml_named_field("LPTD", 2));
-    aml_append(dev, field);
-
     aml_append(scope, dev);
     aml_append(table, scope);
 }
-- 
2.18.4



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

* Re: [PATCH v6 00/16] acpi: i386 tweaks
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (15 preceding siblings ...)
  2020-05-15 15:04 ` [PATCH v6 16/16] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion Gerd Hoffmann
@ 2020-05-16  0:23 ` no-reply
  2020-05-16  8:29 ` no-reply
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: no-reply @ 2020-05-16  0:23 UTC (permalink / raw)
  To: kraxel
  Cc: lvivier, kwolf, thuth, ehabkost, qemu-block, mst, qemu-devel,
	mreitz, marcandre.lureau, kraxel, pbonzini, imammedo, jsnow, rth

Patchew URL: https://patchew.org/QEMU/20200515150421.25479-1-kraxel@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200515150421.25479-1-kraxel@redhat.com
Subject: [PATCH v6 00/16] acpi: i386 tweaks
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
50ccf98 acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.
9df782c acpi: drop build_piix4_pm()
3dde274 acpi: drop serial/parallel enable bits from dsdt
ba91b3c acpi: simplify build_isa_devices_aml()
b3c142b acpi: factor out fw_cfg_add_acpi_dsdt()
c323a33 acpi: move aml builder code for i8042 (kbd+mouse) device
3e7bae0 floppy: move cmos_get_fd_drive_type() from pc
e9149b0 floppy: make isa_fdc_get_drive_max_chs static
db4dee8 acpi: move aml builder code for floppy device
0260d46 acpi: move aml builder code for parallel device
ddf467f acpi: parallel: don't use _STA method
64d08f8 acpi: move aml builder code for serial device
8104cb6 acpi: serial: don't use _STA method
6d7f2e7 acpi: rtc: use a single crs range
fa494c5 acpi: move aml builder code for rtc device
7300b89 qtest: allow DSDT acpi table changes

=== OUTPUT BEGIN ===
1/16 Checking commit 7300b8986cb8 (qtest: allow DSDT acpi table changes)
2/16 Checking commit fa494c572f21 (acpi: move aml builder code for rtc device)
3/16 Checking commit 6d7f2e7fcb02 (acpi: rtc: use a single crs range)
4/16 Checking commit 8104cb67898a (acpi: serial: don't use _STA method)
5/16 Checking commit 64d08f8cd884 (acpi: move aml builder code for serial device)
6/16 Checking commit ddf467f98a4a (acpi: parallel: don't use _STA method)
7/16 Checking commit 0260d46f99be (acpi: move aml builder code for parallel device)
8/16 Checking commit db4dee8bd791 (acpi: move aml builder code for floppy device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#245: 
new file mode 100644

total: 0 errors, 1 warnings, 221 lines checked

Patch 8/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/16 Checking commit e9149b0c087e (floppy: make isa_fdc_get_drive_max_chs static)
10/16 Checking commit 3e7bae0c4433 (floppy: move cmos_get_fd_drive_type() from pc)
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 82 lines checked

Patch 10/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

11/16 Checking commit c323a336b719 (acpi: move aml builder code for i8042 (kbd+mouse) device)
12/16 Checking commit b3c142be77e7 (acpi: factor out fw_cfg_add_acpi_dsdt())
13/16 Checking commit ba91b3cd8ac4 (acpi: simplify build_isa_devices_aml())
14/16 Checking commit 3dde274c7e73 (acpi: drop serial/parallel enable bits from dsdt)
15/16 Checking commit 9df782c3c334 (acpi: drop build_piix4_pm())
16/16 Checking commit 50ccf983fc52 (acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200515150421.25479-1-kraxel@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [PATCH v6 00/16] acpi: i386 tweaks
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (16 preceding siblings ...)
  2020-05-16  0:23 ` [PATCH v6 00/16] acpi: i386 tweaks no-reply
@ 2020-05-16  8:29 ` no-reply
  2020-05-16 12:51 ` no-reply
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 30+ messages in thread
From: no-reply @ 2020-05-16  8:29 UTC (permalink / raw)
  To: kraxel
  Cc: lvivier, kwolf, thuth, ehabkost, qemu-block, mst, qemu-devel,
	mreitz, marcandre.lureau, kraxel, pbonzini, imammedo, jsnow, rth

Patchew URL: https://patchew.org/QEMU/20200515150421.25479-1-kraxel@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200515150421.25479-1-kraxel@redhat.com
Subject: [PATCH v6 00/16] acpi: i386 tweaks
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
69ff2b9 acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.
0e608e1 acpi: drop build_piix4_pm()
79bb41f acpi: drop serial/parallel enable bits from dsdt
3d483e1 acpi: simplify build_isa_devices_aml()
c9db35e acpi: factor out fw_cfg_add_acpi_dsdt()
4d0c5ba acpi: move aml builder code for i8042 (kbd+mouse) device
db9a5fa floppy: move cmos_get_fd_drive_type() from pc
3d99a4d floppy: make isa_fdc_get_drive_max_chs static
50ec383 acpi: move aml builder code for floppy device
ca585c0 acpi: move aml builder code for parallel device
db438d0 acpi: parallel: don't use _STA method
6a5550d acpi: move aml builder code for serial device
585d308 acpi: serial: don't use _STA method
6390dcb acpi: rtc: use a single crs range
730eda7 acpi: move aml builder code for rtc device
0f58dfa qtest: allow DSDT acpi table changes

=== OUTPUT BEGIN ===
1/16 Checking commit 0f58dfaf03d2 (qtest: allow DSDT acpi table changes)
2/16 Checking commit 730eda75f32f (acpi: move aml builder code for rtc device)
3/16 Checking commit 6390dcbc7606 (acpi: rtc: use a single crs range)
4/16 Checking commit 585d308b5a73 (acpi: serial: don't use _STA method)
5/16 Checking commit 6a5550d61069 (acpi: move aml builder code for serial device)
6/16 Checking commit db438d094684 (acpi: parallel: don't use _STA method)
7/16 Checking commit ca585c07c338 (acpi: move aml builder code for parallel device)
8/16 Checking commit 50ec383087f1 (acpi: move aml builder code for floppy device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#245: 
new file mode 100644

total: 0 errors, 1 warnings, 221 lines checked

Patch 8/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/16 Checking commit 3d99a4dae716 (floppy: make isa_fdc_get_drive_max_chs static)
10/16 Checking commit db9a5fa00fa3 (floppy: move cmos_get_fd_drive_type() from pc)
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 82 lines checked

Patch 10/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

11/16 Checking commit 4d0c5bab6dae (acpi: move aml builder code for i8042 (kbd+mouse) device)
12/16 Checking commit c9db35eb2c73 (acpi: factor out fw_cfg_add_acpi_dsdt())
13/16 Checking commit 3d483e1810c7 (acpi: simplify build_isa_devices_aml())
14/16 Checking commit 79bb41f701f3 (acpi: drop serial/parallel enable bits from dsdt)
15/16 Checking commit 0e608e189800 (acpi: drop build_piix4_pm())
16/16 Checking commit 69ff2b91c86b (acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200515150421.25479-1-kraxel@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [PATCH v6 00/16] acpi: i386 tweaks
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (17 preceding siblings ...)
  2020-05-16  8:29 ` no-reply
@ 2020-05-16 12:51 ` no-reply
  2020-06-08 13:22 ` Gerd Hoffmann
  2020-06-09 14:29 ` Michael S. Tsirkin
  20 siblings, 0 replies; 30+ messages in thread
From: no-reply @ 2020-05-16 12:51 UTC (permalink / raw)
  To: kraxel
  Cc: lvivier, kwolf, thuth, ehabkost, qemu-block, mst, qemu-devel,
	mreitz, marcandre.lureau, kraxel, pbonzini, imammedo, jsnow, rth

Patchew URL: https://patchew.org/QEMU/20200515150421.25479-1-kraxel@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200515150421.25479-1-kraxel@redhat.com
Subject: [PATCH v6 00/16] acpi: i386 tweaks
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
9adb28d acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.
646a108 acpi: drop build_piix4_pm()
6324bba acpi: drop serial/parallel enable bits from dsdt
4a8ceb8 acpi: simplify build_isa_devices_aml()
d8ccc6f acpi: factor out fw_cfg_add_acpi_dsdt()
e0c5fc4 acpi: move aml builder code for i8042 (kbd+mouse) device
4eb0cc0 floppy: move cmos_get_fd_drive_type() from pc
71d56fa floppy: make isa_fdc_get_drive_max_chs static
c895a16 acpi: move aml builder code for floppy device
41e32d4 acpi: move aml builder code for parallel device
fe41881 acpi: parallel: don't use _STA method
bcb5ae4 acpi: move aml builder code for serial device
49e11f9 acpi: serial: don't use _STA method
6e7ae5d acpi: rtc: use a single crs range
e1b1294 acpi: move aml builder code for rtc device
10fc2d4 qtest: allow DSDT acpi table changes

=== OUTPUT BEGIN ===
1/16 Checking commit 10fc2d45a6fa (qtest: allow DSDT acpi table changes)
2/16 Checking commit e1b1294da937 (acpi: move aml builder code for rtc device)
3/16 Checking commit 6e7ae5d0138b (acpi: rtc: use a single crs range)
4/16 Checking commit 49e11f9e91f4 (acpi: serial: don't use _STA method)
5/16 Checking commit bcb5ae4dd8b1 (acpi: move aml builder code for serial device)
6/16 Checking commit fe4188155acf (acpi: parallel: don't use _STA method)
7/16 Checking commit 41e32d4b35c3 (acpi: move aml builder code for parallel device)
8/16 Checking commit c895a1614849 (acpi: move aml builder code for floppy device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#245: 
new file mode 100644

total: 0 errors, 1 warnings, 221 lines checked

Patch 8/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/16 Checking commit 71d56fa8b146 (floppy: make isa_fdc_get_drive_max_chs static)
10/16 Checking commit 4eb0cc051852 (floppy: move cmos_get_fd_drive_type() from pc)
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 82 lines checked

Patch 10/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

11/16 Checking commit e0c5fc44de76 (acpi: move aml builder code for i8042 (kbd+mouse) device)
12/16 Checking commit d8ccc6f08dcd (acpi: factor out fw_cfg_add_acpi_dsdt())
13/16 Checking commit 4a8ceb8d9dd9 (acpi: simplify build_isa_devices_aml())
14/16 Checking commit 6324bbac2984 (acpi: drop serial/parallel enable bits from dsdt)
15/16 Checking commit 646a108f5ece (acpi: drop build_piix4_pm())
16/16 Checking commit 9adb28d40ad3 (acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200515150421.25479-1-kraxel@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc
  2020-05-15 15:04 ` [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc Gerd Hoffmann
@ 2020-05-19 14:51   ` Philippe Mathieu-Daudé
  2020-05-19 23:09     ` John Snow
  2020-05-20  8:43     ` Gerd Hoffmann
  0 siblings, 2 replies; 30+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-19 14:51 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz,
	Marc-André Lureau, Paolo Bonzini, Igor Mammedov, John Snow,
	Richard Henderson

Missing "Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>",
otherwise:

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

On 5/15/20 5:04 PM, Gerd Hoffmann wrote:
> ---
>   include/hw/block/fdc.h |  1 +
>   include/hw/i386/pc.h   |  1 -
>   hw/block/fdc.c         | 26 +++++++++++++++++++++++++-
>   hw/i386/pc.c           | 25 -------------------------
>   4 files changed, 26 insertions(+), 27 deletions(-)
> 
> diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h
> index 5d71cf972268..479cebc0a330 100644
> --- a/include/hw/block/fdc.h
> +++ b/include/hw/block/fdc.h
> @@ -16,5 +16,6 @@ void sun4m_fdctrl_init(qemu_irq irq, hwaddr io_base,
>                          DriveInfo **fds, qemu_irq *fdc_tc);
>   
>   FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i);
> +int cmos_get_fd_drive_type(FloppyDriveType fd0);
>   
>   #endif
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 8d764f965cd3..5e3b19ab78fc 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -176,7 +176,6 @@ typedef void (*cpu_set_smm_t)(int smm, void *arg);
>   void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs);
>   
>   ISADevice *pc_find_fdc0(void);
> -int cmos_get_fd_drive_type(FloppyDriveType fd0);
>   
>   /* port92.c */
>   #define PORT92_A20_LINE "a20"
> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
> index 8024c822cea3..ea0fb8ee15b9 100644
> --- a/hw/block/fdc.c
> +++ b/hw/block/fdc.c
> @@ -32,7 +32,6 @@
>   #include "qapi/error.h"
>   #include "qemu/error-report.h"
>   #include "qemu/timer.h"
> -#include "hw/i386/pc.h"
>   #include "hw/acpi/aml-build.h"
>   #include "hw/irq.h"
>   #include "hw/isa/isa.h"
> @@ -2809,6 +2808,31 @@ static Aml *build_fdinfo_aml(int idx, FloppyDriveType type)
>       return dev;
>   }
>   
> +int cmos_get_fd_drive_type(FloppyDriveType fd0)
> +{
> +    int val;
> +
> +    switch (fd0) {
> +    case FLOPPY_DRIVE_TYPE_144:
> +        /* 1.44 Mb 3"5 drive */
> +        val = 4;
> +        break;
> +    case FLOPPY_DRIVE_TYPE_288:
> +        /* 2.88 Mb 3"5 drive */
> +        val = 5;
> +        break;
> +    case FLOPPY_DRIVE_TYPE_120:
> +        /* 1.2 Mb 5"5 drive */
> +        val = 2;
> +        break;
> +    case FLOPPY_DRIVE_TYPE_NONE:
> +    default:
> +        val = 0;
> +        break;
> +    }
> +    return val;
> +}
> +
>   static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
>   {
>       Aml *dev;
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 2128f3d6fe8b..c5db7be6d8b1 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -385,31 +385,6 @@ static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size)
>   
>   #define REG_EQUIPMENT_BYTE          0x14
>   
> -int cmos_get_fd_drive_type(FloppyDriveType fd0)
> -{
> -    int val;
> -
> -    switch (fd0) {
> -    case FLOPPY_DRIVE_TYPE_144:
> -        /* 1.44 Mb 3"5 drive */
> -        val = 4;
> -        break;
> -    case FLOPPY_DRIVE_TYPE_288:
> -        /* 2.88 Mb 3"5 drive */
> -        val = 5;
> -        break;
> -    case FLOPPY_DRIVE_TYPE_120:
> -        /* 1.2 Mb 5"5 drive */
> -        val = 2;
> -        break;
> -    case FLOPPY_DRIVE_TYPE_NONE:
> -    default:
> -        val = 0;
> -        break;
> -    }
> -    return val;
> -}
> -
>   static void cmos_init_hd(ISADevice *s, int type_ofs, int info_ofs,
>                            int16_t cylinders, int8_t heads, int8_t sectors)
>   {
> 



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

* Re: [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc
  2020-05-19 14:51   ` Philippe Mathieu-Daudé
@ 2020-05-19 23:09     ` John Snow
  2020-05-20  8:43     ` Gerd Hoffmann
  1 sibling, 0 replies; 30+ messages in thread
From: John Snow @ 2020-05-19 23:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Gerd Hoffmann, qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz,
	Marc-André Lureau, Paolo Bonzini, Igor Mammedov,
	Richard Henderson



On 5/19/20 10:51 AM, Philippe Mathieu-Daudé wrote:
> Missing "Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>",
> otherwise:
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> On 5/15/20 5:04 PM, Gerd Hoffmann wrote:

If you add the S-O-B:

Acked-by: John Snow <jsnow@redhat.com>

>> ---
>>   include/hw/block/fdc.h |  1 +
>>   include/hw/i386/pc.h   |  1 -
>>   hw/block/fdc.c         | 26 +++++++++++++++++++++++++-
>>   hw/i386/pc.c           | 25 -------------------------
>>   4 files changed, 26 insertions(+), 27 deletions(-)
>>
>> diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h
>> index 5d71cf972268..479cebc0a330 100644
>> --- a/include/hw/block/fdc.h
>> +++ b/include/hw/block/fdc.h
>> @@ -16,5 +16,6 @@ void sun4m_fdctrl_init(qemu_irq irq, hwaddr io_base,
>>                          DriveInfo **fds, qemu_irq *fdc_tc);
>>     FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i);
>> +int cmos_get_fd_drive_type(FloppyDriveType fd0);
>>     #endif
>> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
>> index 8d764f965cd3..5e3b19ab78fc 100644
>> --- a/include/hw/i386/pc.h
>> +++ b/include/hw/i386/pc.h
>> @@ -176,7 +176,6 @@ typedef void (*cpu_set_smm_t)(int smm, void *arg);
>>   void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs);
>>     ISADevice *pc_find_fdc0(void);
>> -int cmos_get_fd_drive_type(FloppyDriveType fd0);
>>     /* port92.c */
>>   #define PORT92_A20_LINE "a20"
>> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
>> index 8024c822cea3..ea0fb8ee15b9 100644
>> --- a/hw/block/fdc.c
>> +++ b/hw/block/fdc.c
>> @@ -32,7 +32,6 @@
>>   #include "qapi/error.h"
>>   #include "qemu/error-report.h"
>>   #include "qemu/timer.h"
>> -#include "hw/i386/pc.h"
>>   #include "hw/acpi/aml-build.h"
>>   #include "hw/irq.h"
>>   #include "hw/isa/isa.h"
>> @@ -2809,6 +2808,31 @@ static Aml *build_fdinfo_aml(int idx,
>> FloppyDriveType type)
>>       return dev;
>>   }
>>   +int cmos_get_fd_drive_type(FloppyDriveType fd0)
>> +{
>> +    int val;
>> +
>> +    switch (fd0) {
>> +    case FLOPPY_DRIVE_TYPE_144:
>> +        /* 1.44 Mb 3"5 drive */
>> +        val = 4;
>> +        break;
>> +    case FLOPPY_DRIVE_TYPE_288:
>> +        /* 2.88 Mb 3"5 drive */
>> +        val = 5;
>> +        break;
>> +    case FLOPPY_DRIVE_TYPE_120:
>> +        /* 1.2 Mb 5"5 drive */
>> +        val = 2;
>> +        break;
>> +    case FLOPPY_DRIVE_TYPE_NONE:
>> +    default:
>> +        val = 0;
>> +        break;
>> +    }
>> +    return val;
>> +}
>> +
>>   static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
>>   {
>>       Aml *dev;
>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>> index 2128f3d6fe8b..c5db7be6d8b1 100644
>> --- a/hw/i386/pc.c
>> +++ b/hw/i386/pc.c
>> @@ -385,31 +385,6 @@ static uint64_t ioportF0_read(void *opaque,
>> hwaddr addr, unsigned size)
>>     #define REG_EQUIPMENT_BYTE          0x14
>>   -int cmos_get_fd_drive_type(FloppyDriveType fd0)
>> -{
>> -    int val;
>> -
>> -    switch (fd0) {
>> -    case FLOPPY_DRIVE_TYPE_144:
>> -        /* 1.44 Mb 3"5 drive */
>> -        val = 4;
>> -        break;
>> -    case FLOPPY_DRIVE_TYPE_288:
>> -        /* 2.88 Mb 3"5 drive */
>> -        val = 5;
>> -        break;
>> -    case FLOPPY_DRIVE_TYPE_120:
>> -        /* 1.2 Mb 5"5 drive */
>> -        val = 2;
>> -        break;
>> -    case FLOPPY_DRIVE_TYPE_NONE:
>> -    default:
>> -        val = 0;
>> -        break;
>> -    }
>> -    return val;
>> -}
>> -
>>   static void cmos_init_hd(ISADevice *s, int type_ofs, int info_ofs,
>>                            int16_t cylinders, int8_t heads, int8_t
>> sectors)
>>   {
>>
> 

-- 
—js



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

* Re: [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc
  2020-05-19 14:51   ` Philippe Mathieu-Daudé
  2020-05-19 23:09     ` John Snow
@ 2020-05-20  8:43     ` Gerd Hoffmann
  2020-05-20 10:29       ` Michael S. Tsirkin
  1 sibling, 1 reply; 30+ messages in thread
From: Gerd Hoffmann @ 2020-05-20  8:43 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, qemu-devel, Max Reitz,
	Marc-André Lureau, Paolo Bonzini, Igor Mammedov, John Snow,
	Richard Henderson

On Tue, May 19, 2020 at 04:51:44PM +0200, Philippe Mathieu-Daudé wrote:
> Missing "Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>",
> otherwise:

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

mst, can you pick that up or should I respin?

thanks,
  Gerd



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

* Re: [PATCH v6 15/16] acpi: drop build_piix4_pm()
  2020-05-15 15:04 ` [PATCH v6 15/16] acpi: drop build_piix4_pm() Gerd Hoffmann
@ 2020-05-20 10:20   ` Igor Mammedow
  0 siblings, 0 replies; 30+ messages in thread
From: Igor Mammedow @ 2020-05-20 10:20 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, qemu-devel, Max Reitz,
	Marc-André Lureau, Paolo Bonzini, John Snow,
	Richard Henderson

On Fri, 15 May 2020 17:04:20 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:

> The _SB.PCI0.PX13.P13C opregion (holds isa device enable bits)
> is not used any more, remove it from DSDT.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Igor Mammedow <imammedo@redhat.com>

> ---
>  hw/i386/acpi-build.c | 16 ----------------
>  1 file changed, 16 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 765409a90eb6..c1e63cce5e8e 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1441,21 +1441,6 @@ static void build_q35_isa_bridge(Aml *table)
>      aml_append(table, scope);
>  }
>  
> -static void build_piix4_pm(Aml *table)
> -{
> -    Aml *dev;
> -    Aml *scope;
> -
> -    scope =  aml_scope("_SB.PCI0");
> -    dev = aml_device("PX13");
> -    aml_append(dev, aml_name_decl("_ADR", aml_int(0x00010003)));
> -
> -    aml_append(dev, aml_operation_region("P13C", AML_PCI_CONFIG,
> -                                         aml_int(0x00), 0xff));
> -    aml_append(scope, dev);
> -    aml_append(table, scope);
> -}
> -
>  static void build_piix4_isa_bridge(Aml *table)
>  {
>      Aml *dev;
> @@ -1607,7 +1592,6 @@ build_dsdt(GArray *table_data, BIOSLinker
> *linker, aml_append(dsdt, sb_scope);
>  
>          build_hpet_aml(dsdt);
> -        build_piix4_pm(dsdt);
>          build_piix4_isa_bridge(dsdt);
>          build_isa_devices_aml(dsdt);
>          build_piix4_pci_hotplug(dsdt);



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

* Re: [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc
  2020-05-20  8:43     ` Gerd Hoffmann
@ 2020-05-20 10:29       ` Michael S. Tsirkin
  0 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2020-05-20 10:29 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, John Snow, qemu-devel, Max Reitz,
	Marc-André Lureau, Paolo Bonzini, Igor Mammedov,
	Philippe Mathieu-Daudé,
	Richard Henderson

On Wed, May 20, 2020 at 10:43:03AM +0200, Gerd Hoffmann wrote:
> On Tue, May 19, 2020 at 04:51:44PM +0200, Philippe Mathieu-Daudé wrote:
> > Missing "Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>",
> > otherwise:
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> 
> mst, can you pick that up or should I respin?
> 
> thanks,
>   Gerd

Not a problem.



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

* Re: [PATCH v6 00/16] acpi: i386 tweaks
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (18 preceding siblings ...)
  2020-05-16 12:51 ` no-reply
@ 2020-06-08 13:22 ` Gerd Hoffmann
  2020-06-08 13:24   ` Michael S. Tsirkin
  2020-06-09 14:29 ` Michael S. Tsirkin
  20 siblings, 1 reply; 30+ messages in thread
From: Gerd Hoffmann @ 2020-06-08 13:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Max Reitz, Igor Mammedov,
	Paolo Bonzini, Marc-André Lureau, John Snow,
	Richard Henderson

On Fri, May 15, 2020 at 05:04:05PM +0200, Gerd Hoffmann wrote:
> First batch of microvm patches, some generic acpi stuff.
> Split the acpi-build.c monster, specifically split the
> pc and q35 and pci bits into a separate file which we
> can skip building at some point in the future.
> 
> v2 changes: leave acpi-build.c largely as-is, move useful
> bits to other places to allow them being reused, specifically:
> 
>  * move isa device generator functions to individual isa devices.
>  * move fw_cfg generator function to fw_cfg.c
> 
> v3 changes: fix rtc, support multiple lpt devices.
> 
> v4 changes:
>  * drop merged patches.
>  * split rtc crs change to separata patch.
>  * added two cleanup patches.
>  * picked up ack & review tags.
> 
> v5 changes:
>  * add comment for rtc crs update.
>  * add even more cleanup patches.
>  * picked up ack & review tags.
> 
> v6 changes:
>  * floppy: move cmos_get_fd_drive_type.
>  * picked up ack & review tags.

Ping.  What is the status here?

take care,
  Gerd



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

* Re: [PATCH v6 00/16] acpi: i386 tweaks
  2020-06-08 13:22 ` Gerd Hoffmann
@ 2020-06-08 13:24   ` Michael S. Tsirkin
  0 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2020-06-08 13:24 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Igor Mammedov, qemu-devel, Max Reitz, Paolo Bonzini,
	Marc-André Lureau, John Snow, Richard Henderson

On Mon, Jun 08, 2020 at 03:22:45PM +0200, Gerd Hoffmann wrote:
> On Fri, May 15, 2020 at 05:04:05PM +0200, Gerd Hoffmann wrote:
> > First batch of microvm patches, some generic acpi stuff.
> > Split the acpi-build.c monster, specifically split the
> > pc and q35 and pci bits into a separate file which we
> > can skip building at some point in the future.
> > 
> > v2 changes: leave acpi-build.c largely as-is, move useful
> > bits to other places to allow them being reused, specifically:
> > 
> >  * move isa device generator functions to individual isa devices.
> >  * move fw_cfg generator function to fw_cfg.c
> > 
> > v3 changes: fix rtc, support multiple lpt devices.
> > 
> > v4 changes:
> >  * drop merged patches.
> >  * split rtc crs change to separata patch.
> >  * added two cleanup patches.
> >  * picked up ack & review tags.
> > 
> > v5 changes:
> >  * add comment for rtc crs update.
> >  * add even more cleanup patches.
> >  * picked up ack & review tags.
> > 
> > v6 changes:
> >  * floppy: move cmos_get_fd_drive_type.
> >  * picked up ack & review tags.
> 
> Ping.  What is the status here?
> 
> take care,
>   Gerd

It's queued and will be in the next pull. Thanks a lot!



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

* Re: [PATCH v6 08/16] acpi: move aml builder code for floppy device
  2020-05-15 15:04 ` [PATCH v6 08/16] acpi: move aml builder code for floppy device Gerd Hoffmann
@ 2020-06-09 14:28   ` Michael S. Tsirkin
  0 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2020-06-09 14:28 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Igor Mammedov, qemu-devel, Max Reitz, Paolo Bonzini,
	Marc-André Lureau, John Snow, Richard Henderson

On Fri, May 15, 2020 at 05:04:13PM +0200, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  hw/block/fdc.c       | 83 ++++++++++++++++++++++++++++++++++++++++++++
>  hw/i386/acpi-build.c | 83 --------------------------------------------
>  stubs/cmos.c         |  7 ++++
>  stubs/Makefile.objs  |  1 +
>  4 files changed, 91 insertions(+), 83 deletions(-)
>  create mode 100644 stubs/cmos.c

...

> diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
> index 45be5dc0ed78..3cbe472d1c6c 100644
> --- a/stubs/Makefile.objs
> +++ b/stubs/Makefile.objs
> @@ -3,6 +3,7 @@ stub-obj-y += bdrv-next-monitor-owned.o
>  stub-obj-y += blk-commit-all.o
>  stub-obj-y += blockdev-close-all-bdrv-states.o
>  stub-obj-y += clock-warp.o
> +stub-obj-y += cmos.o
>  stub-obj-y += cpu-get-clock.o
>  stub-obj-y += cpu-get-icount.o
>  stub-obj-y += dump.o


This seems to be based on some other tree.
Can you post based on pci tree or master pls?


> -- 
> 2.18.4



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

* Re: [PATCH v6 00/16] acpi: i386 tweaks
  2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
                   ` (19 preceding siblings ...)
  2020-06-08 13:22 ` Gerd Hoffmann
@ 2020-06-09 14:29 ` Michael S. Tsirkin
  2020-06-10  9:40   ` Gerd Hoffmann
  20 siblings, 1 reply; 30+ messages in thread
From: Michael S. Tsirkin @ 2020-06-09 14:29 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Igor Mammedov, qemu-devel, Max Reitz, Paolo Bonzini,
	Marc-André Lureau, John Snow, Richard Henderson

On Fri, May 15, 2020 at 05:04:05PM +0200, Gerd Hoffmann wrote:
> First batch of microvm patches, some generic acpi stuff.
> Split the acpi-build.c monster, specifically split the
> pc and q35 and pci bits into a separate file which we
> can skip building at some point in the future.


Applied patch 1-7. Rest all look ok but couldn't apply
since they seem to be on top of some other cleanups
which are not upstream. Pls rebased and post and I'll apply.



> v2 changes: leave acpi-build.c largely as-is, move useful
> bits to other places to allow them being reused, specifically:
> 
>  * move isa device generator functions to individual isa devices.
>  * move fw_cfg generator function to fw_cfg.c
> 
> v3 changes: fix rtc, support multiple lpt devices.
> 
> v4 changes:
>  * drop merged patches.
>  * split rtc crs change to separata patch.
>  * added two cleanup patches.
>  * picked up ack & review tags.
> 
> v5 changes:
>  * add comment for rtc crs update.
>  * add even more cleanup patches.
>  * picked up ack & review tags.
> 
> v6 changes:
>  * floppy: move cmos_get_fd_drive_type.
>  * picked up ack & review tags.
> 
> take care,
>   Gerd
> 
> Gerd Hoffmann (16):
>   qtest: allow DSDT acpi table changes
>   acpi: move aml builder code for rtc device
>   acpi: rtc: use a single crs range
>   acpi: serial: don't use _STA method
>   acpi: move aml builder code for serial device
>   acpi: parallel: don't use _STA method
>   acpi: move aml builder code for parallel device
>   acpi: move aml builder code for floppy device
>   floppy: make isa_fdc_get_drive_max_chs static
>   floppy: move cmos_get_fd_drive_type() from pc
>   acpi: move aml builder code for i8042 (kbd+mouse) device
>   acpi: factor out fw_cfg_add_acpi_dsdt()
>   acpi: simplify build_isa_devices_aml()
>   acpi: drop serial/parallel enable bits from dsdt
>   acpi: drop build_piix4_pm()
>   acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.
> 
>  hw/i386/fw_cfg.h                            |   1 +
>  include/hw/block/fdc.h                      |   3 +-
>  include/hw/i386/pc.h                        |   1 -
>  tests/qtest/bios-tables-test-allowed-diff.h |  17 ++
>  hw/block/fdc.c                              | 111 ++++++-
>  hw/char/parallel.c                          |  22 ++
>  hw/char/serial-isa.c                        |  22 ++
>  hw/i386/acpi-build.c                        | 312 +-------------------
>  hw/i386/fw_cfg.c                            |  28 ++
>  hw/i386/pc.c                                |  25 --
>  hw/input/pckbd.c                            |  31 ++
>  hw/rtc/mc146818rtc.c                        |  24 ++
>  stubs/cmos.c                                |   7 +
>  stubs/Makefile.objs                         |   1 +
>  14 files changed, 269 insertions(+), 336 deletions(-)
>  create mode 100644 stubs/cmos.c
> 
> -- 
> 2.18.4



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

* Re: [PATCH v6 00/16] acpi: i386 tweaks
  2020-06-09 14:29 ` Michael S. Tsirkin
@ 2020-06-10  9:40   ` Gerd Hoffmann
  0 siblings, 0 replies; 30+ messages in thread
From: Gerd Hoffmann @ 2020-06-10  9:40 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Igor Mammedov, qemu-devel, Max Reitz, Paolo Bonzini,
	Marc-André Lureau, John Snow, Richard Henderson

  Hi,

> Applied patch 1-7. Rest all look ok but couldn't apply
> since they seem to be on top of some other cleanups
> which are not upstream. Pls rebased and post and I'll apply.

Other way around, it is based on older master and we've got conflicting
patches merged upstream meanwhile.

I'll rebase & repost.

take care,
  Gerd



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

end of thread, other threads:[~2020-06-10  9:41 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 15:04 [PATCH v6 00/16] acpi: i386 tweaks Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 01/16] qtest: allow DSDT acpi table changes Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 02/16] acpi: move aml builder code for rtc device Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 03/16] acpi: rtc: use a single crs range Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 04/16] acpi: serial: don't use _STA method Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 05/16] acpi: move aml builder code for serial device Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 06/16] acpi: parallel: don't use _STA method Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 07/16] acpi: move aml builder code for parallel device Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 08/16] acpi: move aml builder code for floppy device Gerd Hoffmann
2020-06-09 14:28   ` Michael S. Tsirkin
2020-05-15 15:04 ` [PATCH v6 09/16] floppy: make isa_fdc_get_drive_max_chs static Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc Gerd Hoffmann
2020-05-19 14:51   ` Philippe Mathieu-Daudé
2020-05-19 23:09     ` John Snow
2020-05-20  8:43     ` Gerd Hoffmann
2020-05-20 10:29       ` Michael S. Tsirkin
2020-05-15 15:04 ` [PATCH v6 11/16] acpi: move aml builder code for i8042 (kbd+mouse) device Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 12/16] acpi: factor out fw_cfg_add_acpi_dsdt() Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 13/16] acpi: simplify build_isa_devices_aml() Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 14/16] acpi: drop serial/parallel enable bits from dsdt Gerd Hoffmann
2020-05-15 15:04 ` [PATCH v6 15/16] acpi: drop build_piix4_pm() Gerd Hoffmann
2020-05-20 10:20   ` Igor Mammedow
2020-05-15 15:04 ` [PATCH v6 16/16] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion Gerd Hoffmann
2020-05-16  0:23 ` [PATCH v6 00/16] acpi: i386 tweaks no-reply
2020-05-16  8:29 ` no-reply
2020-05-16 12:51 ` no-reply
2020-06-08 13:22 ` Gerd Hoffmann
2020-06-08 13:24   ` Michael S. Tsirkin
2020-06-09 14:29 ` Michael S. Tsirkin
2020-06-10  9:40   ` Gerd Hoffmann

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.