VT-d: honor APEI firmware-first mode in XSA-59 workaround code
authorJan Beulich <jbeulich@suse.com>
Thu, 5 Jun 2014 15:49:14 +0000 (17:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 5 Jun 2014 15:49:14 +0000 (17:49 +0200)
commit1cc37ba8dbd89fb86dad3f6c78c3fba06019fe21
treea698701d8fe29267efd4304a967518aa3f20dd18
parenta296e5383b9291db566df105a8efbdc68c517f39
VT-d: honor APEI firmware-first mode in XSA-59 workaround code

When firmware-first mode is being indicated by firmware, we shouldn't
be modifying AER registers - these are considered to be owned by
firmware in that case. Violating this is being reported to result in
SMI storms. While circumventing the workaround means re-exposing
affected hosts to the XSA-59 issues, this in any event seems better
than not booting at all. Respective messages are being issued to the
log, so the situation can be diagnosed.

The basic building blocks were taken from Linux 3.15-rc. Note that
this includes a block of code enclosed in #ifdef CONFIG_X86_MCE - we
don't define that symbol, and that code also wouldn't build without
suitable machine check side code added; that should happen eventually,
but isn't subject of this change.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reported-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Yang Zhang <yang.z.zhang@intel.com>
xen/arch/x86/acpi/boot.c
xen/drivers/acpi/apei/Makefile
xen/drivers/acpi/apei/hest.c [new file with mode: 0644]
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/quirks.c
xen/include/acpi/actbl1.h
xen/include/acpi/apei.h
xen/include/xen/acpi.h
xen/include/xen/pci.h