1. 27 5月, 2015 7 次提交
  2. 26 5月, 2015 1 次提交
    • P
      Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging · 0915aed5
      Peter Maydell 提交于
      # gpg: Signature made Fri May 22 20:58:44 2015 BST using RSA key ID AAFC390E
      # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # 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/jnsnow/tags/ide-pull-request:
        ahci: do not remap clb/fis unconditionally
        macio: move unaligned DMA write code into separate pmac_dma_write() function
        macio: move unaligned DMA read code into separate pmac_dma_read() function
        qtest: pre-buffer hex nibs
        libqos/ahci: Swap memread/write with bufread/write
        qtest: add memset to qtest protocol
        qtest: Add base64 encoded read/write
        qtest: allow arbitrarily long sends
        qtest/ahci: add migrate halted dma test
        qtest/ahci: add halted dma test
        qtest/ahci: add flush migrate test
        qtest/ahci: add migrate dma test
        qtest/ahci: Add migration test
        ich9/ahci: Enable Migration
        libqos: Add migration helpers
        libqos/ahci: Fix sector set method
        libqos/ahci: Add halted command helpers
        glib: remove stale compat functions
        configure: require glib 2.22
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0915aed5
  3. 23 5月, 2015 20 次提交
    • J
      ahci: do not remap clb/fis unconditionally · cd6cb73b
      John Snow 提交于
      This continues the IOMMU fix from 2.3, where we should not attempt
      to remap the CLB or FIS RX buffers if the AHCI device is currently
      running.
      
      The same applies to migration: keep our mitts off these registers
      unless the device is supposed to be on.
      
      Does not impact backwards compatibility for the AHCI device.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1431470173-30847-2-git-send-email-jsnow@redhat.com
      cd6cb73b
    • M
      macio: move unaligned DMA write code into separate pmac_dma_write() function · bd4214fc
      Mark Cave-Ayland 提交于
      Similarly switch the macio IDE routines over to use the new function and
      tidy-up the remaining code as required.
      
      [Maintainer edit: printf format codes adjusted for 32/64bit. --js]
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1425939893-14404-3-git-send-email-mark.cave-ayland@ilande.co.uk
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      bd4214fc
    • M
      macio: move unaligned DMA read code into separate pmac_dma_read() function · 4827ac1e
      Mark Cave-Ayland 提交于
      This considerably helps simplify the complexity of the macio read routines and
      by switching macio CDROM accesses to use the new code, fixes the issue with
      the CDROM device being detected intermittently by Darwin/OS X.
      
      [Maintainer edit: printf format codes adjusted for 32/64bit. --js]
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ailande.co.uk>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1425939893-14404-2-git-send-email-mark.cave-ayland@ilande.co.uk
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      4827ac1e
    • J
      qtest: pre-buffer hex nibs · 5560b85a
      John Snow 提交于
      Instead of converting each byte one-at-a-time and then sending each byte
      over the wire, use sprintf() to pre-compute all of the hex nibs into a
      single buffer, then send the entire buffer all at once.
      
      This gives a moderate speed boost to memread() and memwrite() functions.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1431021095-7558-2-git-send-email-jsnow@redhat.com
      5560b85a
    • J
      libqos/ahci: Swap memread/write with bufread/write · 91d0374a
      John Snow 提交于
      Where it makes sense, use the new faster primitives.
      For generally small reads/writes such as for the PRDT
      and FIS packets, stick with the more wasteful but
      easier to debug memread/memwrite.
      
      For ahci-test (before migration tests):
      With this patch:
      real    0m3.675s
      user    0m2.582s
      sys     0m1.718s
      
      Without any qtest protocol improvements:
      real    0m14.171s
      user    0m12.072s
      sys     0m12.527s
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1430864578-22072-6-git-send-email-jsnow@redhat.com
      91d0374a
    • J
      qtest: add memset to qtest protocol · 4d007963
      John Snow 提交于
      Previously, memset was just a frontend to write() and only
      stupidly sent the pattern many times across the wire.
      
      Let's not discuss who stupidly wrote it like that in the first place.
      (Hint: It was me.)
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1430864578-22072-4-git-send-email-jsnow@redhat.com
      4d007963
    • J
      qtest: Add base64 encoded read/write · 7a6a740d
      John Snow 提交于
      For larger pieces of data that won't need to be debugged and
      viewing the hex nibbles is unlikely to be useful, we can encode
      data using base64 instead of encoding each byte as %02x, which
      leads to some space savings and faster reads/writes.
      
      For now, the default is left as hex nibbles in memwrite() and memread().
      For the purposes of making qtest io easier to read and debug, some
      callers may want to specify using the old encoding format for small
      patches of data where the savings from base64 wouldn't be that profound.
      
      memwrite/memread use a data encoding that takes 2x the size of the original
      buffer, but base64 uses "only" (4/3)x, so for larger buffers we can save a
      decent amount of time and space.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1430864578-22072-3-git-send-email-jsnow@redhat.com
      7a6a740d
    • J
      qtest: allow arbitrarily long sends · 332cc7e9
      John Snow 提交于
      qtest currently has a static buffer of size 1024 that if we
      overflow, ignores the additional data silently which leads
      to hangs or stream failures.
      
      Use glib's string facilities to allow arbitrarily long data,
      but split this off into a new function, qtest_sendf.
      
      Static data can still be sent using qtest_send, which avoids
      the malloc/copy overhead.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1430864578-22072-2-git-send-email-jsnow@redhat.com
      332cc7e9
    • J
      qtest/ahci: add migrate halted dma test · 5d1cf091
      John Snow 提交于
      Test migrating a halted DMA transaction.
      Resume, then test data integrity.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-10-git-send-email-jsnow@redhat.com
      5d1cf091
    • J
      qtest/ahci: add halted dma test · 189d1b61
      John Snow 提交于
      If we're going to test the migration of halted DMA jobs,
      we should probably check to make sure we can resume them
      locally as a first step.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-9-git-send-email-jsnow@redhat.com
      189d1b61
    • J
      qtest/ahci: add flush migrate test · a606ce50
      John Snow 提交于
      Use blkdebug to inject an error on first flush, then attempt to flush
      on the first guest. When the error halts the VM, migrate to the
      second VM, and attempt to resume the command.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-8-git-send-email-jsnow@redhat.com
      a606ce50
    • J
      qtest/ahci: add migrate dma test · 88e21f94
      John Snow 提交于
      Write to one guest, migrate, and then read from the other.
      adjust ahci_io to clear any buffers it creates, so that we
      can use ahci_io safely on both guests knowing we are using
      empty buffers and not accidentally re-using data.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-7-git-send-email-jsnow@redhat.com
      88e21f94
    • J
      qtest/ahci: Add migration test · 278128ab
      John Snow 提交于
      Notes:
      
       * The migration is performed on QOSState objects.
      
       * The migration is performed in such a way that it does not assume
         consistency between the allocators attached to each. That is to say,
         you can use each QOSState object completely independently and then at
         an arbitrary point decide to migrate, and the destination object will
         now be consistent with the memory within the source guest. The source
         object that was migrated from will have a completely blank allocator.
      
      ahci-test.c:
       - verify_state is added
       - ahci_migrate is added as a frontend to migrate
       - test_migrate_sanity test case is added.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-6-git-send-email-jsnow@redhat.com
      278128ab
    • J
      ich9/ahci: Enable Migration · 04329029
      John Snow 提交于
      Lift the flag preventing the migration of the ICH9/AHCI devices.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-5-git-send-email-jsnow@redhat.com
      04329029
    • J
      libqos: Add migration helpers · 085248ae
      John Snow 提交于
      libqos.c:
          -set_context for addressing which commands go where
          -migrate performs the actual migration
      
      malloc.c:
          - Structure of the allocator is adjusted slightly with
            a second-tier malloc to make swapping around the allocators
            easy when we "migrate" the lists from the source to the destination.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-4-git-send-email-jsnow@redhat.com
      085248ae
    • J
      libqos/ahci: Fix sector set method · 455e861c
      John Snow 提交于
      || probably does not mean the same thing as |.
      
      Additionally, allow users to submit a prd_size of 0
      to indicate that they'd like to continue using the default.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-3-git-send-email-jsnow@redhat.com
      455e861c
    • J
      libqos/ahci: Add halted command helpers · 008b6e12
      John Snow 提交于
      Sometimes we want a command to halt the VM instead
      of complete successfully, so it'd be nice to let the
      libqos/ahci functions cope with such scenarios.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-2-git-send-email-jsnow@redhat.com
      008b6e12
    • J
      glib: remove stale compat functions · 62754b15
      John Snow 提交于
      Since we're bumping the version to 2.22+,
      remove the now-stale compat functions.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1431469140-22208-2-git-send-email-jsnow@redhat.com
      62754b15
    • J
      configure: require glib 2.22 · f40685c6
      John Snow 提交于
      This provides g_ptr_array_new_with_free_func, as well as a few
      other functions that we've been hacking around in glib-compat.h.
      Cleaning up the compatibility headers will come later.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1431469140-22208-2-git-send-email-jsnow@redhat.com
      f40685c6
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 0d2ed603
      Peter Maydell 提交于
      Block layer core and image format patches
      
      # gpg: Signature made Fri May 22 16:21:03 2015 BST using RSA key ID C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      
      * remotes/kevin/tags/for-upstream: (22 commits)
        MAINTAINERS: Split "Block QAPI, monitor, command line" off core
        MAINTAINERS: Add header files to Block Layer Core section
        tests: add test case for encrypted qcow2 read/write
        qemu-io: prompt for encryption keys when required
        util: allow \n to terminate password input
        util: move read_password method out of qemu-img into osdep/oslib
        qcow2/qcow: protect against uninitialized encryption key
        qemu-iotests: Make debugging python tests easier
        qemu-iotests: qemu-img info on afl VMDK image with a huge capacity
        block: Detect multiplication overflow in bdrv_getlength
        qemu-io: Use getopt() correctly
        qcow2: style fixes in qcow2-cache.c
        qcow2: make qcow2_cache_put() a void function
        qcow2: use a hash to look for entries in the L2 cache
        qcow2: remove qcow2_cache_find_entry_to_replace()
        qcow2: use an LRU algorithm to replace entries from the L2 cache
        qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()
        qcow2: use one single memory block for the L2/refcount cache tables
        vmdk: Fix overflow if l1_size is 0x20000000
        vmdk: Fix next_cluster_sector for compressed write
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0d2ed603
  4. 22 5月, 2015 12 次提交