ia64/xen-unstable

changeset 15809:d032a17aced2

qemu: Allow more IDE power management.

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>
author kfraser@localhost.localdomain
date Thu Aug 30 16:41:57 2007 +0100 (2007-08-30)
parents b3689eb59c5e
children 9554ec3e27cd
files tools/ioemu/hw/ide.c
line diff
     1.1 --- a/tools/ioemu/hw/ide.c	Thu Aug 30 16:29:10 2007 +0100
     1.2 +++ b/tools/ioemu/hw/ide.c	Thu Aug 30 16:41:57 2007 +0100
     1.3 @@ -1876,6 +1876,9 @@ static void ide_ioport_write(void *opaqu
     1.4                  break;
     1.5              case 0xaa: /* read look-ahead enable */
     1.6              case 0x55: /* read look-ahead disable */
     1.7 +            case 0x42: /* EN_AAM: enable Automatic Acoustic Mode */
     1.8 +            case 0xc2: /* DIS_AAM: disable Automatic Acoustic Mode */
     1.9 +            case 0x85: /* DIS_APM: disable APM */
    1.10                  s->status = READY_STAT | SEEK_STAT;
    1.11                  ide_set_irq(s);
    1.12                  break;
    1.13 @@ -1914,8 +1917,15 @@ static void ide_ioport_write(void *opaqu
    1.14  	    s->status = READY_STAT;
    1.15              ide_set_irq(s);
    1.16              break;
    1.17 -	case WIN_STANDBYNOW1:
    1.18          case WIN_IDLEIMMEDIATE:
    1.19 +        case WIN_STANDBY:
    1.20 +        case WIN_SETIDLE1:
    1.21 +        case WIN_STANDBYNOW1:
    1.22 +        case WIN_SLEEPNOW1:
    1.23 +        case WIN_STANDBY2:
    1.24 +        case WIN_SETIDLE2:
    1.25 +        case WIN_STANDBYNOW2:
    1.26 +        case WIN_SLEEPNOW2:
    1.27  	    s->status = READY_STAT;
    1.28              ide_set_irq(s);
    1.29              break;