All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 repost 0/9] qemu: generate acpi tables for the guest
@ 2013-07-10 13:51 Michael S. Tsirkin
  2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 1/9] hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h Michael S. Tsirkin
                   ` (8 more replies)
  0 siblings, 9 replies; 34+ messages in thread
From: Michael S. Tsirkin @ 2013-07-10 13:51 UTC (permalink / raw)
  To: qemu-devel

This is just a repost to make sure it is actually testable for people -
my previous post missed some patches. Sorry about the noise.
I am still making changes to address Anthony's comments,
reposting now so that people working on patches
that depend on this infrastructure can make progress.
This code can also be found here:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi

Changes from v2:
- added missing patches to make it actually build
Changes from v1 RFC:
- added code to address cross version compatibility
- rebased to latest bits
- updated seabios code to latest bits (added pvpanic device)

This patchset moves all generation of ACPI tables
from guest BIOS to the hypervisor.

Although ACPI tables come from a system BIOS on real hw,
it makes sense that the ACPI tables are coupled with the
virtual machine, since they have to abstract the x86 machine to
the OS's.

This is widely desired as a way to avoid the churn
and proliferation of QEMU-specific interfaces
associated with ACPI tables in bios code.

If you look at the actual code:
 i386: imports ACPI table generation code from seabios
you will see that it's more complex than it
needs to be, with lots of low level casts
and similar tricks.

There's also a bit of duplication where we
already declare similar acpi structures in qemu.

This is the result of code being a direct port from seabios.
Laszlo's patch (build ACPI MADT (APIC) for fw_cfg)
shows how this will be cleaned up by follow-up work.
I think it's best to do it in this order: port
code directly, and apply cleanups and reduce duplication
that results, on top.
This way it's much easier to see that we don't introduce
regressions.

In particular, for a simple VM with piix,
I booted a guest on qemu with and without the
change, and verified that ACPI tables are
unchanged except for trivial pointer address changes.

Such binary compatibility makes it easier to be
confident that this change won't break things.

Michael S. Tsirkin (9):
  hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h
  i386: add ACPI table files from seabios
  acpi: add rules to compile ASL source
  acpi: pre-compiled ASL files
  i386: add bios linker/loader
  loader: support for unmapped ROM blobs
  loader: allow adding ROMs in done callbacks
  i386: generate pc guest info
  i386: ACPI table generation code from seabios

 configure                            |    9 +-
 hw/acpi/ich9.c                       |    7 +-
 hw/acpi/piix4.c                      |   44 +-
 hw/core/loader.c                     |   38 +-
 hw/i386/Makefile.objs                |   27 +
 hw/i386/acpi-build.c                 |  723 ++++
 hw/i386/acpi-defs.h                  |  327 ++
 hw/i386/acpi-dsdt-cpu-hotplug.dsl    |   93 +
 hw/i386/acpi-dsdt-dbug.dsl           |   41 +
 hw/i386/acpi-dsdt-hpet.dsl           |   51 +
 hw/i386/acpi-dsdt-isa.dsl            |  117 +
 hw/i386/acpi-dsdt-pci-crs.dsl        |  105 +
 hw/i386/acpi-dsdt.dsl                |  343 ++
 hw/i386/acpi-dsdt.hex.generated      | 4409 ++++++++++++++++++++
 hw/i386/bios-linker-loader.c         |  155 +
 hw/i386/pc.c                         |   45 +-
 hw/i386/pc_piix.c                    |   18 +-
 hw/i386/pc_q35.c                     |   13 +-
 hw/i386/q35-acpi-dsdt.dsl            |  452 +++
 hw/i386/q35-acpi-dsdt.hex.generated  | 7346 ++++++++++++++++++++++++++++++++++
 hw/i386/ssdt-misc.dsl                |  119 +
 hw/i386/ssdt-misc.hex.generated      |  190 +
 hw/i386/ssdt-pcihp.dsl               |   51 +
 hw/i386/ssdt-pcihp.hex.generated     |  108 +
 hw/i386/ssdt-proc.dsl                |   63 +
 hw/i386/ssdt-proc.hex.generated      |  134 +
 hw/isa/lpc_ich9.c                    |   11 +-
 hw/lm32/lm32_hwsetup.h               |    2 +-
 hw/mips/mips_malta.c                 |    2 +-
 hw/misc/pvpanic.c                    |   12 +-
 hw/pci-host/q35.c                    |    1 +
 include/hw/acpi/ich9.h               |    2 +-
 include/hw/i386/acpi-build.h         |    9 +
 include/hw/i386/apic.h               |    2 +
 include/hw/i386/bios-linker-loader.h |   26 +
 include/hw/i386/ich9.h               |    3 +-
 include/hw/i386/pc.h                 |   38 +-
 include/hw/loader.h                  |    5 +-
 scripts/acpi_extract.py              |  362 ++
 scripts/acpi_extract_preprocess.py   |   52 +
 scripts/update-acpi.sh               |    4 +
 vl.c                                 |    3 +
 42 files changed, 15529 insertions(+), 33 deletions(-)
 create mode 100644 hw/i386/acpi-build.c
 create mode 100644 hw/i386/acpi-defs.h
 create mode 100644 hw/i386/acpi-dsdt-cpu-hotplug.dsl
 create mode 100644 hw/i386/acpi-dsdt-dbug.dsl
 create mode 100644 hw/i386/acpi-dsdt-hpet.dsl
 create mode 100644 hw/i386/acpi-dsdt-isa.dsl
 create mode 100644 hw/i386/acpi-dsdt-pci-crs.dsl
 create mode 100644 hw/i386/acpi-dsdt.dsl
 create mode 100644 hw/i386/acpi-dsdt.hex.generated
 create mode 100644 hw/i386/bios-linker-loader.c
 create mode 100644 hw/i386/q35-acpi-dsdt.dsl
 create mode 100644 hw/i386/q35-acpi-dsdt.hex.generated
 create mode 100644 hw/i386/ssdt-misc.dsl
 create mode 100644 hw/i386/ssdt-misc.hex.generated
 create mode 100644 hw/i386/ssdt-pcihp.dsl
 create mode 100644 hw/i386/ssdt-pcihp.hex.generated
 create mode 100644 hw/i386/ssdt-proc.dsl
 create mode 100644 hw/i386/ssdt-proc.hex.generated
 create mode 100644 include/hw/i386/acpi-build.h
 create mode 100644 include/hw/i386/bios-linker-loader.h
 create mode 100755 scripts/acpi_extract.py
 create mode 100755 scripts/acpi_extract_preprocess.py
 create mode 100644 scripts/update-acpi.sh

-- 
MST

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

end of thread, other threads:[~2013-07-24 15:46 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10 13:51 [Qemu-devel] [PATCH v2 repost 0/9] qemu: generate acpi tables for the guest Michael S. Tsirkin
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 1/9] hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h Michael S. Tsirkin
2013-07-11 16:57   ` Laszlo Ersek
2013-07-15  7:11   ` Hu Tao
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 2/9] i386: add ACPI table files from seabios Michael S. Tsirkin
2013-07-11 16:57   ` Laszlo Ersek
2013-07-15  7:49   ` Hu Tao
2013-07-15 10:14     ` Michael S. Tsirkin
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 3/9] acpi: add rules to compile ASL source Michael S. Tsirkin
2013-07-11 16:55   ` Laszlo Ersek
2013-07-11 16:58     ` Laszlo Ersek
2013-07-11 17:10     ` Michael S. Tsirkin
2013-07-15  8:00   ` Hu Tao
2013-07-15  8:19     ` Michael S. Tsirkin
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 4/9] acpi: pre-compiled ASL files Michael S. Tsirkin
2013-07-11 16:59   ` Laszlo Ersek
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 5/9] i386: add bios linker/loader Michael S. Tsirkin
2013-07-12 14:17   ` Laszlo Ersek
2013-07-14 11:41     ` Michael S. Tsirkin
2013-07-15  7:33       ` Laszlo Ersek
2013-07-15  9:01         ` Michael S. Tsirkin
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 6/9] loader: support for unmapped ROM blobs Michael S. Tsirkin
2013-07-15 13:22   ` Laszlo Ersek
2013-07-15 16:03     ` Michael S. Tsirkin
2013-07-15 18:30       ` Laszlo Ersek
2013-07-17 12:20   ` Laszlo Ersek
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 7/9] loader: allow adding ROMs in done callbacks Michael S. Tsirkin
2013-07-17 12:23   ` Laszlo Ersek
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 8/9] i386: generate pc guest info Michael S. Tsirkin
2013-07-17 15:07   ` Laszlo Ersek
2013-07-24 15:36     ` Laszlo Ersek
2013-07-24 15:47       ` Michael S. Tsirkin
2013-07-19  3:55   ` Hu Tao
2013-07-10 13:51 ` [Qemu-devel] [PATCH v2 repost 9/9] i386: ACPI table generation code from seabios Michael S. Tsirkin

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