1. 18 1月, 2019 7 次提交
  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 10月, 2018 1 次提交
  4. 01 6月, 2018 1 次提交
  5. 23 5月, 2018 1 次提交
  6. 01 3月, 2018 1 次提交
  7. 09 2月, 2018 1 次提交
  8. 05 2月, 2018 1 次提交
  9. 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
  10. 22 12月, 2017 1 次提交
    • L
      virtio-pci: Don't force Subsystem Vendor ID = Vendor ID · f2bc54de
      Ladi Prosek 提交于
      The statement being removed doesn't change anything as virtio PCI devices already
      have Subsystem Vendor ID set to pci_default_sub_vendor_id (0x1af4), same as Vendor
      ID. And the Virtio spec does not require the two to be equal, either:
      
        "The PCI Subsystem Vendor ID and the PCI Subsystem Device ID MAY reflect the PCI
        Vendor and Device ID of the environment (for informational purposes by the driver)."
      
      Background:
      
      Following the recent virtio-win licensing change, several vendors are planning to
      ship their own certified version of Windows guest Virtio drivers, potentially taking
      advantage of Windows Update as a distribution channel. It is therefore critical that
      each vendor uses their own PCI Subsystem Vendor ID for Virtio devices to prevent
      drivers from other vendors binding to it.
      
      This would be trivially done by adding:
      
        k->subsystem_vendor_id = ...
      
      to virtio_pci_class_init(). Except for the problematic statement deleted by this
      patch, which reverts the Subsystem Vendor ID back to 0x1af4 for legacy devices for
      no good reason.
      Signed-off-by: NLadi Prosek <lprosek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
      f2bc54de
  11. 06 12月, 2017 1 次提交
  12. 15 10月, 2017 3 次提交
  13. 03 8月, 2017 1 次提交
  14. 14 7月, 2017 3 次提交
  15. 04 7月, 2017 1 次提交
  16. 30 6月, 2017 1 次提交
  17. 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
  18. 16 3月, 2017 5 次提交
  19. 02 3月, 2017 1 次提交
  20. 01 2月, 2017 1 次提交
    • C
      pci: Convert msix_init() to Error and fix callers · ee640c62
      Cao jin 提交于
      msix_init() reports errors with error_report(), which is wrong when
      it's used in realize().  The same issue was fixed for msi_init() in
      commit 1108b2f8. In order to make the API change as small as possible,
      leave the return value check to later patch.
      
      For some devices(like e1000e, vmxnet3, nvme) who won't fail because of
      msix_init's failure, suppress the error report by passing NULL error
      object.
      
      Bonus: add comment for msix_init.
      
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Gerd Hoffmann <kraxel@redhat.com>
      CC: Dmitry Fleytman <dmitry@daynix.com>
      CC: Jason Wang <jasowang@redhat.com>
      CC: Michael S. Tsirkin <mst@redhat.com>
      CC: Hannes Reinecke <hare@suse.de>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Alex Williamson <alex.williamson@redhat.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Marcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NCao jin <caoj.fnst@cn.fujitsu.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      ee640c62
  21. 25 1月, 2017 1 次提交
  22. 19 1月, 2017 2 次提交
  23. 10 1月, 2017 2 次提交