qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect
@ 2020-12-16 22:11 Gregory Price
  2020-12-21  8:35 ` [Bug 1908450] " Thomas Huth
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Gregory Price @ 2020-12-16 22:11 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

@@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
        put_le16(p + 76, (1 << 8));
    }

    put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
-   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
+   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
    put_le16(p + 81, 0x16); /* conforms to ata5 */
    /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
    put_le16(p + 82, (1 << 14) | (1 << 5) | 1);


This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
Bitfield[80] is defined in the ATA-6 specification below.

0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

Either the comment is wrong, or the field is wrong. If the field is
wrong it can cause errors in drivers that check support vs conformity.
This will not break most guests, since the conformity field is set to
ATA-5.

I'm not sure whether this component supports ATA-7, but since it's
commented as if it supports up through 6, correcting the field
assignment seems more correct.

ATA/ATAPI-6 Specification
https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

Page 116
80 - M Major version number
0000h or FFFFh = device does not report version
F 15 Reserved
F 14 Reserved for ATA/ATAPI-14
F 13 Reserved for ATA/ATAPI-13
F 12 Reserved for ATA/ATAPI-12
F 11 Reserved for ATA/ATAPI-11
F 10 Reserved for ATA/ATAPI-10
F 9 Reserved for ATA/ATAPI-9
F 8 Reserved for ATA/ATAPI-8
F 7 Reserved for ATA/ATAPI-7
F 6 1 = supports ATA/ATAPI-6
F 5 1 = supports ATA/ATAPI-5
F 4 1 = supports ATA/ATAPI-4
F 3 1 = supports ATA-3
X 2 Obsolete
X 1 Obsolete
F 0 Reserved

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: ata atapi ide identify x86

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908450

Title:
  ide/core.c ATA Major Version reporting incorrect

Status in QEMU:
  New

Bug description:
  @@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
          put_le16(p + 76, (1 << 8));
      }

      put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  -   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  +   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
      put_le16(p + 81, 0x16); /* conforms to ata5 */
      /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
      put_le16(p + 82, (1 << 14) | (1 << 5) | 1);

  
  This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
  Bitfield[80] is defined in the ATA-6 specification below.

  0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
  0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

  Either the comment is wrong, or the field is wrong. If the field is
  wrong it can cause errors in drivers that check support vs conformity.
  This will not break most guests, since the conformity field is set to
  ATA-5.

  I'm not sure whether this component supports ATA-7, but since it's
  commented as if it supports up through 6, correcting the field
  assignment seems more correct.

  ATA/ATAPI-6 Specification
  https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

  Page 116
  80 - M Major version number
  0000h or FFFFh = device does not report version
  F 15 Reserved
  F 14 Reserved for ATA/ATAPI-14
  F 13 Reserved for ATA/ATAPI-13
  F 12 Reserved for ATA/ATAPI-12
  F 11 Reserved for ATA/ATAPI-11
  F 10 Reserved for ATA/ATAPI-10
  F 9 Reserved for ATA/ATAPI-9
  F 8 Reserved for ATA/ATAPI-8
  F 7 Reserved for ATA/ATAPI-7
  F 6 1 = supports ATA/ATAPI-6
  F 5 1 = supports ATA/ATAPI-5
  F 4 1 = supports ATA/ATAPI-4
  F 3 1 = supports ATA-3
  X 2 Obsolete
  X 1 Obsolete
  F 0 Reserved

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908450/+subscriptions


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

* [Bug 1908450] Re: ide/core.c ATA Major Version reporting incorrect
  2020-12-16 22:11 [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect Gregory Price
@ 2020-12-21  8:35 ` Thomas Huth
  2021-01-14 22:39 ` John Snow
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2020-12-21  8:35 UTC (permalink / raw)
  To: qemu-devel

John, could you please have a look?

** Changed in: qemu
     Assignee: (unassigned) => John Snow (jnsnow)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908450

Title:
  ide/core.c ATA Major Version reporting incorrect

Status in QEMU:
  New

Bug description:
  @@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
          put_le16(p + 76, (1 << 8));
      }

      put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  -   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  +   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
      put_le16(p + 81, 0x16); /* conforms to ata5 */
      /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
      put_le16(p + 82, (1 << 14) | (1 << 5) | 1);

  
  This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
  Bitfield[80] is defined in the ATA-6 specification below.

  0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
  0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

  Either the comment is wrong, or the field is wrong. If the field is
  wrong it can cause errors in drivers that check support vs conformity.
  This will not break most guests, since the conformity field is set to
  ATA-5.

  I'm not sure whether this component supports ATA-7, but since it's
  commented as if it supports up through 6, correcting the field
  assignment seems more correct.

  ATA/ATAPI-6 Specification
  https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

  Page 116
  80 - M Major version number
  0000h or FFFFh = device does not report version
  F 15 Reserved
  F 14 Reserved for ATA/ATAPI-14
  F 13 Reserved for ATA/ATAPI-13
  F 12 Reserved for ATA/ATAPI-12
  F 11 Reserved for ATA/ATAPI-11
  F 10 Reserved for ATA/ATAPI-10
  F 9 Reserved for ATA/ATAPI-9
  F 8 Reserved for ATA/ATAPI-8
  F 7 Reserved for ATA/ATAPI-7
  F 6 1 = supports ATA/ATAPI-6
  F 5 1 = supports ATA/ATAPI-5
  F 4 1 = supports ATA/ATAPI-4
  F 3 1 = supports ATA-3
  X 2 Obsolete
  X 1 Obsolete
  F 0 Reserved

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908450/+subscriptions


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

* [Bug 1908450] Re: ide/core.c ATA Major Version reporting incorrect
  2020-12-16 22:11 [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect Gregory Price
  2020-12-21  8:35 ` [Bug 1908450] " Thomas Huth
