All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4] qemu: generate acpi tables for the guest
@ 2013-07-08 18:30 Michael S. Tsirkin
  2013-07-08 18:30 ` [Qemu-devel] [PATCH v2 1/4] loader: support for unmapped ROM blobs Michael S. Tsirkin
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Michael S. Tsirkin @ 2013-07-08 18:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: seabios, lersek

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

Please review, and consider for 1.6.

Changes from v1 RFC:
- added code to address cross version compatibility
- rebased to latest bits
- updated acpi tables to latest seabios bits (added pvpanic device)

Comments:

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.

An RFC patchset adding support for hotplug of devices behind
PCI to PCI bridges on top of this infrastructure was sent
to the list a while ago.
Latest version of that patchset will also be re-sent soon.

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 (4):
  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

 hw/acpi/ich9.c               |   7 +-
 hw/acpi/piix4.c              |  44 ++-
 hw/core/loader.c             |  38 ++-
 hw/i386/Makefile.objs        |   4 +
 hw/i386/acpi-build.c         | 723 +++++++++++++++++++++++++++++++++++++++++++
 hw/i386/acpi-defs.h          | 327 +++++++++++++++++++
 hw/i386/pc.c                 |  43 ++-
 hw/i386/pc_piix.c            |  18 +-
 hw/i386/pc_q35.c             |  13 +-
 hw/i386/ssdt-misc.dsl        |  46 +++
 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/ich9.h       |   3 +-
 include/hw/i386/pc.h         |  38 ++-
 include/hw/loader.h          |   5 +-
 vl.c                         |   3 +
 21 files changed, 1321 insertions(+), 30 deletions(-)
 create mode 100644 hw/i386/acpi-build.c
 create mode 100644 hw/i386/acpi-defs.h
 create mode 100644 include/hw/i386/acpi-build.h

-- 
MST

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

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

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-08 18:30 [Qemu-devel] [PATCH v2 0/4] qemu: generate acpi tables for the guest Michael S. Tsirkin
2013-07-08 18:30 ` [Qemu-devel] [PATCH v2 1/4] loader: support for unmapped ROM blobs Michael S. Tsirkin
2013-07-08 18:30 ` [Qemu-devel] [PATCH v2 2/4] loader: allow adding ROMs in done callbacks Michael S. Tsirkin
2013-07-08 18:30 ` [Qemu-devel] [PATCH v2 3/4] i386: generate pc guest info Michael S. Tsirkin
2013-07-08 19:10   ` [Qemu-devel] [SeaBIOS] " Anthony Liguori
2013-07-08 19:52     ` Michael S. Tsirkin
2013-07-24 14:42       ` Gerd Hoffmann
2013-07-24 14:52         ` Andreas Färber
2013-07-24 15:04           ` Gerd Hoffmann
2013-07-24 15:09             ` Andreas Färber
2013-07-24 15:11               ` Paolo Bonzini
2013-07-24 16:17           ` Michael S. Tsirkin
2013-07-24 15:28         ` Michael S. Tsirkin
2013-07-11 20:25     ` [Qemu-devel] " Michael S. Tsirkin
2013-07-08 18:30 ` [Qemu-devel] [PATCH v2 4/4] i386: ACPI table generation code from seabios Michael S. Tsirkin
2013-07-08 19:16   ` [Qemu-devel] [SeaBIOS] " Anthony Liguori
2013-07-08 19:57     ` Michael S. Tsirkin
2013-07-09  7:53 ` [Qemu-devel] [PATCH v2 0/4] qemu: generate acpi tables for the guest Laszlo Ersek
2013-07-09  7:57   ` Michael S. Tsirkin
2013-07-09  8:04     ` Laszlo Ersek

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.