]> git.proxmox.com Git - mirror_qemu.git/commit - hw/i386/acpi-build.c
pc: acpi: fix pvpanic for buggy guests
authorRadim Krčmář <rkrcmar@redhat.com>
Fri, 29 May 2015 19:57:32 +0000 (21:57 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 31 May 2015 14:26:42 +0000 (16:26 +0200)
commit2332333c9738b442fbbd5b83a1eaa6be656ab9b5
treed77295d29be106bcd7dfe90cdc967a732716536e
parent99fbeafee8b568e796863980365080abdb8d675e
pc: acpi: fix pvpanic for buggy guests

In the old times, we always had pvpanic in ACPI and a _STA method told
the guest not to use it.  Automatic generation dropped the _STA method
as the specification says that missing _STA means enabled and working.
Some guests (Linux) had buggy drivers and this change made them unable
to utilize pvpanic.

A Linux patch is posted as well, but I think it's worth to make pvpanic
useable on old guests at the price of three lines and few bytes of SSDT.

The old _STA method was
  Method (_STA, 0, NotSerialized) {
      Store (PEST, Local0)
      If (LEqual (Local0, Zero)) {
          Return (Zero) }
      Else {
          Return (0x0F) }}

Igor pointed out that we don't need to use a method to return a constant
and that 0xB (don't show in UI) is the common definition now.

Also, the device used to be PEVT.  (PEVT as in "panic event"?)

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c