@ 2021-01-14 22:39 ` John Snow
  2021-01-14 22:59 ` Gregory Price
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: John Snow @ 2021-01-14 22:39 UTC (permalink / raw)
  To: qemu-devel

I doubt we truly implement *any* standard precisely correctly, but if we
are advertising support for ATA7 and it works, I'd rather just fix the
comment to keep behavior the same.

It probably was a mistake in the original commit from ... sometime
before 2006, but if nothing is observably broken, maybe it shouldn't be
changed.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908450

Title:
  ide/core.c ATA Major Version reporting incorrect

Status in QEMU:
  New

Bug description:
  @@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
          put_le16(p + 76, (1 << 8));
      }

      put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  -   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  +   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
      put_le16(p + 81, 0x16); /* conforms to ata5 */
      /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
      put_le16(p + 82, (1 << 14) | (1 << 5) | 1);

  
  This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
  Bitfield[80] is defined in the ATA-6 specification below.

  0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
  0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

  Either the comment is wrong, or the field is wrong. If the field is
  wrong it can cause errors in drivers that check support vs conformity.
  This will not break most guests, since the conformity field is set to
  ATA-5.

  I'm not sure whether this component supports ATA-7, but since it's
  commented as if it supports up through 6, correcting the field
  assignment seems more correct.

  ATA/ATAPI-6 Specification
  https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

  Page 116
  80 - M Major version number
  0000h or FFFFh = device does not report version
  F 15 Reserved
  F 14 Reserved for ATA/ATAPI-14
  F 13 Reserved for ATA/ATAPI-13
  F 12 Reserved for ATA/ATAPI-12
  F 11 Reserved for ATA/ATAPI-11
  F 10 Reserved for ATA/ATAPI-10
  F 9 Reserved for ATA/ATAPI-9
  F 8 Reserved for ATA/ATAPI-8
  F 7 Reserved for ATA/ATAPI-7
  F 6 1 = supports ATA/ATAPI-6
  F 5 1 = supports ATA/ATAPI-5
  F 4 1 = supports ATA/ATAPI-4
  F 3 1 = supports ATA-3
  X 2 Obsolete
  X 1 Obsolete
  F 0 Reserved

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908450/+subscriptions


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

