1. 10 8月, 2012 1 次提交
    • J
      ahci: Fix ahci cdrom read corruptions for reads > 128k · 61f52e06
      Jason Baron 提交于
      While testing q35, which has its cdrom attached to the ahci controller, I found
      that the Fedora 17 install would panic on boot. The panic occurs while
      squashfs is trying to read from the cdrom. The errors are:
      
      [    8.622711] SQUASHFS error: xz_dec_run error, data probably corrupt
      [    8.625180] SQUASHFS error: squashfs_read_data failed to read block
      0x20be48a
      
      I was also able to produce corrupt data reads using an installed piix based
      qemu machine, using 'dd'. I found that the corruptions were only occuring when
      then read size was greater than 128k. For example, the following command
      results in corrupted reads:
      
      dd if=/dev/sr0 of=/tmp/blah bs=256k iflag=direct
      
      The > 128k size reads exercise a different code path than 128k and below. In
      ide_atapi_cmd_read_dma_cb() s->io_buffer_size is capped at 128k. Thus,
      ide_atapi_cmd_read_dma_cb() is called a second time when the read is > 128k.
      However, ahci_dma_rw_buf() restart the read from offset 0, instead of at 128k.
      Thus, resulting in a corrupted read.
      
      To fix this, I've introduced 'io_buffer_offset' field in IDEState to keep
      track of the offset. I've also modified ahci_populate_sglist() to take a new
      3rd offset argument, so that the sglist is property initialized.
      
      I've tested this patch using 'dd' testing, and Fedora 17 now correctly boots
      and installs on q35 with the cdrom ahci controller.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Tested-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      61f52e06
  2. 28 6月, 2012 2 次提交
  3. 07 6月, 2012 1 次提交
  4. 30 5月, 2012 1 次提交
  5. 11 3月, 2012 1 次提交
  6. 22 2月, 2012 1 次提交
  7. 15 2月, 2012 1 次提交
  8. 09 2月, 2012 2 次提交
  9. 04 2月, 2012 1 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
  10. 28 1月, 2012 1 次提交
  11. 26 1月, 2012 1 次提交
  12. 26 10月, 2011 1 次提交
  13. 21 9月, 2011 1 次提交
  14. 20 9月, 2011 1 次提交
    • A
      AHCI Port Interrupt Enable register cleaning on soft reset · a26a13da
      Alexander Motin 提交于
      I've found that FreeBSD AHCI driver doesn't work with AHCI hardware
      emulation of QEMU 0.15.0. I believe the problem is on QEMU's side. As I
      see, it clears port's Interrupt Enable register each time when reset of
      any level happens. Is is reasonable for the global controller reset. It
      is probably not good, but acceptable for FreeBSD driver for the port
      hard reset. But it is IMO wrong for the device soft reset. None of real
      hardware I know behaves that way.
      Signed-off-by: NAlexander Motin <mav@FreeBSD.org>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a26a13da
  15. 16 9月, 2011 1 次提交
    • L
      Replace the VMSTOP macros with a proper state type · 1dfb4dd9
      Luiz Capitulino 提交于
      Today, when notifying a VM state change with vm_state_notify(),
      we pass a VMSTOP macro as the 'reason' argument. This is not ideal
      because the VMSTOP macros tell why qemu stopped and not exactly
      what the current VM state is.
      
      One example to demonstrate this problem is that vm_start() calls
      vm_state_notify() with reason=0, which turns out to be VMSTOP_USER.
      
      This commit fixes that by replacing the VMSTOP macros with a proper
      state type called RunState.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      1dfb4dd9
  16. 12 9月, 2011 1 次提交
  17. 26 8月, 2011 1 次提交
    • C
      block: explicit I/O accounting · a597e79c
      Christoph Hellwig 提交于
      Decouple the I/O accounting from bdrv_aio_readv/writev/flush and
      make the hardware models call directly into the accounting helpers.
      
      This means:
       - we do not count internal requests from image formats in addition
         to guest originating I/O
       - we do not double count I/O ops if the device model handles it
         chunk wise
       - we only account I/O once it actuall is done
       - can extent I/O accounting to synchronous or coroutine I/O easily
       - implement I/O latency tracking easily (see the next patch)
      
      I've conveted the existing device model callers to the new model,
      device models that are using synchronous I/O and weren't accounted
      before haven't been updated yet.  Also scsi hasn't been converted
      to the end-to-end accounting as I want to defer that after the pending
      scsi layer overhaul.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a597e79c
  18. 21 8月, 2011 1 次提交
  19. 08 8月, 2011 1 次提交
  20. 19 5月, 2011 1 次提交
    • A
      ahci: Fix non-NCQ accesses for LBA > 16bits · 1fddfba1
      Alexander Graf 提交于
      AHCI provides two ways of reading/writing data:
      
       1) NCQ
       2) ATA commands with the LBA in the command FIS
      
      In the second code path, we didn't handle any LBAs that were bigger than
      16 bits, so whenever a guest that used high LBA numbers wanted to access
      data, the LBA got truncated down to 16 bits, giving the guest garbage.
      
      This patch adds support for LBAs higher than 16 bits. I've tested that it
      works just fine with SeaBIOS and Linux guests. This patch also unbreaks
      the often reported grub errors people have seen with AHCI.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1fddfba1
  21. 18 5月, 2011 1 次提交
  22. 07 4月, 2011 1 次提交
  23. 07 2月, 2011 5 次提交
  24. 31 1月, 2011 2 次提交
  25. 19 12月, 2010 1 次提交
    • B
      ahci: delete write-only variables (v2) · cdfe17df
      Blue Swirl 提交于
      Avoid these warnings with GCC 4.6.0:
      /src/qemu/hw/ide/ahci.c: In function 'ahci_reset_port':
      /src/qemu/hw/ide/ahci.c:810:14: error: variable 'tfd' set but not used [-Werror=unused-but-set-variable]
      /src/qemu/hw/ide/ahci.c: In function 'handle_cmd':
      /src/qemu/hw/ide/ahci.c:1103:19: error: variable 'pr' set but not used [-Werror=unused-but-set-variable]
      
      In the tfd variable case, fix the logic also.
      
      CC: Alexander Graf <agraf@suse.de>
      CC: Kevin Wolf <kwolf@redhat.com>
      Acked-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      cdfe17df
  26. 17 12月, 2010 2 次提交