1. 18 1月, 2019 9 次提交
  2. 20 12月, 2018 2 次提交
    • E
      virtio: Provide version-specific variants of virtio PCI devices · f6e501a2
      Eduardo Habkost 提交于
      Many of the current virtio-*-pci device types actually represent
      3 different types of devices:
      * virtio 1.0 non-transitional devices
      * virtio 1.0 transitional devices
      * virtio 0.9 ("legacy device" in virtio 1.0 terminology)
      
      That would be just an annoyance if it didn't break our device/bus
      compatibility QMP interfaces.  With these multi-purpose device
      types, there's no way to tell management software that
      transitional devices and legacy devices require a Conventional
      PCI bus.
      
      The multi-purpose device types would also prevent us from telling
      management software what's the PCI vendor/device ID for them,
      because their PCI IDs change at runtime depending on the bus
      where they were plugged.
      
      This patch adds separate device types for each of those virtio
      device flavors:
      
      - virtio-*-pci: the existing multi-purpose device types
        - Configurable using `disable-legacy` and `disable-modern`
          properties
        - Legacy driver support is automatically enabled/disabled
          depending on the bus where it is plugged
        - Supports Conventional PCI and PCI Express buses
          (but Conventional PCI is incompatible with
          disable-legacy=off)
        - Changes PCI vendor/device IDs at runtime
      - virtio-*-pci-transitional: virtio-1.0 device supporting legacy drivers
        - Supports Conventional PCI buses only, because
          it has a PIO BAR
      - virtio-*-pci-non-transitional: modern-only
        - Supports both Conventional PCI and PCI Express buses
      
      The existing TYPE_* macros for these types will point to an
      abstract base type, so existing casts in the code will keep
      working for all variants.
      
      A simple test script (tests/acceptance/virtio_version.py) is
      included, to check if the new device types are equivalent to
      using the `disable-legacy` and `disable-modern` options.
      Acked-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      f6e501a2
    • E
      virtio: Helper for registering virtio device types · a4ee4c8b
      Eduardo Habkost 提交于
      Introduce a helper for registering different flavours of virtio
      devices.  Convert code to use the helper, but keep only the
      existing generic types.  Transitional and non-transitional device
      types will be added by another patch.
      Acked-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a4ee4c8b
  3. 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
  4. 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
  5. 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
  6. 16 3月, 2017 3 次提交
  7. 10 1月, 2017 1 次提交
  8. 15 12月, 2016 1 次提交
  9. 02 11月, 2016 1 次提交
  10. 31 10月, 2016 2 次提交
  11. 08 10月, 2016 1 次提交
  12. 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
  13. 10 9月, 2016 2 次提交
  14. 29 7月, 2016 1 次提交
  15. 11 3月, 2016 2 次提交
  16. 12 1月, 2016 1 次提交
  17. 08 1月, 2016 1 次提交
  18. 03 12月, 2015 1 次提交
  19. 12 11月, 2015 3 次提交
  20. 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
  21. 08 7月, 2015 1 次提交
  22. 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
  23. 12 6月, 2015 1 次提交
  24. 11 6月, 2015 1 次提交