The first patch cleans up some field assignments in build_madt(). The second one handles the case when MADT is provided by qemu over fw_cfg.
I'll soon post the qemu-side series as well.
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.
Laszlo Ersek (2): build_madt(): "fix" intsrcovr->{gsi,flags} and local_nmi->flags byte order accept MADT over fw_cfg
src/acpi.c | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-)