From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 1/7] kvm: qemu: inform valid C2 state in ACPI table
Date: Wed, 18 Jun 2008 13:42:06 -0300 [thread overview]
Message-ID: <20080618164854.403430016@localhost.localdomain> (raw)
In-Reply-To: 20080618164205.108219607@localhost.localdomain
[-- Attachment #1: acpi-fake-c2 --]
[-- Type: text/plain, Size: 3080 bytes --]
Inform C2 state support via ACPI's CST per-processor package.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: kvm-userspace.tip/bios/acpi-dsdt.dsl
===================================================================
--- kvm-userspace.tip.orig/bios/acpi-dsdt.dsl
+++ kvm-userspace.tip/bios/acpi-dsdt.dsl
@@ -33,6 +33,11 @@ DefinitionBlock (
PRU, 8,
PRD, 8,
}
+ OperationRegion(PWNO, SystemIO, 0xb040, 0x02)
+ Field (PWNO, WordAcc, NoLock, WriteAsZeros)
+ {
+ PWC, 16,
+ }
#define gen_processor(nr, name) \
Processor (CPU##name, nr, 0x0000b010, 0x06) { \
@@ -44,11 +49,23 @@ DefinitionBlock (
Method (_STA) { \
Return(0xF) \
} \
+ Name(_CST, Package() { \
+ 1, Package() { \
+ ResourceTemplate() {Register(SystemIO, 8, 0, 0xb014)}, \
+ 2, 2, 300}, \
+ }) \
} \
- Processor (CPU0, 0x00, 0x0000b010, 0x06) {Method (_STA) { Return(0xF)}}
+ Processor (CPU0, 0x00, 0x0000b010, 0x06) {
+ Method (_STA) { Return(0xF)}
+ Name(_CST, Package() {
+ 1, Package() {
+ ResourceTemplate() {Register(SystemIO, 8, 0, 0xb014)},
+ 2, 2, 300},
+ })
+ }
gen_processor(1, 1)
gen_processor(2, 2)
gen_processor(3, 3)
@@ -747,7 +764,29 @@ DefinitionBlock (
Method(_L05) {
Return(0x01)
}
+#define gen_power_notify(nr, name) \
+ Store (0xfffff, \
+ Index (DeRefOf (Index (\_PR.CPU##name._CST, 1)), 2)) \
+ Notify(\_PR.CPU##name, 0x81) \
+
Method(_L06) {
+ If (And(\_PR.PWC, 0x1)) {
+ gen_power_notify(0, 0)
+ gen_power_notify(1, 1)
+ gen_power_notify(2, 2)
+ gen_power_notify(3, 3)
+ gen_power_notify(4, 4)
+ gen_power_notify(5, 5)
+ gen_power_notify(6, 6)
+ gen_power_notify(7, 7)
+ gen_power_notify(8, 8)
+ gen_power_notify(9, 9)
+ gen_power_notify(10, A)
+ gen_power_notify(11, B)
+ gen_power_notify(12, C)
+ gen_power_notify(13, D)
+ gen_power_notify(14, E)
+ }
Return(0x01)
}
Method(_L07) {
--
next prev parent reply other threads:[~2008-06-18 16:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 16:42 [patch 0/7] force the TSC unreliable by reporting C2 state Marcelo Tosatti
2008-06-18 16:42 ` Marcelo Tosatti [this message]
2008-06-18 16:42 ` [patch 2/7] kvm: qemu: disable c2 via _CST notification Marcelo Tosatti
2008-06-18 16:42 ` [patch 3/7] libkvm: in-kernel C2 halt interface Marcelo Tosatti
2008-06-18 16:42 ` [patch 4/7] libkvm: handle_io return handler value Marcelo Tosatti
2008-06-18 16:42 ` [patch 5/7] qemu: kvm: unhalt vcpu0 on pit irq Marcelo Tosatti
2008-06-18 16:42 ` [patch 6/7] kvm: qemu: enable in-kernel C2 emulation / userspace emulation Marcelo Tosatti
2008-06-18 16:42 ` [patch 7/7] KVM: in-kernel ACPI C2 idle emulation Marcelo Tosatti
2008-06-23 3:01 ` Avi Kivity
2008-06-18 20:09 ` [patch 0/7] force the TSC unreliable by reporting C2 state Anthony Liguori
2008-06-18 20:40 ` Marcelo Tosatti
2008-06-18 21:02 ` Anthony Liguori
2008-06-18 21:21 ` Marcelo Tosatti
2008-06-18 21:42 ` Anthony Liguori
2008-06-18 22:41 ` Marcelo Tosatti
2008-06-18 22:57 ` john stultz
2008-06-18 23:08 ` Nakajima, Jun
2008-06-20 14:07 ` Andi Kleen
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=20080618164854.403430016@localhost.localdomain \
--to=mtosatti@redhat.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
/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