qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest
@ 2013-09-25 11:22 Michael S. Tsirkin
  2013-09-25 11:22 ` [Qemu-devel] [PATCH v5 01/23] qemu: add Error to typedefs Michael S. Tsirkin
                   ` (24 more replies)
  0 siblings, 25 replies; 38+ messages in thread
From: Michael S. Tsirkin @ 2013-09-25 11:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, afaerber, Anthony Liguori, kraxel

This code can also be found here:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi

While this patch still uses info not available in QOM, I think it's reasonable
to merge it and then refactor as QOM properties cover more ground.

In particular, merging this patchset blocks other projects so
I think its preferable to merge now and not wait
for all required QOM properties to materialize.

I added QOM properties in ich/piix where I knew how to
do this.

If you already reviewed v4 then not much changed
as I posted incremental patches as well.

Patches 1-4 are QOM patches really. They are
same as the patchset I posted previously,
included here for completeness.

Igor suggested dropping patches 1-2 and including error.h directly.
OTOH Paolo already acked 1-4.
I think I agree with Paolo so I kept 1-2 around for now.
I hope that's ok.
They are trivial one-liners so will be easy to revert later
if we want to.

If everything's in order, I intend to merge this through my tree.

Please review, and comment.

Changes from v4:
- address comments by Paolo:
    rename loader interface
    reuse macro for hpet name
    better struct names
    move internal headers to hw/i386/
- fix typos resulting in bugs reported by Gerd

Changes from v3:
- reworked code to use QOM properties
  some info isn't yet available in QOM,
  use old-style APIs and lookups by type
- address comments by Gerd: tables are now updated
  on guest access after pci configuration

Changes from v2 repost:
- address comment by Anthony - convert to use APIs implemented
  using QOM
- address comment by Anthony - avoid tricky pointer path,
  use GArray from glib instead
- Address lots of comments by Hu Tao and Laszlo Ersek

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.

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

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, 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 (23):
  qemu: add Error to typedefs
  qom: pull in qemu/typedefs
  qom: cleanup struct Error references
  qom: add pointer to int property helpers
  fw_cfg: interface to trigger callback on read
  loader: support for unmapped ROM blobs
  pcie_host: expose UNMAPPED macro
  pcie_host: expose address format
  q35: use macro for MCFG property name
  q35: expose mmcfg size as a property
  i386: add ACPI table files from seabios
  acpi: add rules to compile ASL source
  acpi: pre-compiled ASL files
  loader: use file path size from fw_cfg.h
  i386: add bios linker/loader
  loader: allow adding ROMs in done callbacks
  i386: define pc guest info
  acpi/piix: add macros for acpi property names
  piix: APIs for pc guest info
  ich9: APIs for pc guest info
  pvpanic: add API to access io port
  hpet: add API to find it
  i386: ACPI table generation code from seabios

 configure                           |    9 +-
 hw/i386/acpi-build.h                |    9 +
 hw/i386/acpi-defs.h                 |  331 ++
 hw/i386/bios-linker-loader.h        |   27 +
 hw/lm32/lm32_hwsetup.h              |    2 +-
 include/hw/acpi/ich9.h              |    2 +
 include/hw/acpi/piix4.h             |    8 +
 include/hw/i386/ich9.h              |    2 +
 include/hw/i386/pc.h                |   23 +
 include/hw/loader.h                 |    8 +-
 include/hw/nvram/fw_cfg.h           |    8 +-
 include/hw/pci-host/q35.h           |    2 +
 include/hw/pci/pcie_host.h          |   27 +
 include/hw/timer/hpet.h             |    2 +
 include/qemu/typedefs.h             |    1 +
 include/qom/object.h                |   73 +-
 hw/acpi/ich9.c                      |   24 +
 hw/acpi/piix4.c                     |   50 +-
 hw/core/loader.c                    |   31 +-
 hw/i386/acpi-build.c                | 1198 ++++++
 hw/i386/bios-linker-loader.c        |  158 +
 hw/i386/pc.c                        |   37 +
 hw/i386/pc_piix.c                   |    5 +
 hw/i386/pc_q35.c                    |    3 +
 hw/isa/lpc_ich9.c                   |   40 +
 hw/misc/pvpanic.c                   |   13 +-
 hw/nvram/fw_cfg.c                   |   33 +-
 hw/pci-host/piix.c                  |    8 +
 hw/pci-host/q35.c                   |   26 +-
 hw/pci/pcie_host.c                  |   24 -
 hw/timer/hpet.c                     |    5 +
 qom/object.c                        |   60 +
 vl.c                                |    3 +
 hw/i386/Makefile.objs               |   27 +
 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/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 +
 scripts/acpi_extract.py             |  362 ++
 scripts/acpi_extract_preprocess.py  |   51 +
 scripts/update-acpi.sh              |    4 +
 52 files changed, 16243 insertions(+), 75 deletions(-)
 create mode 100644 hw/i386/acpi-build.h
 create mode 100644 hw/i386/acpi-defs.h
 create mode 100644 hw/i386/bios-linker-loader.h
 create mode 100644 include/hw/acpi/piix4.h
 create mode 100644 hw/i386/acpi-build.c
 create mode 100644 hw/i386/bios-linker-loader.c
 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/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 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] 38+ messages in thread

