Skip to content
Snippets Groups Projects
  1. Oct 02, 2020
  2. Oct 01, 2020
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/ide-pull-request' into staging · b5ce42f5
      Peter Maydell authored
      
      Pull request
      
      # gpg: Signature made Thu 01 Oct 2020 18:41:05 BST
      # gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
      # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
      # Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
      #      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E
      
      * remotes/jsnow-gitlab/tags/ide-pull-request:
        ide: cancel pending callbacks on SRST
        ide: clear interrupt on command write
        ide: remove magic constants from the device register
        ide: reorder set/get sector functions
        ide: model HOB correctly
        ide: don't tamper with the device register
        ide: rename cmd_write to ctrl_write
        hw/ide/ahci: Do not dma_memory_unmap(NULL)
        MAINTAINERS: Update my git address
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      b5ce42f5
    • John Snow's avatar
      ide: cancel pending callbacks on SRST · 55adb3c4
      John Snow authored
      
      The SRST implementation did not keep up with the rest of IDE; it is
      possible to perform a weak reset on an IDE device to remove the BSY/DRQ
      bits, and then issue writes to the control/device registers which can
      cause chaos with the state machine.
      
      Fix that by actually performing a real reset.
      
      Reported-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Fixes: https://bugs.launchpad.net/qemu/+bug/1878253
      Fixes: https://bugs.launchpad.net/qemu/+bug/1887303
      Fixes: https://bugs.launchpad.net/qemu/+bug/1887309
      
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      55adb3c4
    • John Snow's avatar
      ide: clear interrupt on command write · 6f52e69f
      John Snow authored
      
      Not known to fix any bug, but I couldn't help but notice that ATA
      specifies that writing to this register should clear an interrupt.
      
      ATA7: Section 5.3.3 (Command register - Effect)
      ATA6: Section 7.4.4 (Command register - Effect)
      ATA5: Section 7.4.4 (Command register - Effect)
      ATA4: Section 7.4.4 (Command register - Effect)
      ATA3: Section 5.2.2 (Command register)
      
      Other editions: try searching for the phrase "Writing this register".
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      6f52e69f
    • John Snow's avatar
      ide: remove magic constants from the device register · 0c7515e1
      John Snow authored
      
      (In QEMU, we call this the "select" register.)
      
      My memory isn't good enough to memorize what these magic runes
      do. Label them to prevent mixups from happening in the future.
      
      Side note: I assume it's safe to always set 0xA0 even though ATA2 claims
      these bits are reserved, because ATA3 immediately reinstated that these
      bits should be always on. ATA4 and subsequent specs only claim that the
      fields are obsolete, so I assume it's safe to leave these set and that
      it should work with the widest array of guests.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      0c7515e1
Loading