From: Damien Le Moal <dlemoal@kernel.org>
To: Niklas Cassel <cassel@kernel.org>, John Snow <jsnow@redhat.com>,
"Denis V. Lunev" <den@openvz.org>,
Fabiano Rosas <farosas@suse.de>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 09/13] hw/ide: implement the NCQ Command Error log (10h)
Date: Mon, 30 Nov 2026 14:34:02 +0900 [thread overview]
Message-ID: <2a345599-4950-4aaa-9dae-29dfdd2a0f6d@kernel.org> (raw)
In-Reply-To: <20261127191250.3298004-10-cassel@kernel.org>
On 11/28/26 04:12, Niklas Cassel wrote:
> As per ACS-6 9.15, when an NCQ command fails, the device enter the NCQ
> error state, and the host shall read the NCQ Command Error log (10h) to
> find out which command that failed.
>
> The NCQ Command Error log is a mandatory part of the NCQ feature set.
> QEMU did not implement this mandatory part, making it impossible for the
> host to know which command that failed.
>
> Record the failed command in the log, with its sense data through NCQ
> Autosense. Report INVALID COMMAND OPERATION CODE for an unsupported NCQ
> command, INVALID FIELD IN CDB for an invalid RECEIVE FPDMA QUEUED, and
> none for a failed read or write.
>
> A PRDT that is too short for the transfer is detected by the HBA, not
> the device (AHCI 1.3.1 6.1.5), so for that case, the command is only
> released and OFS raised, without recording an error.
>
> Once the device has entered the NCQ error state (see DFPDMAQ11 to
> DFPDMAQ15), the outstanding NCQ commands neither complete nor fail, and
> new commands are aborted (except for a READ LOG of the NCQ Command Error
> log) or the port is reset.
>
> Add qtests for the log contents, the error state and the sense data.
>
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
Looks OK to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-11-30 5:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 19:12 [PATCH 00/13] hw/ide: add missing features required for SATA Niklas Cassel
2026-11-27 19:12 ` [PATCH 01/13] hw/ide: report the SMART state in IDENTIFY DEVICE Niklas Cassel
2026-11-30 5:10 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 02/13] hw/ide/ahci: stop processing commands after a fatal error Niklas Cassel
2026-11-30 5:13 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 03/13] hw/ide/ahci: clear a stale error status when an NCQ command is queued Niklas Cassel
2026-11-30 5:15 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 04/13] hw/ide/ahci: complete unsupported NCQ commands Niklas Cassel
2026-11-30 5:16 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 05/13] hw/ide: add General Purpose Logging (GPL) feature set support Niklas Cassel
2026-11-30 5:20 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 06/13] hw/ide: add the IDENTIFY DEVICE data log Niklas Cassel
2026-11-30 5:23 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 07/13] hw/ide/ahci: add RECEIVE FPDMA QUEUED support Niklas Cassel
2026-11-30 5:25 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 08/13] hw/ide: add Sense Data Reporting feature set support Niklas Cassel
2026-11-30 5:30 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 09/13] hw/ide: implement the NCQ Command Error log (10h) Niklas Cassel
2026-11-30 5:34 ` Damien Le Moal [this message]
2026-11-27 19:12 ` [PATCH 10/13] tests/qtest/libqos: skip some checks for commands expected to fail Niklas Cassel
2026-11-27 19:12 ` [PATCH 11/13] hw/ide: report out-of-range accesses as ILLEGAL REQUEST Niklas Cassel
2026-11-30 5:35 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 12/13] hw/ide/ahci: check the LBA range of NCQ commands Niklas Cassel
2026-11-30 5:36 ` Damien Le Moal
2026-11-27 19:12 ` [PATCH 13/13] hw/ide: report ACS-6 compliance behind AHCI Niklas Cassel
2026-11-30 5:37 ` Damien Le Moal
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=2a345599-4950-4aaa-9dae-29dfdd2a0f6d@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=den@openvz.org \
--cc=farosas@suse.de \
--cc=jsnow@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.