Re: [Qemu-block] [PATCH 04/16] ahci: check for ncq prdtl overflow

2015-06-23 Thread John Snow
On 06/23/2015 09:46 AM, Stefan Hajnoczi wrote: > On Mon, Jun 22, 2015 at 10:08:22AM -0400, John Snow wrote: >> (sector_count == 0 means 64K sectors, though, like it does in regular >> ATA.) > > I don't see a case to handle this. > I apologize: Corrected in [PATCH 09/16] ahci: correct ncq sect

Re: [Qemu-block] [PATCH 04/16] ahci: check for ncq prdtl overflow

2015-06-23 Thread Stefan Hajnoczi
On Mon, Jun 22, 2015 at 10:08:22AM -0400, John Snow wrote: > (sector_count == 0 means 64K sectors, though, like it does in regular > ATA.) I don't see a case to handle this. pgpWOsI0WjrsG.pgp Description: PGP signature

Re: [Qemu-block] [PATCH 04/16] ahci: check for ncq prdtl overflow

2015-06-22 Thread Stefan Hajnoczi
On Fri, Jun 19, 2015 at 09:50:35PM -0400, John Snow wrote: > -/* Note: We calculate the sector count, but don't currently rely on it. > - * The total size of the DMA buffer tells us the transfer size instead. > */ > ncq_tfs->sector_count = ((uint16_t)ncq_fis->sector_count_high << 8) |

Re: [Qemu-block] [PATCH 04/16] ahci: check for ncq prdtl overflow

2015-06-22 Thread John Snow
On 06/22/2015 10:06 AM, Stefan Hajnoczi wrote: > On Fri, Jun 19, 2015 at 09:50:35PM -0400, John Snow wrote: >> @@ -999,20 +1000,28 @@ static void process_ncq_command(AHCIState >> *s, int port, uint8_t *cmd_fis, ((uint64_t)ncq_fis->lba2 << 16) >> | ((uint64_t)ncq_fis->lba1 << 8) | (uint64_t)ncq_fi

Re: [Qemu-block] [PATCH 04/16] ahci: check for ncq prdtl overflow

2015-06-22 Thread Stefan Hajnoczi
On Fri, Jun 19, 2015 at 09:50:35PM -0400, John Snow wrote: > @@ -999,20 +1000,28 @@ static void process_ncq_command(AHCIState *s, int > port, uint8_t *cmd_fis, > ((uint64_t)ncq_fis->lba2 << 16) | > ((uint64_t)ncq_fis->lba1 << 8) | > (uint

[Qemu-block] [PATCH 04/16] ahci: check for ncq prdtl overflow

2015-06-19 Thread John Snow
Don't attempt the NCQ transfer if the PRDT we were given is not big enough to perform the entire transfer. Signed-off-by: John Snow --- hw/ide/ahci.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 375aa44..24c4832 100