1. 11 6月, 2015 1 次提交
  2. 04 6月, 2015 1 次提交
    • J
      vhost: logs sharing · 309750fa
      Jason Wang 提交于
      Currently we allocate one vhost log per vhost device. This is sub
      optimal when:
      
      - Guest has several device with vhost as backend
      - Guest has multiqueue devices
      
      In the above cases, we can avoid the memory allocation by sharing a
      single vhost log among all the vhost devices. This is done through:
      
      - Introducing a new vhost_log structure with refcnt inside.
      - Using a global pointer to vhost_log structure that will be used. And
        introduce helper to get the log with expected log size and helper to
      - drop the refcnt to the old log.
      - Each vhost device still keep track of a pointer to the log that was
        used.
      
      With above, if no resize happens, all vhost device will share a single
      vhost log. During resize, a new vhost_log structure will be allocated
      and made for the global pointer. And each vhost devices will drop the
      refcnt to the old log.
      
      Tested by doing scp during migration for a 2 queues virtio-net-pci.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      309750fa
  3. 04 4月, 2015 1 次提交
  4. 23 6月, 2014 1 次提交
  5. 19 6月, 2014 4 次提交
  6. 19 4月, 2013 1 次提交
    • 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
  7. 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
  8. 02 2月, 2013 1 次提交
    • J
      vhost: multiqueue support · a9f98bb5
      Jason Wang 提交于
      This patch lets vhost support multiqueue. The idea is simple, just launching
      multiple threads of vhost and let each of vhost thread processing a subset of
      the virtqueues of the device. After this change each emulated device can have
      multiple vhost threads as its backend.
      
      To do this, a virtqueue index were introduced to record to first virtqueue that
      will be handled by this vhost_net device. Based on this and nvqs, vhost could
      calculate its relative index to setup vhost_net device.
      
      Since we may have many vhost/net devices for a virtio-net device. The setting of
      guest notifiers were moved out of the starting/stopping of a specific vhost
      thread. The vhost_net_{start|stop}() were renamed to
      vhost_net_{start|stop}_one(), and a new vhost_net_{start|stop}() were introduced
      to configure the guest notifiers and start/stop all vhost/vhost_net devices.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a9f98bb5
  9. 08 1月, 2013 1 次提交
  10. 19 12月, 2012 1 次提交
  11. 07 9月, 2012 1 次提交
  12. 04 1月, 2012 1 次提交
  13. 20 12月, 2011 1 次提交
    • A
      vhost: convert to MemoryListener API · 04097f7c
      Avi Kivity 提交于
      Drop the use of cpu_register_phys_memory_client() in favour of the new
      MemoryListener API.  The new API simplifies the caller, since there is no
      need to deal with splitting and merging slots; however this is not exploited
      in this patch.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      04097f7c
  14. 26 8月, 2011 1 次提交
    • M
      vhost-net: cleanup host notifiers at last step · b0b3db79
      Michael S. Tsirkin 提交于
      When the vhost notifier is disabled, the userspace handler runs
      immediately: virtio_pci_set_host_notifier_internal might
      call virtio_queue_notify_vq.
      Since the VQ state and the tap backend state aren't
      recovered yet, this causes
      "Guest moved used index from XXX to YYY" assertions.
      
      The solution is to split out host notifier handling
      from vhost VQ setup and disable notifiers as our last step
      when we stop vhost-net. For symmetry enable them first thing
      on start.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      b0b3db79
  15. 02 2月, 2011 1 次提交
  16. 02 4月, 2010 1 次提交