* [Bug 1908450] Re: ide/core.c ATA Major Version reporting incorrect
  2020-12-16 22:11 [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect Gregory Price
  2020-12-21  8:35 ` [Bug 1908450] " Thomas Huth
  2021-01-14 22:39 ` John Snow
@ 2021-01-14 22:59 ` Gregory Price
  2021-01-14 23:19 ` John Snow
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Gregory Price @ 2021-01-14 22:59 UTC (permalink / raw)
  To: qemu-devel

for what it's worth, i have yet to see a driver actually check this
field.

I have seen a ton of code (OVMF and others) detect other information and
just straight up say "I'm in QEMU" and YOLO a bunch of things like
assuming DMA is available and such, so I somewhat doubt anyone
*actually* checks these fields.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908450

Title:
  ide/core.c ATA Major Version reporting incorrect

Status in QEMU:
  New

Bug description:
  @@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
          put_le16(p + 76, (1 << 8));
      }

      put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  -   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  +   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
      put_le16(p + 81, 0x16); /* conforms to ata5 */
      /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
      put_le16(p + 82, (1 << 14) | (1 << 5) | 1);

  
  This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
  Bitfield[80] is defined in the ATA-6 specification below.

  0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
  0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

  Either the comment is wrong, or the field is wrong. If the field is
  wrong it can cause errors in drivers that check support vs conformity.
  This will not break most guests, since the conformity field is set to
  ATA-5.

  I'm not sure whether this component supports ATA-7, but since it's
  commented as if it supports up through 6, correcting the field
  assignment seems more correct.

  ATA/ATAPI-6 Specification
  https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

  Page 116
  80 - M Major version number
  0000h or FFFFh = device does not report version
  F 15 Reserved
  F 14 Reserved for ATA/ATAPI-14
  F 13 Reserved for ATA/ATAPI-13
  F 12 Reserved for ATA/ATAPI-12
  F 11 Reserved for ATA/ATAPI-11
  F 10 Reserved for ATA/ATAPI-10
  F 9 Reserved for ATA/ATAPI-9
  F 8 Reserved for ATA/ATAPI-8
  F 7 Reserved for ATA/ATAPI-7
  F 6 1 = supports ATA/ATAPI-6
  F 5 1 = supports ATA/ATAPI-5
  F 4 1 = supports ATA/ATAPI-4
  F 3 1 = supports ATA-3
  X 2 Obsolete
  X 1 Obsolete
  F 0 Reserved

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908450/+subscriptions


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

