From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPlqY-00038r-Sg for qemu-devel@nongnu.org; Mon, 27 Aug 2007 17:10:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPlqX-00037l-Aw for qemu-devel@nongnu.org; Mon, 27 Aug 2007 17:10:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPlqX-00037g-2o for qemu-devel@nongnu.org; Mon, 27 Aug 2007 17:10:05 -0400 Received: from mail.virtualiron.com ([209.213.88.114]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IPlqW-0002Hh-Dj for qemu-devel@nongnu.org; Mon, 27 Aug 2007 17:10:04 -0400 Message-ID: <46D33872.2000207@virtualiron.com> Date: Mon, 27 Aug 2007 16:47:46 -0400 From: Ben Guthro MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070309030903070309070904" Subject: [Qemu-devel] [PATCH] Allow more IDE power management Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------070309030903070309070904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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_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 Signed-off-by: David Lively --------------070309030903070309070904 Content-Type: text/x-patch; name="qemu-ide-allow-more-powermgmt.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-ide-allow-more-powermgmt.patch" diff -r 106bc46793ca hw/ide.c --- a/hw/ide.c Mon Aug 27 16:20:33 2007 -0400 +++ b/hw/ide.c Mon Aug 27 16:27:28 2007 -0400 @@ -1914,6 +1914,8 @@ static void ide_ioport_write(void *opaqu case 0x67: /* NOP */ case 0x96: /* NOP */ case 0x9a: /* NOP */ + case 0x42: /* enable Automatic Acoustic Mode */ + case 0xc2: /* disable Automatic Acoustic Mode */ s->status = READY_STAT | SEEK_STAT; ide_set_irq(s); break; @@ -1952,12 +1954,16 @@ static void ide_ioport_write(void *opaqu s->status = READY_STAT; ide_set_irq(s); break; + case WIN_STANDBY: + case WIN_STANDBY2: case WIN_STANDBYNOW1: case WIN_STANDBYNOW2: case WIN_IDLEIMMEDIATE: case CFA_IDLEIMMEDIATE: case WIN_SETIDLE1: case WIN_SETIDLE2: + case WIN_SLEEPNOW1: + case WIN_SLEEPNOW2: s->status = READY_STAT; ide_set_irq(s); break; --------------070309030903070309070904--