qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 9/9] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
Date: Wed,  2 May 2012 19:16:18 +0200	[thread overview]
Message-ID: <1335978978-4940-10-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1335978978-4940-1-git-send-email-kwolf@redhat.com>

From: Alexander Graf <agraf@suse.de>

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 <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 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

      parent reply	other threads:[~2012-05-02 17:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 17:16 [Qemu-devel] [PULL 0/9] Block patches (master and 1.1) Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 1/9] qemu-iotests: ignore fragmentation information for qed Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 2/9] block/qcow2: Add missing GCC_FMT_ATTR to function report_unsupported() Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 3/9] docs: fix one issue in qcow2 specs Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 4/9] qemu-iotests: Many parallel allocating I/O requests Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 5/9] qcow2: Remove unused parameter in do_alloc_cluster_offset Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 6/9] qcow2: Don't hold cache references across yield Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 7/9] qcow2: fix the return value -ENOENT -> -EEXIST Kevin Wolf
2012-05-02 17:16 ` [Qemu-devel] [PATCH 8/9] rbd: add discard support Kevin Wolf
2012-05-02 17:16 ` Kevin Wolf [this message]

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=1335978978-4940-10-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).