From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPdAP-0006SD-05 for qemu-devel@nongnu.org; Wed, 02 May 2012 13:16:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPdAJ-0004Pw-QW for qemu-devel@nongnu.org; Wed, 02 May 2012 13:16:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPdAJ-0004PY-Hz for qemu-devel@nongnu.org; Wed, 02 May 2012 13:16:35 -0400 From: Kevin Wolf Date: Wed, 2 May 2012 19:16:18 +0200 Message-Id: <1335978978-4940-10-git-send-email-kwolf@redhat.com> In-Reply-To: <1335978978-4940-1-git-send-email-kwolf@redhat.com> References: <1335978978-4940-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 9/9] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Alexander Graf When using Windows 8 with an AHCI disk drive, it issues a blue screen. The reason is that WIN_SECURITY_FREEZE_LOCK / CFA_WEAR_LEVEL is not supported by our ATA implementation, but Windows expects it to be there. Since without security stuff implemented, the lock would be a nop anyway and CFA_WEAR_LEVEL already is treated as a nop, let's just allow the cmd for HD drives as well. That way Windows is happy. Signed-off-by: Alexander Graf Signed-off-by: Kevin Wolf --- hw/ide/core.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index a5216a6..9785d5f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1035,7 +1035,7 @@ static const uint8_t ide_cmd_table[0x100] = { [WIN_IDENTIFY] = ALL_OK, [WIN_SETFEATURES] = ALL_OK, [IBM_SENSE_CONDITION] = CFA_OK, - [CFA_WEAR_LEVEL] = CFA_OK, + [CFA_WEAR_LEVEL] = HD_CFA_OK, [WIN_READ_NATIVE_MAX] = ALL_OK, }; @@ -1350,6 +1350,11 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) break; case CFA_ERASE_SECTORS: case CFA_WEAR_LEVEL: +#if 0 + /* This one has the same ID as CFA_WEAR_LEVEL and is required for + Windows 8 to work with AHCI */ + case WIN_SECURITY_FREEZE_LOCK: +#endif if (val == CFA_WEAR_LEVEL) s->nsector = 0; if (val == CFA_ERASE_SECTORS) -- 1.7.6.5