From patchwork Mon Jan 30 22:29:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 138665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BEA07B6F71 for ; Tue, 31 Jan 2012 09:30:30 +1100 (EST) Received: from localhost ([::1]:35489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrzk3-0007Rn-5H for incoming@patchwork.ozlabs.org; Mon, 30 Jan 2012 17:30:27 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrzji-000752-D9 for qemu-devel@nongnu.org; Mon, 30 Jan 2012 17:30:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrzjT-00013u-DS for qemu-devel@nongnu.org; Mon, 30 Jan 2012 17:30:04 -0500 Received: from cantor2.suse.de ([195.135.220.15]:58769 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrzjT-000124-7E for qemu-devel@nongnu.org; Mon, 30 Jan 2012 17:29:51 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id CDE5F90072; Mon, 30 Jan 2012 23:29:48 +0100 (CET) From: Alexander Graf To: kwolf@redhat.com Date: Mon, 30 Jan 2012 23:29:46 +0100 Message-Id: <1327962588-5230-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Jan Kiszka , qemu-devel Developers Subject: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- hw/ide/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 56b219b..2c129f4 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -969,7 +969,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, };