All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Guthro <bguthro@virtualiron.com>
To: xen-devel@lists.xensource.com
Cc: Dave Lively <dlively@virtualiron.com>
Subject: [PATCH][QEMU] Allow more IDE power management
Date: Mon, 27 Aug 2007 14:45:40 -0400	[thread overview]
Message-ID: <46D31BD4.3040802@virtualiron.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Made the QEMU IDE disk tolerate more power-mgmt commands, specifically:
	WIN_SETFEATURE(EN_AAM)	- enable automatic acoustic mgmt
	WIN_SETFEATURE(DIS_AAM)	- disable automatic acoustic mgmt
	WIN_SETFEATURE(DIS_APM)	- disable automatic power mgmt
	WIN_STANDBY
	WIN_SETIDLE1
	WIN_SLEEPNOW1
	WIN_STANDBY2
	WIN_SETIDLE2
	WIN_SLEEPNOW2
	WIN_STANDBYNOW2
These are all essentially no-ops, like existing support for EN_RLA (enable
read lookahead) and WIN_STANDBYNOW1.

This fixes a crash in the SLES9-SP3 64bit kernel when the powersaved was
started (with ACPI or ACM).  This guest really only needs EN_AAM, DIS_APM,
and WIN_SETIDLE1 support, but the others seemed sensible to include.

I've excluded EN_APM since I'm unsure of what that's agreeing to do.  It's
probably ok to include.

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: David Lively <dlively@virtualiron.com>


[-- Attachment #2: qemu-ide-allow-more-powermgmt.patch --]
[-- Type: text/x-patch, Size: 1111 bytes --]

diff -r b9f911005829 tools/ioemu/hw/ide.c
--- a/tools/ioemu/hw/ide.c	Wed Aug 01 19:06:43 2007 -0400
+++ b/tools/ioemu/hw/ide.c	Wed Aug 01 19:06:43 2007 -0400
@@ -2136,6 +2136,9 @@ static void ide_ioport_write(void *opaqu
                 break;
             case 0xaa: /* read look-ahead enable */
             case 0x55: /* read look-ahead disable */
+	    case 0x42: /* enable Automatic Acoustic Mode */
+	    case 0xc2: /* disable Automatic Acoustic Mode */
+	    case 0x85: /* disable APM */
                 s->status = READY_STAT | SEEK_STAT;
                 ide_set_irq(s);
                 break;
@@ -2174,8 +2177,15 @@ static void ide_ioport_write(void *opaqu
 	    s->status = READY_STAT;
             ide_set_irq(s);
             break;
+        case WIN_IDLEIMMEDIATE:
+        case WIN_STANDBY:
+        case WIN_SETIDLE1:
 	case WIN_STANDBYNOW1:
-        case WIN_IDLEIMMEDIATE:
+        case WIN_SLEEPNOW1:
+        case WIN_STANDBY2:
+        case WIN_SETIDLE2:
+	case WIN_STANDBYNOW2:
+        case WIN_SLEEPNOW2:
 	    s->status = READY_STAT;
             ide_set_irq(s);
             break;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2007-08-27 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 18:45 Ben Guthro [this message]
2007-08-27 19:19 ` [PATCH][QEMU] Allow more IDE power management Daniel P. Berrange

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=46D31BD4.3040802@virtualiron.com \
    --to=bguthro@virtualiron.com \
    --cc=dlively@virtualiron.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.