--On 10 July 2013 01:04:35 +0800 Saptarshi Sen <saptarshi....@gmail.com> wrote:

   the sector reads are not 512 bytes aligned.

   I am gathering the stats from hw/ide/core.c in the function

   ide_dma_cb. variable :sector_num

   Should not these disk reads be 512 bytes aligned.

As illustrated by the code below, sector_num is the number of the sector.
The byte offset is sector_num << 9. As sector_num is an integer, this makes
all the reads 512 byte aligned as far as I can see.

   n = s->io_buffer_size >> 9;
   sector_num = ide_get_sector(s);
   if (n > 0) {
       dma_buf_commit(s);
       sector_num += n;
       ide_set_sector(s, sector_num);
       s->nsector -= n;
   }

--
Alex Bligh

Reply via email to