end of thread, other threads:[~2013-09-27  9:34 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 11:22 [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest Michael S. Tsirkin
2013-09-25 11:22 ` [Qemu-devel] [PATCH v5 01/23] qemu: add Error to typedefs Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 02/23] qom: pull in qemu/typedefs Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 03/23] qom: cleanup struct Error references Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 04/23] qom: add pointer to int property helpers Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 05/23] fw_cfg: interface to trigger callback on read Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 06/23] loader: support for unmapped ROM blobs Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 07/23] pcie_host: expose UNMAPPED macro Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 08/23] pcie_host: expose address format Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 09/23] q35: use macro for MCFG property name Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 10/23] q35: expose mmcfg size as a property Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 11/23] i386: add ACPI table files from seabios Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 12/23] acpi: add rules to compile ASL source Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 13/23] acpi: pre-compiled ASL files Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 14/23] loader: use file path size from fw_cfg.h Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 15/23] i386: add bios linker/loader Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 16/23] loader: allow adding ROMs in done callbacks Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 17/23] i386: define pc guest info Michael S. Tsirkin
2013-09-25 11:23 ` [Qemu-devel] [PATCH v5 18/23] acpi/piix: add macros for acpi property names Michael S. Tsirkin
2013-09-25 11:24 ` [Qemu-devel] [PATCH v5 19/23] piix: APIs for pc guest info Michael S. Tsirkin
2013-09-25 11:24 ` [Qemu-devel] [PATCH v5 20/23] ich9: " Michael S. Tsirkin
2013-09-25 11:24 ` [Qemu-devel] [PATCH v5 21/23] pvpanic: add API to access io port Michael S. Tsirkin
2013-09-25 11:24 ` [Qemu-devel] [PATCH v5 22/23] hpet: add API to find it Michael S. Tsirkin
2013-09-25 11:24 ` [Qemu-devel] [PATCH v5 23/23] i386: ACPI table generation code from seabios Michael S. Tsirkin
2013-09-25 12:48 ` [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest Gerd Hoffmann
2013-09-25 12:59   ` Michael S. Tsirkin
2013-09-25 13:02     ` Gerd Hoffmann
2013-09-25 13:09       ` Michael S. Tsirkin
2013-09-25 13:26         ` Gerd Hoffmann
2013-09-26 22:18           ` Michael S. Tsirkin
2013-09-27  9:34             ` Gerd Hoffmann
2013-09-25 13:03     ` Michael S. Tsirkin
2013-09-25 13:12 ` Gerd Hoffmann
2013-09-25 14:15   ` Gerd Hoffmann
2013-09-25 14:48     ` Michael S. Tsirkin
2013-09-26  6:26       ` Gerd Hoffmann
2013-09-26 21:33         ` Michael S. Tsirkin
2013-09-26 21:50         ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).