Skip to content

build ACPI MADT for fw_cfg clients

Laszlo Ersek qemu-devel 1 version Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 17 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11strip some whitespacearch_init.c target-i386/cpu.h vl.c+6 -60 replies
2/11change element type from "char" to "unsigned char" in ACPI table datahw/acpi.c hw/pc.h+10 -92 replies
3/11acpi_table_add(): report fatal errors through an internal Error objecthw/acpi.c+19 -140 replies
4/11qapi schema: add AcpiTableOptionsqapi-schema.json+58 -09 replies
5/11acpi_table_add(): accept QemuOpts and parse it with OptsVisitorarch_init.c hw/acpi.c hw/i386/pc.c +3 more+98 -630 replies
6/11acpi_table_add(): extract and reimplement internalshw/acpi.c+163 -1210 replies
7/11like acpi_table_install(), acpi_table_add() should propagate Errorsarch_init.c hw/acpi.c hw/i386/pc.c +1 more+16 -120 replies
8/11extract/unify the constant 0xfee00000 as APIC_DEFAULT_ADDRESShw/apic_common.c hw/i386/kvmvapic.c target-i386/cpu.c +1 more+4 -60 replies
9/11Introduce IO_APIC_DEFAULT_ADDRESS for 0xfec00000hw/i386/pc.c+3 -10 replies
10/11pc_acpi_init(): don't bail as soon as failing to find default DSDThw/i386/pc.c+17 -160 replies
11/11i386/pc: build ACPI MADT for fw_cfg clientshw/acpi.c hw/i386/pc.c hw/pc.h+134 -40 replies

Reviews trailers per patch

None of the 11 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAnthony Liguori
SeriesR-b
1/11
2/11
3/11
4/11
5/11
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/11] build ACPI MADT for fw_cfg clients

This series reworks the internals of the -acpitable command line option, and if that option is not specified, produces the APIC (MADT) table inside qemu, to be consumed over fw_cfg (alongside the DSDT).

checkpatch.pl raises quite a few complaints on the start-to-end diff of this series, but all of them are clearly wrong.

I've just posted the seabios patches too
<http://www.seabios.org/pipermail/seabios/2013-March/005960.html>; there I mentioned the following testing:

I cross-tested {patched, unpatched} qemu with {patched, unpatched} seabios. Inside a RHEL-6 guest I dumped the RSDT, DSDT, and APIC (MADT) in all four cases, and compared the results. Patched qemu with unpatched seabios don't play nicely together (two APIC (MADT) tables present). Otherwise everything seemed fine to me.

The CPU topology was set with

    -smp 3,maxcpus=16,sockets=2,cores=4,threads=2

The table dumps / disassemblies are too big to include here, please find them at
<http://people.redhat.com/~lersek/acpi_move/madt_tests.tar.gz>.

I also tested the following failure/warning modes from the qemu command line:

(01) qemu-system-x86_64 -acpitable

qemu-system-x86_64: -acpitable: requires an argument

(02) qemu-system-x86_64 -acpitable ''

Wrong acpi table provided: '-acpitable' requires one of 'data' or
'file'

(03) qemu-system-x86_64 -acpitable data=p,file=q

Wrong acpi table provided: '-acpitable' requires one of 'data' or
'file'

(04) qemu-system-x86_64 -acpitable data=''

Wrong acpi table provided: '-acpitable' requires at least one
pathname

(05) qemu-system-x86_64 -acpitable q

Wrong acpi table provided: can't open file q: No such file or
directory

(06) touch q
qemu-system-x86_64 -acpitable q

warning: ACPI table: no headers are specified [starts up]

(07) qemu-system-x86_64 -acpitable file=q

Wrong acpi table provided: ACPI table claiming to have header is
too short, available: 0, expected: 36

(08) head -c 36 /dev/zero >q
qemu-system-x86_64 -acpitable file=q

warning: ACPI table has wrong length, header says 0, actual size 36
bytes [starts up]

(09) head -c 100000 /dev/zero >q
qemu-system-x86_64 -acpitable file=q

Wrong acpi table provided: ACPI table too big, requested: 100000,
max: 65535

(10) qemu-system-x86_64 -acpitable data=q

Wrong acpi table provided: ACPI table too big, requested: 100036,
max: 65535

(11) # renamed "acpi-dsdt.aml" to something else
qemu-system-x86_64

WARNING: failed to find acpi-dsdt.aml [starts up]

(12) # recreated "acpi-dsdt.aml" with "hello, world" contents qemu-system-x86_64

WARNING: failed to load
/opt/qemu-upstream/share/qemu/acpi-dsdt.aml: ACPI table claiming to have header is too short, available: 13, expected: 36 [starts up]

Laszlo Ersek (11):
strip some whitespace
change element type from "char" to "unsigned char" in ACPI table data acpi_table_add(): report fatal errors through an internal Error
object
qapi schema: add AcpiTableOptions
acpi_table_add(): accept QemuOpts and parse it with OptsVisitor acpi_table_add(): extract and reimplement internals
like acpi_table_install(), acpi_table_add() should propagate Errors extract/unify the constant 0xfee00000 as APIC_DEFAULT_ADDRESS Introduce IO_APIC_DEFAULT_ADDRESS for 0xfec00000 pc_acpi_init(): don't bail as soon as failing to find default DSDT i386/pc: build ACPI MADT for fw_cfg clients

 qapi-schema.json           |   58 +++++++
 hw/pc.h                    |    7 +-
 include/sysemu/arch_init.h |    3 +-
 target-i386/cpu.h          |    4 +-
 arch_init.c                |   13 +-
 hw/acpi.c                  |  357 ++++++++++++++++++++++++++------------------
 hw/apic_common.c           |    2 +-
 hw/i386/kvmvapic.c         |    2 -
 hw/i386/pc.c               |  160 +++++++++++++++++++-
 target-i386/cpu.c          |    4 +-
 vl.c                       |   12 +-
 11 files changed, 449 insertions(+), 173 deletions(-)