From: "Radim Krčmář" <rkrcmar@redhat.com>
To: qemu-devel@nongnu.org
Cc: imammedo@redhat.com, rth@twiddle.net, mst@redhat.com,
pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] pc: acpi: keep pvpanic backward compatible
Date: Wed, 27 May 2015 18:29:17 +0200 [thread overview]
Message-ID: <1432744157-13798-1-git-send-email-rkrcmar@redhat.com> (raw)
In the old times, we always had pvpanic in ACPI and a _STA function told
the guest not to use it. Now, we only include pvpanic in ACPI if it is
enabled, so the _STA function is useless from qemu's point of view, but
guests still want to query availability. Make them happy.
This patch extends
e65bef695441 pc: acpi: fix pvpanic regression
The original _STA method was
Method (_STA, 0, NotSerialized) {
Store (PEST, Local0)
If (LEqual (Local0, Zero)) {
Return (Zero) }
Else {
Return (0x0F) }}
hence we return only 0xf now.
(Why Linux does '& 0xb' on this result is completely beyond me.)
Also, the device used to be PEVT. (PEVT as in "panic event"?)
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
hw/i386/acpi-build.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 73259e729b9f..4141c110a8e1 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,10 @@ build_ssdt(GArray *table_data, GArray *linker,
aml_append(field, aml_named_field("PEPT", 8));
aml_append(dev, field);
+ method = aml_method("_STA", 0);
+ aml_append(method, aml_return(aml_int(0xf)));
+ aml_append(dev, method);
+
method = aml_method("RDPT", 0);
aml_append(method, aml_store(aml_name("PEPT"), aml_local(0)));
aml_append(method, aml_return(aml_local(0)));
--
2.4.1
next reply other threads:[~2015-05-27 16:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 16:29 Radim Krčmář [this message]
2015-05-29 8:51 ` [Qemu-devel] [PATCH] pc: acpi: keep pvpanic backward compatible Igor Mammedov
2015-05-29 11:24 ` Radim Krčmář
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432744157-13798-1-git-send-email-rkrcmar@redhat.com \
--to=rkrcmar@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).