* [Qemu-devel] [PATCH] ahci: Fix byte count regression for ATAPI/PIO
@ 2014-11-11 0:41 John Snow
2014-11-11 17:16 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: John Snow @ 2014-11-11 0:41 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, pbonzini, John Snow, armbru, stefanha
This patch fixes a regression caused by commit
659142ecf71a0da240ab0ff7cf929ee25c32b9bc.
The problem occurs when we wish to return early
from the ahci_start_transfer function, but are now
updating the transferred byte count in the AHCI
command header via ahci_commit_buf.
This will cause problems in the Windows 8 installer.
Don't update the byte count in the command header
for the transmission of ATAPI packets: These commands
will distort the final byte count of the actual data
payload.
The call to ahci_commit_buf remains in the "out"
portion of the call in order to clean up the sglist.
The byte count is maintained by forcing size to be 0.
Signed-off-by: John Snow <jsnow@redhat.com>
---
hw/ide/ahci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 61dbed1..1f3f951 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1089,6 +1089,7 @@ static void ahci_start_transfer(IDEDMA *dma)
if (is_atapi && !ad->done_atapi_packet) {
/* already prepopulated iobuffer */
ad->done_atapi_packet = true;
+ size = 0;
goto out;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ahci: Fix byte count regression for ATAPI/PIO
2014-11-11 0:41 [Qemu-devel] [PATCH] ahci: Fix byte count regression for ATAPI/PIO John Snow
@ 2014-11-11 17:16 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2014-11-11 17:16 UTC (permalink / raw)
To: John Snow; +Cc: kwolf, pbonzini, qemu-devel, armbru
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
On Mon, Nov 10, 2014 at 07:41:40PM -0500, John Snow wrote:
> This patch fixes a regression caused by commit
> 659142ecf71a0da240ab0ff7cf929ee25c32b9bc.
> The problem occurs when we wish to return early
> from the ahci_start_transfer function, but are now
> updating the transferred byte count in the AHCI
> command header via ahci_commit_buf.
>
> This will cause problems in the Windows 8 installer.
>
> Don't update the byte count in the command header
> for the transmission of ATAPI packets: These commands
> will distort the final byte count of the actual data
> payload.
>
> The call to ahci_commit_buf remains in the "out"
> portion of the call in order to clean up the sglist.
> The byte count is maintained by forcing size to be 0.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> hw/ide/ahci.c | 1 +
> 1 file changed, 1 insertion(+)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-11 17:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11 0:41 [Qemu-devel] [PATCH] ahci: Fix byte count regression for ATAPI/PIO John Snow
2014-11-11 17:16 ` Stefan Hajnoczi
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).