1. 27 11月, 2012 1 次提交
  2. 21 11月, 2012 2 次提交
  3. 15 11月, 2012 1 次提交
  4. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  5. 06 10月, 2012 1 次提交
  6. 05 10月, 2012 2 次提交
  7. 29 9月, 2012 4 次提交
  8. 12 9月, 2012 3 次提交
    • J
      ahci: properly reset PxCMD on HBA reset · 2a4f4f34
      Jason Baron 提交于
      While testing q35, I found that windows 7 (specifically, windows 7 ultimate
      with sp1 x64), wouldn't install because it can't find the cdrom or disk drive.
      The failure message is: 'A required cd/dvd device driver is missing. If you
      have a driver floppy disk, CD, DVD, or USB flash drive, please insert it now.'
      This can also be reproduced on piix by adding an ahci controller, and
      observing that windows 7 does not see any devices behind it.
      
      The problem is that when windows issues a HBA reset, qemu does not reset the
      individual ports' PxCMD register. Windows 7 then reads back the PxCMD register
      and presumably assumes that the ahci controller has already been initialized.
      Windows then never sets up the PxIE register to enable interrupts, and thus it
      never gets irqs back when it sends ata device inquiry commands.
      
      This change brings qemu into ahci 1.3 specification compliance.
      
      Section 10.4.3 HBA Reset:
      
      "
      When GHC.HR is set to '1', GHC.AE, GHC.IE, the IS register, and all port
      register fields (except PxFB/PxFBU/PxCLB/PxCLBU) that are not HwInit in the
      HBA's register memory space are reset.
      "
      
      I've also re-tested Fedora 16 and 17 to verify that they continue to work with
      this change.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Acked-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2a4f4f34
    • S
      ide: Fix error messages from static code analysis (no real error) · 1e53537f
      Stefan Weil 提交于
      Report from smatch:
      hw/ide/core.c:1472 ide_exec_cmd(423) error: buffer overflow 'smart_attributes' 8 <= 29
      hw/ide/core.c:1474 ide_exec_cmd(425) error: buffer overflow 'smart_attributes' 8 <= 29
      hw/ide/core.c:1475 ide_exec_cmd(426) error: buffer overflow 'smart_attributes' 8 <= 29
      ...
      
      The upper limit of 30 was never reached because both for loops terminated
      when 'smart_attributes' reached end of list, so there was no real buffer
      overflow.
      
      Nevertheless, changing the code not only fixes the error report, but also
      reduces the size of smart_attributes and simplifies the for loops.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1e53537f
    • R
      ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 · ce560dcf
      Ronnie Sahlberg 提交于
      The START STOP UNIT command will only eject/load media if
      power condition is zero.
      
      If power condition is !0 then LOEJ and START will be ignored.
      
      From MMC (sbc contains similar wordings too)
        The Power Conditions field requests the block device to be placed
        in the power condition defined in
        Table 558. If this field has a value other than 0h then the Start
        and LoEj bits shall be ignored.
      Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ce560dcf
  9. 27 8月, 2012 1 次提交
  10. 24 8月, 2012 1 次提交
  11. 10 8月, 2012 2 次提交
    • J
      ahci: Fix sglist memleak in ahci_dma_rw_buf() · ea8d82a1
      Jason Baron 提交于
      I noticed that in hw/ide/ahci:ahci_dma_rw_buf() we do not free the sglist. Thus,
      I've added a call to qemu_sglist_destroy() to fix this memory leak.
      
      In addition, I've adeed a call in qemu_sglist_destroy() to 0 all of the sglist
      fields, in case there is some other codepath that tries to free the sglist.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ea8d82a1
    • 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
  12. 07 8月, 2012 1 次提交
  13. 28 7月, 2012 1 次提交
  14. 17 7月, 2012 13 次提交
  15. 04 7月, 2012 1 次提交
  16. 02 7月, 2012 1 次提交
  17. 28 6月, 2012 2 次提交
  18. 20 6月, 2012 1 次提交
  19. 18 6月, 2012 1 次提交