[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 27/60] pc: acpi: fix pvpanic for buggy guests
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 27/60] pc: acpi: fix pvpanic for buggy guests |
Date: |
Mon, 1 Jun 2015 14:23:49 +0200 |
From: Radim Krčmář <address@hidden>
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ář <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/acpi-build.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 3d19de6..283d02e 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -733,7 +733,7 @@ build_ssdt(GArray *table_data, GArray *linker,
if (misc->pvpanic_port) {
scope = aml_scope("\\_SB.PCI0.ISA");
- dev = aml_device("PEVR");
+ dev = aml_device("PEVT");
aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0001")));
crs = aml_resource_template();
@@ -748,6 +748,9 @@ build_ssdt(GArray *table_data, GArray *linker,
aml_append(field, aml_named_field("PEPT", 8));
aml_append(dev, field);
+ /* device present, functioning, decoding, not shown in UI */
+ aml_append(dev, aml_name_decl("_STA", aml_int(0xB)));
+
method = aml_method("RDPT", 0);
aml_append(method, aml_store(aml_name("PEPT"), aml_local(0)));
aml_append(method, aml_return(aml_local(0)));
--
MST
- [Qemu-devel] [PULL v2 15/60] piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13, (continued)
- [Qemu-devel] [PULL v2 15/60] piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 17/60] pc: Define MACHINE_OPTIONS macros consistently for all machines, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 18/60] pc: Define machines using a DEFINE_PC_MACHINE macro, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 19/60] pc: Convert *_MACHINE_OPTIONS macros into functions, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 20/60] pc: Move compat_props setting inside *_machine_options() functions, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 21/60] pc: Don't use QEMUMachine anymore, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 22/60] pc: Remove qemu_register_pc_machine() function, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 23/60] machine: Remove unused fields from QEMUMachine, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 24/60] piix: Add kvmclock_enabled, pci_enabled globals, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 25/60] piix: Eliminate pc_init_pci(), Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 27/60] pc: acpi: fix pvpanic for buggy guests,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 26/60] pc: Generate init functions with a macro, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 28/60] virtio: move host_features, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 29/60] virtio-ccw: Don't advertise VIRTIO_F_BAD_FEATURE, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 30/60] virtio: move VIRTIO_F_NOTIFY_ON_EMPTY into core, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 31/60] virtio-net: adding all queues in .realize(), Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 33/60] virtio: introduce virtio_get_num_queues(), Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 32/60] virtio: device_plugged() can fail, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 34/60] virtio-ccw: introduce ccw specific queue limit, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 35/60] virtio-ccw: validate the number of queues against bus limitation, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 36/60] virtio-s390: introduce virito s390 queue limit, Michael S. Tsirkin, 2015/06/01