1. 10 12月, 2013 4 次提交
  2. 21 9月, 2013 1 次提交
    • P
      virtio-blk: do not relay a previous driver's WCE configuration to the current · ef5bc962
      Paolo Bonzini 提交于
      The following sequence happens:
      - the SeaBIOS virtio-blk driver does not support the WCE feature, which
      causes QEMU to disable writeback caching
      
      - the Linux virtio-blk driver resets the device, finds WCE is available
      but writeback caching is disabled; tells block layer to not send cache
      flush commands
      
      - the Linux virtio-blk driver sets the DRIVER_OK bit, which causes
      writeback caching to be re-enabled, but the Linux virtio-blk driver does
      not know of this side effect and cache flushes remain disabled
      
      The bug is at the third step.  If the guest does know about CONFIG_WCE,
      QEMU should ignore the WCE feature's state.  The guest will control the
      cache mode solely using configuration space.  This change makes Linux
      do flushes correctly, but Linux will keep SeaBIOS's writethrough mode.
      
      Hence, whenever the guest is reset, the cache mode of the disk should
      be reset to whatever was specified in the "-drive" option.  With this
      change, the Linux virtio-blk driver finds that writeback caching is
      enabled, and tells the block layer to send cache flush commands
      appropriately.
      
      Reported-by: Rusty Russell <rusty@au1.ibm.com
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ef5bc962
  3. 12 8月, 2013 1 次提交
  4. 29 7月, 2013 1 次提交
  5. 19 7月, 2013 3 次提交
    • P
      virtio: Support transports which can specify the vring alignment · 6ce69d1c
      Peter Maydell 提交于
      Support virtio transports which can specify the vring alignment
      (ie where the guest communicates this to the host) by providing
      a new virtio_queue_set_align() function. (The default alignment
      remains as before.)
      
      Transports which wish to make use of this must set the
      has_variable_vring_alignment field in their VirtioBusClass
      struct to true; they can then change the alignment via
      virtio_queue_set_align().
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
      6ce69d1c
    • P
      virtio: Add support for guest setting of queue size · e63c0ba1
      Peter Maydell 提交于
      The MMIO virtio transport spec allows the guest to tell the host how
      large the queue size is. Add virtio_queue_set_num() function which
      implements this in the QEMU common virtio support code.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1373977512-28932-4-git-send-email-peter.maydell@linaro.org
      e63c0ba1
    • S
      dataplane: sync virtio.c and vring.c virtqueue state · 9154b02c
      Stefan Hajnoczi 提交于
      Load the virtio.c state into vring.c when we start dataplane mode and
      vice versa when stopping dataplane mode.  This patch makes it possible
      to start and stop dataplane any time while the guest is running.
      
      This will eventually allow us to go back to QEMU main loop for
      bdrv_drain_all() and live migration.  In the meantime, this patch makes
      the dataplane lifecycle more robust but should make no visible
      difference.  It may be useful in the virtio-net dataplane effort.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9154b02c
  6. 16 7月, 2013 1 次提交
    • M
      virtio-net: add feature bit for any header s/g · 488f069b
      Michael S. Tsirkin 提交于
      Old qemu versions required that 1st s/g entry is the header.
      
      Since QEMU 1.5, patchset titled "virtio-net: iovec handling cleanup"
      removed this limitation but a feature bit is needed so guests know it's
      safe to lay out header differently.
      
      This patch applies on top and adds such a feature bit to QEMU.
      It is set by default for virtio-net.
      virtio net header inline with the data is beneficial
      for latency and small packet bandwidth - guest driver
      code utilizing this feature has been acked but missed 3.11
      by a narrow margin, it's pending for 3.12.
      
      This feature bit is cleared by default when compatibility with old
      machine types is requested.
      
      Other performance-sensitive devices (blk and scsi)
      don't yet support arbitrary s/g layouts, so
      we only set this bit for virtio-net for now.
      There are plans to allow arbitrary layouts there, but
      no code has been posted yet.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      488f069b
  7. 04 7月, 2013 1 次提交
    • P
      memory: add ref/unref calls · dfde4e6e
      Paolo Bonzini 提交于
      Add ref/unref calls at the following places:
      
      - places where memory regions are stashed by a listener and
        used outside the BQL (including in Xen or KVM).
      
      - memory_region_find callsites
      
      - creation of aliases and containers (only the aliased/contained
        region gets a reference to avoid loops)
      
      - around calls to del_subregion/add_subregion, where the region
        could disappear after the first call
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dfde4e6e
  8. 22 5月, 2013 1 次提交
  9. 15 5月, 2013 1 次提交
  10. 04 5月, 2013 2 次提交
  11. 25 4月, 2013 10 次提交
  12. 19 4月, 2013 4 次提交
    • N
      vhost-scsi: new device supporting the tcm_vhost Linux kernel module · 5e9be92d
      Nicholas Bellinger 提交于
      The WWPN specified in configfs is passed to "-device vhost-scsi-pci".
      The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is not
      available from the QEMU command-line.  Instead, I hardcode it to zero.
      
      Changes in Patch-v2:
         - Add vhost_scsi_get_features() in order to determine feature bits
           supports by host kernel (mst + nab)
         - Re-enable usage of DEFINE_VIRTIO_COMMON_FEATURES, and allow
           EVENT_IDX to be disabled by host in vhost_scsi_get_features()
         - Drop unused hotplug bit in DEFINE_VHOST_SCSI_PROPERTIES
      
      Changes in Patch-v1:
         - Set event_idx=off by default (nab, thanks asias)
         - Disable hotplug feature bit for v3.9 tcm_vhost kernel code, need to
           re-enable in v3.10 (nab)
         - Update to latest qemu.git/master HEAD
      
      Changes in WIP-V3:
         - Drop ioeventfd vhost_scsi_properties (asias, thanks stefanha)
         - Add CONFIG_VHOST_SCSI (asias, thanks stefanha)
         - Add hotplug feature bit
      
      Changes in WIP-V2:
         - Add backend guest masking support (nab)
         - Bump ABI_VERSION to 1 (nab)
         - Set up set_guest_notifiers (asias)
         - Set up vs->dev.vq_index (asias)
         - Drop vs->vs.vdev.{set,clear}_vhost_endpoint (asias)
         - Drop VIRTIO_CONFIG_S_DRIVER check in vhost_scsi_set_status (asias)
      
      Howto:
         Use the latest seabios, at least commit b44a7be17b
         git clone git://git.seabios.org/seabios.git
         make
         cp out/bios.bin /usr/share/qemu/bios.bin
         qemu -device vhost-scsi-pci,wwpn=naa.6001405bd4e8476d,event_idx=off
      ...
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NAsias He <asias@redhat.com>
      [ Rebase on top of VirtIOSCSICommon patch, fix bugs in feature
        negotiation and irqfd masking - Paolo ]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5e9be92d
    • P
      virtio-scsi: create VirtIOSCSICommon · 292c8e50
      Paolo Bonzini 提交于
      This patch refactors existing virtio-scsi code into VirtIOSCSICommon
      in order to allow virtio_scsi_init_common() to be used by both internal
      virtio_scsi_init() and external vhost-scsi-pci code.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Asias He <asias@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      292c8e50
    • L
      virtio.h: drop unused function prototypes · fd1ca7e0
      Luiz Capitulino 提交于
      They are unused since commit 5c7d0962.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fd1ca7e0
    • N
      vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping · af603142
      Nicholas Bellinger 提交于
      This patch follows MST's recommendation to move checks for
      vhost_verify_ring_mappings() -> cpu_physical_memory_map() operations
      from MemoryListener->region_[add,del]() -> vhost_set_memory() into
      final MemoryListener->commit() -> vhost_commit() callback.
      
      It addresses the case where virtio-scsi vq ioport RAM re-mapping
      to read-only SeaBIOS ROM triggers a cpu_physical_memory_map()
      NIL MemoryRegionSection pointer failure.
      
      Also save vhost_dev->mem_changed_[start,end]_addr values in
      vhost_set_memory() for final ranges_overlap checks.  (Thanks Paolo!)
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Asias He <asias@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      af603142
  13. 17 4月, 2013 3 次提交
  14. 16 4月, 2013 2 次提交
  15. 15 4月, 2013 4 次提交
  16. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a