kvm: bios: avoid accessing CMOS NVRAM from ACPI AML
commit3c83b9b3ab1929d53d1a60269afa855c13d7d773
authorGleb Natapov <gleb@qumranet.com>
Wed, 20 Aug 2008 13:15:30 +0000 (20 16:15 +0300)
committerAvi Kivity <avi@qumranet.com>
Mon, 1 Sep 2008 10:23:03 +0000 (1 13:23 +0300)
tree2a3d997e8caf2e114a7ccbfd66d5f500b6c32dd7
parent6d3608b7638d4f0432a35414b620a7277f8118f0
kvm: bios: avoid accessing CMOS NVRAM from ACPI AML

The ACPI AML, reads data from CMOS by directly
accessing ports 0x70-0x71. This makes windows guest unhappy. It logs
error EventID 4 into event log:

     ACPI BIOS is attempting to read from an illegal IO port address (0x71),
     which lies in the 0x70 - 0x71 protected address range. This could
     lead to system instability. Please contact your system vendor for
     technical assistance.

We ignored this error for a long time since there was no any stability
issues caused by it, but recently we encountered Windows 2008 reboot
problem (one of 10 reboots hangs with ACPI error) that, according to
Microsoft, is caused by CMOS access from AML code. Eliminating the
access indeed fixed reboot problem. ACPI spec defines a way to read
CMOS without accessing IO ports directly, but unfortunately neither
Windows XP nor Linux implements this part of the spec (it works in
Windows 2008 though).

Fix by assigning a fixed PCI region instead of dynamic, removing the need
to read the memory size from CMOS NVRAM.

Signed-off-by: Avi Kivity <avi@qumranet.com>
kvm/bios/acpi-dsdt.dsl