1. 23 8月, 2010 11 次提交
  2. 21 8月, 2010 2 次提交
    • B
      Replace qemu_malloc + memset with qemu_mallocz · cc597832
      Blue Swirl 提交于
      Replace a qemu_malloc call, followed by a memset, with qemu_mallocz.
      
      Found with this Coccinelle semantic patch, adapted from
      Coccinelle test package rule 94:
      @@
      type T;
      expression x;
      expression E;
      @@
      
      - x = (T)qemu_malloc(E)
      + x = qemu_mallocz(E)
        ...
      (
      - memset(x,0,E);
      |
      - memset(x,0,sizeof(*x));
      )
      
      Some files (tests/*) had to be filtered out.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      cc597832
    • B
      Use ARRAY_SIZE macro · 66fe09ee
      Blue Swirl 提交于
      Replace array size calculations with ARRAY_SIZE macro.
      
      Implemented with this Coccinelle semantic patch, adapted from
      Linux kernel:
      @@
      type T;
      T[] E;
      @@
      
      - (sizeof(E)/sizeof(*E))
      + ARRAY_SIZE(E)
      
      @@
      type T;
      T[] E;
      @@
      
      - (sizeof(E)/sizeof(E[...]))
      + ARRAY_SIZE(E)
      
      @@
      type T;
      T[] E;
      @@
      
      - (sizeof(E)/sizeof(T))
      + ARRAY_SIZE(E)
      
      Some files (*-dis.c, tests/*) had to be filtered out.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      66fe09ee
  3. 20 8月, 2010 2 次提交
  4. 19 8月, 2010 4 次提交
  5. 16 8月, 2010 1 次提交
    • A
      sparc escc IUS improvements (SunOS 4.1.4 fix) · 9fc391f8
      Artyom Tarasenko 提交于
      According to scc_escc_um.pdf:
       - Reset Highest IUS must update irq status to allow processing
         of the next priority interrupt.
       - rx interrupt has always higher priority than tx on same channel
      
      The documentation only explicitly says that Reset Highest IUS
      command (0x38) clears IUS bits, not that it clears the corresponding
      interrupt too, so don't clear interrupts on this command.
      
      The patch allows SunOS 4.1.4 to use the serial ports
      Signed-off-by: NArtyom Tarasenko <atar4qemu@gmail.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      9fc391f8
  6. 15 8月, 2010 7 次提交
  7. 11 8月, 2010 5 次提交
  8. 09 8月, 2010 2 次提交
  9. 08 8月, 2010 1 次提交
  10. 06 8月, 2010 3 次提交
  11. 04 8月, 2010 1 次提交
  12. 03 8月, 2010 1 次提交
    • A
      ide: Avoid canceling IDE DMA · 953844d1
      Andrea Arcangeli 提交于
      The reason for not actually canceling the I/O is because with
      virtualization and lots of VM running, a guest fs may mistake a
      overload of the host, as an IDE timeout. So rather than canceling the
      I/O, it's safer to wait I/O completion and simulate that the I/O has
      completed just before the io cancellation was requested by the
      guest. This way if ntfs or an app writes data without checking for
      -EIO retval, and it thinks the write has succeeded, it's less likely
      to run into troubles. Similar issues for reads.
      
      Furthermore because the DMA operation is splitted into many synchronous
      aio_read/write if there's more than one entry in the SG table, without this
      patch the DMA would be cancelled in the middle, something we've no idea if it
      happens on real hardware too or not. Overall this seems a great risk for zero
      gain.
      
      This approach is sure safer than previous code given we can't pretend all guest
      fs code out there to check for errors and reply the DMA if it was completed
      partially, given a timeout would never materialize on a real harddisk unless
      there are defective blocks (and defective blocks are practically only an issue
      for reads never for writes in any recent hardware as writing to blocks is the
      way to fix them) or the harddisk breaks as a whole.
      Signed-off-by: NIzik Eidus <ieidus@redhat.com>
      Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      953844d1