1. 23 9月, 2014 7 次提交
    • F
      virtio-scsi: Split virtio_scsi_handle_cmd_req from virtio_scsi_handle_cmd · bf359a44
      Fam Zheng 提交于
      This is the "common part" to handle one cmd request. Refactor out for
      later usage of dataplane iothread code.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      bf359a44
    • P
      virtio-scsi: clean up virtio_scsi_parse_cdb · 9df7bfdd
      Paolo Bonzini 提交于
      The command direction according to the guest-passed buffers
      is already stored in the VirtIOSCSIReq.  We can use it instead
      of computing it again from req->elem.
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9df7bfdd
    • P
      vhost-scsi: use virtio_ldl_p · 7ce04255
      Paolo Bonzini 提交于
      This helps for cross-endian configurations.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7ce04255
    • F
      virtio-scsi: Optimize virtio_scsi_init_req · faf1e1fb
      Fam Zheng 提交于
      The VirtQueueElement is a very big structure (>48k!), since it will be
      initialzed by virtqueue_pop, we can save the expensive zeroing here.
      
      This saves a few microseconds per request in my test:
      
      [fio-test]      rw         bs         iodepth    jobs       bw         iops       latency
      --------------------------------------------------------------------------------------------
      Before          read       4k         1          1          110        28269      34
      After           read       4k         1          1          131        33745      28
      
      Whereas,
      
      virtio-blk      read       4k         1          1          217        55673      16
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      faf1e1fb
    • F
      scsi: Optimize scsi_req_alloc · 61e68b3f
      Fam Zheng 提交于
      Zeroing sense buffer for each scsi request is not efficient, we can just
      leave it uninitialized because sense_len is set to 0.
      
      Move the implicitly zeroed fields to the end of the structure and use a
      partial memset.
      
      The explicitly initialized fields (by scsi_req_alloc or scsi_req_new)
      are moved to the beginning of the structure, before sense buffer, to
      skip the memset.
      
      Also change g_malloc0 to g_slice_alloc.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      61e68b3f
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 380f649e
      Peter Maydell 提交于
      # gpg: Signature made Mon 22 Sep 2014 12:41:59 BST using RSA key ID 81AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      
      * remotes/stefanha/tags/block-pull-request: (59 commits)
        block: Always compile virtio-blk dataplane
        vring: Better error handling if num is too large
        virtio: Import virtio_vring.h
        async: aio_context_new(): Handle event_notifier_init failure
        block: vhdx - fix reading beyond pointer during image creation
        block: delete cow block driver
        block/archipelago: Fix typo in qemu_archipelago_truncate()
        ahci: Add test_identify case to ahci-test.
        ahci: Add test_hba_enable to ahci-test.
        ahci: Add test_hba_spec to ahci-test.
        ahci: properly shadow the TFD register
        ahci: add test_pci_enable to ahci-test.
        ahci: Add test_pci_spec to ahci-test.
        ahci: MSI capability should be at 0x80, not 0x50.
        ahci: Adding basic functionality qtest.
        layout: Add generators for refcount table and blocks
        fuzz: Add fuzzing functions for entries of refcount table and blocks
        docs: List all image elements currently supported by the fuzzer
        qapi/block-core: Add "new" qcow2 options
        qcow2: Add overlap-check.template option
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      380f649e
    • P
      Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-09-22' into staging · 17336812
      Peter Maydell 提交于
      trivial patches for 2014-09-22
      
      # gpg: Signature made Mon 22 Sep 2014 09:10:03 BST using RSA key ID A4C3D7DB
      # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@debian.org>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
      #      Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514  66A7 BEE5 9D74 A4C3 D7DB
      
      * remotes/mjt/tags/trivial-patches-2014-09-22:
        arch_init: Setting QEMU_ARCH enum straight
        pc: Add missing 'static' attribute
        block: allow creation of fixed vhdx images
        vl: Print maxmem in hex format for error message
        configure: trivial fixes
        xen-hvm.c: Always return -1 when failure occurs in xen_hvm_init()
        rdma: Fix incorrect description in comments
        Fix typos and misspellings in comments
        qemu-char: Permit only a single "stdio" character device
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      17336812
  2. 22 9月, 2014 33 次提交