Re: [Qemu-devel] [PATCH 01/16] ide: add limit to .prepare_buf()

2015-06-26 Thread John Snow
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 06/26/2015 10:32 AM, Stefan Hajnoczi wrote: > On Mon, Jun 22, 2015 at 08:21:00PM -0400, John Snow wrote: >> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 95d228f..f873ab1 >> 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -49,7 +49,7 @@ >>

Re: [Qemu-devel] [PATCH 01/16] ide: add limit to .prepare_buf()

2015-06-26 Thread Stefan Hajnoczi
On Mon, Jun 22, 2015 at 08:21:00PM -0400, John Snow wrote: > diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c > index 95d228f..f873ab1 100644 > --- a/hw/ide/ahci.c > +++ b/hw/ide/ahci.c > @@ -49,7 +49,7 @@ static int handle_cmd(AHCIState *s,int port,int slot); > static void ahci_reset_port(AHCIState *s,

[Qemu-devel] [PATCH 01/16] ide: add limit to .prepare_buf()

2015-06-22 Thread John Snow
prepare_buf should not always grab as many descriptors as it can, sometimes it should self-limit. For example, an NCQ transfer of 1 sector with a PRDT that describes 4GiB of data should not copy 4GiB of data, it should just transfer that first 512 bytes. PIO is not affected, because the dma_buf_r