* [Bug 1908450] Re: ide/core.c ATA Major Version reporting incorrect
  2020-12-16 22:11 [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect Gregory Price
                   ` (2 preceding siblings ...)
  2021-01-14 22:59 ` Gregory Price
@ 2021-01-14 23:19 ` John Snow
  2021-01-14 23:58 ` Gregory Price
  2021-04-30 17:05 ` Thomas Huth
  5 siblings, 0 replies; 7+ messages in thread
From: John Snow @ 2021-01-14 23:19 UTC (permalink / raw)
  To: qemu-devel

That's probably the single most reasonable thing to do, truth be told!

I don't have the time to audit these fields properly; I don't know which
versions we truly ought to advertise support for. I know I looked at
ATA8-AC3 at some point fairly recently and concluded that we don't
support all of the "must-support" features of that spec, because we
don't implement any of the logging features whatsoever.

I often consult ATA8-ACS3 to take advantage of clarifications made in
later revisions and cross-correlate with ATA7; but I don't know what the
most modern specification we can be said to support the minimum feature
set from truly is.

Patches (and reviewers) always welcome; but generally I am afraid of
touching too many things because I don't want to break legacy operating
systems that might not have an awareness of QEMU. Our testing for older
operating systems is not particularly robust, here.

I think I am still leaning towards just fixing the comment, but if you
are aware of some ATA7 thing we are required to support but don't, I'll
remove the bit.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908450

Title:
  ide/core.c ATA Major Version reporting incorrect

Status in QEMU:
  New

Bug description:
  @@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
          put_le16(p + 76, (1 << 8));
      }

      put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  -   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  +   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
      put_le16(p + 81, 0x16); /* conforms to ata5 */
      /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
      put_le16(p + 82, (1 << 14) | (1 << 5) | 1);

  
  This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
  Bitfield[80] is defined in the ATA-6 specification below.

  0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
  0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

  Either the comment is wrong, or the field is wrong. If the field is
  wrong it can cause errors in drivers that check support vs conformity.
  This will not break most guests, since the conformity field is set to
  ATA-5.

  I'm not sure whether this component supports ATA-7, but since it's
  commented as if it supports up through 6, correcting the field
  assignment seems more correct.

  ATA/ATAPI-6 Specification
  https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

  Page 116
  80 - M Major version number
  0000h or FFFFh = device does not report version
  F 15 Reserved
  F 14 Reserved for ATA/ATAPI-14
  F 13 Reserved for ATA/ATAPI-13
  F 12 Reserved for ATA/ATAPI-12
  F 11 Reserved for ATA/ATAPI-11
  F 10 Reserved for ATA/ATAPI-10
  F 9 Reserved for ATA/ATAPI-9
  F 8 Reserved for ATA/ATAPI-8
  F 7 Reserved for ATA/ATAPI-7
  F 6 1 = supports ATA/ATAPI-6
  F 5 1 = supports ATA/ATAPI-5
  F 4 1 = supports ATA/ATAPI-4
  F 3 1 = supports ATA-3
  X 2 Obsolete
  X 1 Obsolete
  F 0 Reserved

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908450/+subscriptions


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

* [Bug 1908450] Re: ide/core.c ATA Major Version reporting incorrect
  2020-12-16 22:11 [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect Gregory Price
                   ` (3 preceding siblings ...)
  2021-01-14 23:19 ` John Snow
@ 2021-01-14 23:58 ` Gregory Price
  2021-04-30 17:05 ` Thomas Huth
  5 siblings, 0 replies; 7+ messages in thread
From: Gregory Price @ 2021-01-14 23:58 UTC (permalink / raw)
  To: qemu-devel

I would just fix the comment for now, likewise I don't have the time to audit
whether the emulation provides full coverage of the standard.

Really there's two cases here
1) We report ATA4-7 (current status), someone discovers missing bits feature
Response:  They file a ticket on the missing feature.

2) We report ATA3-6 (changed status), legacy stuff checking this bit suddenly break
Response:  Rabid screeching somewhere in the depths of the internets.

Fixing the comment is more risk averse and more likely to produce the desirable
outcome (some reads the comment, and discovers a missing ATA feature for the
reported standard).

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908450

Title:
  ide/core.c ATA Major Version reporting incorrect

Status in QEMU:
  New

Bug description:
  @@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
          put_le16(p + 76, (1 << 8));
      }

      put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  -   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  +   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
      put_le16(p + 81, 0x16); /* conforms to ata5 */
      /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
      put_le16(p + 82, (1 << 14) | (1 << 5) | 1);

  
  This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
  Bitfield[80] is defined in the ATA-6 specification below.

  0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
  0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

  Either the comment is wrong, or the field is wrong. If the field is
  wrong it can cause errors in drivers that check support vs conformity.
  This will not break most guests, since the conformity field is set to
  ATA-5.

  I'm not sure whether this component supports ATA-7, but since it's
  commented as if it supports up through 6, correcting the field
  assignment seems more correct.

  ATA/ATAPI-6 Specification
  https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

  Page 116
  80 - M Major version number
  0000h or FFFFh = device does not report version
  F 15 Reserved
  F 14 Reserved for ATA/ATAPI-14
  F 13 Reserved for ATA/ATAPI-13
  F 12 Reserved for ATA/ATAPI-12
  F 11 Reserved for ATA/ATAPI-11
  F 10 Reserved for ATA/ATAPI-10
  F 9 Reserved for ATA/ATAPI-9
  F 8 Reserved for ATA/ATAPI-8
  F 7 Reserved for ATA/ATAPI-7
  F 6 1 = supports ATA/ATAPI-6
  F 5 1 = supports ATA/ATAPI-5
  F 4 1 = supports ATA/ATAPI-4
  F 3 1 = supports ATA-3
  X 2 Obsolete
  X 1 Obsolete
  F 0 Reserved

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908450/+subscriptions


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

* [Bug 1908450] Re: ide/core.c ATA Major Version reporting incorrect
  2020-12-16 22:11 [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect Gregory Price
                   ` (4 preceding siblings ...)
  2021-01-14 23:58 ` Gregory Price
@ 2021-04-30 17:05 ` Thomas Huth
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2021-04-30 17:05 UTC (permalink / raw)
  To: qemu-devel

This is an automated cleanup. This bug report has been moved
to QEMU's new bug tracker on gitlab.com and thus gets marked
as 'expired' now. Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/59


** Changed in: qemu
       Status: New => Expired

** Changed in: qemu
     Assignee: John Snow (jnsnow) => (unassigned)

** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #59
   https://gitlab.com/qemu-project/qemu/-/issues/59

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908450

Title:
  ide/core.c ATA Major Version reporting incorrect

Status in QEMU:
  Expired

Bug description:
  @@ -165,7 +165,7 @@ static void ide_identify(IDEState *s)
          put_le16(p + 76, (1 << 8));
      }

      put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  -   put_le16(p + 80, 0xf0); /* ata3 -> ata6 supported */
  +   put_le16(p + 80, ((1 << 6) | (1 << 5) (1 << 4) (1 << 3)); /* ata3 -> ata6 supported */
      put_le16(p + 81, 0x16); /* conforms to ata5 */
      /* 14=NOP supported, 5=WCACHE supported, 0=SMART supported */
      put_le16(p + 82, (1 << 14) | (1 << 5) | 1);

  
  This field Major Version Number field is presently reporting support for ATA-4 through ATA-7.
  Bitfield[80] is defined in the ATA-6 specification below.

  0xF0 = (1<<7) | (1<<6) | (1 << 5) | (1 << 4) // 4-7 - current settings
  0x78 = (1<<6) | (1<<5) | (1 << 4) | (1 << 3) // 3-6 - new settings

  Either the comment is wrong, or the field is wrong. If the field is
  wrong it can cause errors in drivers that check support vs conformity.
  This will not break most guests, since the conformity field is set to
  ATA-5.

  I'm not sure whether this component supports ATA-7, but since it's
  commented as if it supports up through 6, correcting the field
  assignment seems more correct.

  ATA/ATAPI-6 Specification
  https://web.archive.org/web/20200124094822/https://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf

  Page 116
  80 - M Major version number
  0000h or FFFFh = device does not report version
  F 15 Reserved
  F 14 Reserved for ATA/ATAPI-14
  F 13 Reserved for ATA/ATAPI-13
  F 12 Reserved for ATA/ATAPI-12
  F 11 Reserved for ATA/ATAPI-11
  F 10 Reserved for ATA/ATAPI-10
  F 9 Reserved for ATA/ATAPI-9
  F 8 Reserved for ATA/ATAPI-8
  F 7 Reserved for ATA/ATAPI-7
  F 6 1 = supports ATA/ATAPI-6
  F 5 1 = supports ATA/ATAPI-5
  F 4 1 = supports ATA/ATAPI-4
  F 3 1 = supports ATA-3
  X 2 Obsolete
  X 1 Obsolete
  F 0 Reserved

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908450/+subscriptions


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

end of thread, other threads:[~2021-04-30 17:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 22:11 [Bug 1908450] [NEW] ide/core.c ATA Major Version reporting incorrect Gregory Price
2020-12-21  8:35 ` [Bug 1908450] " Thomas Huth
2021-01-14 22:39 ` John Snow
2021-01-14 22:59 ` Gregory Price
2021-01-14 23:19 ` John Snow
2021-01-14 23:58 ` Gregory Price
2021-04-30 17:05 ` Thomas Huth

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