1. 07 7月, 2015 5 次提交
  2. 06 7月, 2015 28 次提交
  3. 04 7月, 2015 7 次提交
    • J
      ahci: fix sdb fis semantics · 7c649ac5
      John Snow 提交于
      There are two things to fix here:
      
      The first one is subtle: the PxSACT register in the AHCI HBA has different
      semantics from the field it is shadowing, the ACT field in the
      Set Device Bits FIS.
      
      In the HBA register, PxSACT acts as a bitfield indicating outstanding
      NCQ commands where a set bit indicates a pending NCQ operation. The FIS
      field however operates as an RWC register update to PxSACT, where a set
      bit indicates a *successfully* completed command.
      
      Correct the FIS semantics. At the same time, move the "clear finished"
      action to the SDB FIS generation instead of the register read to mimick
      how the other shadow registers work, which always just report the last
      reported value from a FIS, and not the most current values which may
      not have been reported by a FIS yet.
      
      Lastly and more simply, SATA 3.2 section 13.6.4.2 (and later sections)
      all specify that the Interrupt bit for the SDB FIS should always be set
      to one for NCQ commands. That's currently the only time we generate this
      FIS, so set it on all the time.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435767578-32743-16-git-send-email-jsnow@redhat.com
      7c649ac5
    • J
      qtest/ahci: halted ncq migration test · 8146d7dc
      John Snow 提交于
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435767578-32743-15-git-send-email-jsnow@redhat.com
      8146d7dc
    • J
      ahci: Do not map cmd_fis to generate response · dd628221
      John Snow 提交于
      The Register D2H FIS should copy the current values of
      the registers instead of just parroting back the same
      values the guest sent back to it.
      
      In this case, the SECTOR COUNT variables are actually
      not generally meaningful in terms of standard commands
      (See ATA8-AC3 Section 9.2 Normal Outputs), so it actually
      probably doesn't matter what we put in here.
      
      Meanwhile, we do need to use the Register update FIS from
      the NCQ pathways (in error cases), so getting rid of
      references to cur_cmd here is a win for AHCI concurrency.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435767578-32743-14-git-send-email-jsnow@redhat.com
      dd628221
    • J
      ahci: ncq migration · 684d5013
      John Snow 提交于
      Migrate the NCQ queue. This is solely for the benefit of halted commands,
      since anything else should have completed and had any relevant status
      flushed to the HBA registers already.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435767578-32743-13-git-send-email-jsnow@redhat.com
      684d5013
    • J
      ahci: add get_cmd_header helper · ee364416
      John Snow 提交于
      cur_cmd is an internal bookmark that points to the
      current AHCI Command Header being processed by the
      AHCI state machine. With NCQ needing to occasionally
      rely on some of the same AHCI helpers, we cannot use
      cur_cmd and will need to grab explicit pointers instead.
      
      In an attempt to begin relying on the cur_cmd pointer
      less, add a helper to let us specifically get the pointer
      to the command header of particular interest.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435767578-32743-12-git-send-email-jsnow@redhat.com
      ee364416
    • J
      ahci: add cmd header to ncq transfer state · c82bd3c8
      John Snow 提交于
      While the rest of the AHCI device can rely on a single bookmarked
      pointer for the AHCI Command Header currently being processed, NCQ
      is asynchronous and may have many commands in flight simultaneously.
      
      Add a cmdh pointer to the ncq_tfs object and make the sglist prepare
      function take an AHCICmdHeader pointer so we can be explicit about
      where we'd like to build SGlists from.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435767578-32743-11-git-send-email-jsnow@redhat.com
      c82bd3c8
    • J
      qtest/ahci: halted NCQ test · 7f6cf5ee
      John Snow 提交于
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435767578-32743-10-git-send-email-jsnow@redhat.com
      7f6cf5ee