qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
@ 2012-01-30 22:29 Alexander Graf
  2012-02-07 14:57 ` Andreas Färber
  2012-02-09 14:28 ` Kevin Wolf
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Graf @ 2012-01-30 22:29 UTC (permalink / raw)
  To: kwolf; +Cc: Jan Kiszka, qemu-devel Developers

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>
---
 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,
 };
 
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
  2012-01-30 22:29 Alexander Graf
@ 2012-02-07 14:57 ` Andreas Färber
  2012-02-07 15:01   ` Alexander Graf
  2012-02-09 14:28 ` Kevin Wolf
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2012-02-07 14:57 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kwolf, Jan Kiszka, qemu-devel Developers, Bruce Rogers

Hi Alex,

Am 30.01.2012 23:29, schrieb 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.

I tested this with Windows 2008 R2 and it does not resolve the blue
screen I'm getting there during installation. Unfortunately it reboots
so quickly that I cannot read what it says.

Could you share how you debugged your Windows 8 issue?

Andreas

> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  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,
>  };
>  

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
  2012-02-07 14:57 ` Andreas Färber
@ 2012-02-07 15:01   ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2012-02-07 15:01 UTC (permalink / raw)
  To: Andreas Färber
  Cc: kwolf, Jan Kiszka, qemu-devel Developers, Bruce Rogers


On 07.02.2012, at 15:57, Andreas Färber wrote:

> Hi Alex,
> 
> Am 30.01.2012 23:29, schrieb 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.
> 
> I tested this with Windows 2008 R2 and it does not resolve the blue
> screen I'm getting there during installation. Unfortunately it reboots
> so quickly that I cannot read what it says.

Phew, that's probably yet another issue then.

> Could you share how you debugged your Windows 8 issue?

I enabled printf debugging in hw/ide/core.c and looked through the commands close to the blue screen :)


Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
  2012-01-30 22:29 Alexander Graf
  2012-02-07 14:57 ` Andreas Färber
@ 2012-02-09 14:28 ` Kevin Wolf
  2012-02-09 14:49   ` Alexander Graf
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin Wolf @ 2012-02-09 14:28 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Jan Kiszka, qemu-devel Developers

Am 30.01.2012 23:29, schrieb 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.

Is there anything that makes Windows believe that we support it? The
spec says bits in IDENTIFY word 82 and 128 must be set to indicate
support for the security feature set, and we don't set those.

Might be just a Windows bug, of course...

> 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.

It sets the sector count register to 0, which isn't exactly nop. In any
case, the code would at the very least need a comment that it's used for
two separate commands, so that we still remember this when some time in
the future someone writes a real implementation.

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
  2012-02-09 14:28 ` Kevin Wolf
@ 2012-02-09 14:49   ` Alexander Graf
  2012-02-09 14:59     ` Kevin Wolf
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Graf @ 2012-02-09 14:49 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Jan Kiszka, qemu-devel Developers


On 09.02.2012, at 15:28, Kevin Wolf wrote:

> Am 30.01.2012 23:29, schrieb 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.
> 
> Is there anything that makes Windows believe that we support it? The
> spec says bits in IDENTIFY word 82 and 128 must be set to indicate
> support for the security feature set, and we don't set those.
> 
> Might be just a Windows bug, of course...

IIUC it's mandatory in more recent ATA versions, so that's probably why it assumes it's 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.
> 
> It sets the sector count register to 0, which isn't exactly nop. In any
> case, the code would at the very least need a comment that it's used for
> two separate commands, so that we still remember this when some time in
> the future someone writes a real implementation.

Hrm. Good point.


Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
  2012-02-09 14:49   ` Alexander Graf
@ 2012-02-09 14:59     ` Kevin Wolf
  2012-02-09 15:01       ` Alexander Graf
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Wolf @ 2012-02-09 14:59 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Jan Kiszka, qemu-devel Developers

Am 09.02.2012 15:49, schrieb Alexander Graf:
> 
> On 09.02.2012, at 15:28, Kevin Wolf wrote:
> 
>> Am 30.01.2012 23:29, schrieb 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.
>>
>> Is there anything that makes Windows believe that we support it? The
>> spec says bits in IDENTIFY word 82 and 128 must be set to indicate
>> support for the security feature set, and we don't set those.
>>
>> Might be just a Windows bug, of course...
> 
> IIUC it's mandatory in more recent ATA versions, so that's probably why it assumes it's there.

ACS-2 says it's optional for both ATA and ATAPI devices.

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
  2012-02-09 14:59     ` Kevin Wolf
@ 2012-02-09 15:01       ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2012-02-09 15:01 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Jan Kiszka, qemu-devel Developers


On 09.02.2012, at 15:59, Kevin Wolf wrote:

> Am 09.02.2012 15:49, schrieb Alexander Graf:
>> 
>> On 09.02.2012, at 15:28, Kevin Wolf wrote:
>> 
>>> Am 30.01.2012 23:29, schrieb 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.
>>> 
>>> Is there anything that makes Windows believe that we support it? The
>>> spec says bits in IDENTIFY word 82 and 128 must be set to indicate
>>> support for the security feature set, and we don't set those.
>>> 
>>> Might be just a Windows bug, of course...
>> 
>> IIUC it's mandatory in more recent ATA versions, so that's probably why it assumes it's there.
> 
> ACS-2 says it's optional for both ATA and ATAPI devices.

Ah, right. I was looking at the "Historical Command Assignments" table and figured C means it's required, but that of course is wrong.

Then I seriously have no idea why Windows is erroring out here. I mean, it does work just fine for IDE devices. And we don't tell the guest anything special for AHCI.


Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop
       [not found] <1335437107-17105-1-git-send-email-agraf@suse.de>
@ 2012-05-02 16:47 ` Kevin Wolf
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin Wolf @ 2012-05-02 16:47 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Jan Kiszka, qemu-devel Developers

Am 26.04.2012 12:45, schrieb 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 <agraf@suse.de>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-02 16:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1335437107-17105-1-git-send-email-agraf@suse.de>
2012-05-02 16:47 ` [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop Kevin Wolf
2012-01-30 22:29 Alexander Graf
2012-02-07 14:57 ` Andreas Färber
2012-02-07 15:01   ` Alexander Graf
2012-02-09 14:28 ` Kevin Wolf
2012-02-09 14:49   ` Alexander Graf
2012-02-09 14:59     ` Kevin Wolf
2012-02-09 15:01       ` Alexander Graf

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).