1. 19 1月, 2018 1 次提交
    • C
      vhost-user-blk: introduce a new vhost-user-blk host device · 00343e4b
      Changpeng Liu 提交于
      This commit introduces a new vhost-user device for block, it uses a
      chardev to connect with the backend, same with Qemu virito-blk device,
      Guest OS still uses the virtio-blk frontend driver.
      
      To use it, start QEMU with command line like this:
      
      qemu-system-x86_64 \
          -chardev socket,id=char0,path=/path/vhost.socket \
          -device vhost-user-blk-pci,chardev=char0,num-queues=2, \
                  bootindex=2... \
      
      Users can use different parameters for `num-queues` and `bootindex`.
      
      Different with exist Qemu virtio-blk host device, it makes more easy
      for users to implement their own I/O processing logic, such as all
      user space I/O stack against hardware block device. It uses the new
      vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
      information from backend process.
      Signed-off-by: NChangpeng Liu <changpeng.liu@intel.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      00343e4b
  2. 15 10月, 2017 1 次提交
    • A
      virtio-pci: Replace modern_as with direct access to modern_bar · a93c8d82
      Alexey Kardashevskiy 提交于
      The modern bar is accessed now via yet another address space created just
      for that purpose and it does not really need FlatView and dispatch tree
      as it has a single memory region so it is just a waste of memory. Things
      get even worse when there are dozens or hundreds of virtio-pci devices -
      since these address spaces are global, changing any of them triggers
      rebuilding all address spaces.
      
      This replaces indirect accesses to the modern BAR with a simple lookup
      and direct calls to memory_region_dispatch_read/write.
      
      This is expected to save lots of memory at boot time after applying:
      [Qemu-devel] [PULL 00/32] Misc changes for 2017-09-22
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a93c8d82
  3. 15 6月, 2017 1 次提交
    • F
      vhost-user-scsi: Introduce vhost-user-scsi host device · f12c1ebd
      Felipe Franciosi 提交于
      This commit introduces a vhost-user device for SCSI. This is based
      on the existing vhost-scsi implementation, but done over vhost-user
      instead. It also uses a chardev to connect to the backend. Unlike
      vhost-scsi (today), VMs using vhost-user-scsi can be live migrated.
      
      To use it, start Qemu with a command line equivalent to:
      
      qemu-system-x86_64 \
             -chardev socket,id=vus0,path=/tmp/vus.sock \
             -device vhost-user-scsi-pci,chardev=vus0,bus=pci.0,addr=...
      
      A separate commit presents a sample application linked with libiscsi to
      provide a backend for vhost-user-scsi.
      Signed-off-by: NFelipe Franciosi <felipe@nutanix.com>
      Message-Id: <1488479153-21203-4-git-send-email-felipe@nutanix.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f12c1ebd
  4. 16 3月, 2017 3 次提交
  5. 10 1月, 2017 1 次提交
  6. 15 12月, 2016 1 次提交
  7. 02 11月, 2016 1 次提交
  8. 31 10月, 2016 2 次提交
  9. 08 10月, 2016 1 次提交
  10. 15 9月, 2016 1 次提交
    • M
      virtio-bus: Plug devices after features are negotiated · d1b4259f
      Maxime Coquelin 提交于
      Currently, devices are plugged before features are negotiated.
      If the backend doesn't support VIRTIO_F_VERSION_1, the transport
      needs to rewind some settings.
      
      This is the case for CCW, for which a post_plugged callback had
      been introduced, where max_rev field is just updated if
      VIRTIO_F_VERSION_1 is not supported by the backend.
      For PCI, implementing post_plugged would be much more
      complicated, so it needs to know whether the backend supports
      VIRTIO_F_VERSION_1 at plug time.
      
      Currently, nothing is done for PCI. Modern capabilities get
      exposed to the guest even if VIRTIO_F_VERSION_1 is not supported
      by the backend, which confuses the guest.
      
      This patch replaces existing post_plugged solution with an
      approach that fits with both transports.
      Features negotiation is performed before ->device_plugged() call.
      A pre_plugged callback is introduced so that the transports can
      set their supported features.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: qemu-stable@nongnu.org
      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> [ccw]
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NMaxime Coquelin <maxime.coquelin@redhat.com>
      d1b4259f
  11. 10 9月, 2016 2 次提交
  12. 29 7月, 2016 1 次提交
  13. 11 3月, 2016 2 次提交
  14. 12 1月, 2016 1 次提交
  15. 08 1月, 2016 1 次提交
  16. 03 12月, 2015 1 次提交
  17. 12 11月, 2015 3 次提交
  18. 09 10月, 2015 1 次提交
    • M
      virtio-input: Fix device introspection on non-Linux hosts · c6047e96
      Markus Armbruster 提交于
      When CONFIG_LINUX is off, devices "virtio-keyboard-device",
      "virtio-mouse-device", "virtio-tablet-device" and
      "virtio-input-host-device" aren't compiled in, yet
      "virtio-keyboard-pci", "virtio-mouse-pci", "virtio-tablet-pci" and
      "virtio-input-host-pci" still are.  Attempts to introspect them crash,
      e.g.
      
          $ qemu-system-x86_64 -device virtio-tablet-pci,help
          **
          ERROR:/work/armbru/qemu/qom/object.c:333:object_initialize_with_type: assertion failed: (type != NULL)
      
      Broken in commit 710e2d90 and commit 006a5ede.
      
      Fix by compiling the "virtio-FOO-pci" exactly when compiling the
      "virtio-FOO-device": compile "virtio-keyboard-device",
      "virtio-mouse-device", "virtio-tablet-device" regardless of
      CONFIG_LINUX, and compile "virtio-input-host-pci" only for
      CONFIG_LINUX.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-Id: <1444320700-26260-3-git-send-email-armbru@redhat.com>
      c6047e96
  19. 08 7月, 2015 1 次提交
  20. 23 6月, 2015 1 次提交
    • G
      virtio-input: evdev passthrough · 006a5ede
      Gerd Hoffmann 提交于
      This allows to assign host input devices to the guest:
      
      qemu -device virtio-input-host-pci,evdev=/dev/input/event<nr>
      
      The guest gets exclusive access to the input device, so be careful
      with assigning the keyboard if you have only one connected to your
      machine.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      006a5ede
  21. 12 6月, 2015 1 次提交
  22. 11 6月, 2015 8 次提交
  23. 31 5月, 2015 1 次提交
  24. 12 3月, 2015 1 次提交
  25. 02 11月, 2014 1 次提交
    • M
      virtio-pci: fix migration for pci bus master · 68a27b20
      Michael S. Tsirkin 提交于
      Current support for bus master (clearing OK bit) together with the need to
      support guests which do not enable PCI bus mastering, leads to extra state in
      VIRTIO_PCI_FLAG_BUS_MASTER_BUG bit, which isn't robust in case of cross-version
      migration for the case when guests use the device before setting DRIVER_OK.
      
      Rip out this code, and replace it:
      -   Modern QEMU doesn't need VIRTIO_PCI_FLAG_BUS_MASTER_BUG
          so just drop it for latest machine type.
      -   For compat machine types, set PCI_COMMAND if DRIVER_OK
          is set.
      
      As this is needed for 2.1 for both pc and ppc, move PC_COMPAT macros from pc.h
      to a new common header.
      
      Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NAlexander Graf <agraf@suse.de>
      
      68a27b20
  26. 01 7月, 2014 1 次提交