[libvirt] [PATCH 00/25 v4] Support scsi device passthrough via scsi-generic

Osier Yang jyang at redhat.com
Fri May 3 18:07:19 UTC 2013


This adds the support for qemu's scsi-generic device, which can be
used to passthrough scsi host device. An example of the XML:

  <hostdev mode='subsystem' type='scsi' managed='no'>
    <source>
      <adapter name='scsi_host7'/>
      <address bus='0' target='0' unit='0'/>
    </source>
    <address type='drive' controller='0' bus='0' target='0' unit='1'/>
  </hostdev>

v3 - v4 (details in each patch):
  * Rebased on top
  * Support <shareable>
  * Support <sgio>
  * Various preparation patches for <shareable> and <sgio>
  * Split 1/10 in v3 into 2 patches (<readonly> now is a single patch,
    for easy reviewing, and <readonly> is a sub-element of "hostdev"
    in rng schema, because it could be used by other type hostdev in
    future).
  * Split 4/10 in v3 into 2 patches (bootindex support now is a single
    patch, for easy reviewing)

v2.5 - v3 (details in each patch):
  * 1/10 and 2/10 of v2.5 are pushed
  * 8/10 of v2.5 is splitted
  * A better way to generate the address for scsi host device instead of
    the rigid one.
  * Support all scsi controllers when building the qemu command line.
  * Figure out the limits of the qemu properties, and do checking
  * Don't forget DAC and apparmor security backends
  * Orgnize the patches in a better way.
  * Fix the make check failure

Han Cheng (7):
  conf: Generic XMLs for scsi hostdev
  qemu: New cap flags for scsi-generic
  utils: util functions for scsi hostdev
  qemu: Build qemu command line for scsi host device
  qemu: Introduce activeScsiHostdevs list for scsi host devices
  qemu: Add hotplug support for scsi host device
  qemu: Allow the scsi-generic device in cgroup

Osier Yang (18):
  rng: Interleave hostdev elements
  Introduce <readonly> for hostdev
  qemu: Support bootindex for scsi host device
  security: Manage the security label for scsi host device
  qemu: Refactor helpers for USB device attachment
  conf: Generate address for scsi host device automatically
  conf: Introduce <shareable> for hostdev
  utils: Rename scsi->path to scsi->sg_path
  qemu: Rename qemu_driver->sharedDisks to qemu_driver->sharedDevices
  utils: Add a helper to get the device name that sg device mapped to
  qemu: Refactor the helpers to track shared scsi host device
  qemu: Manage shared device entry for scsi host device
  Rename virDomainDiskSGIO to virDomainDeviceSGIO
  conf: Introduce sgio for hostdev
  qemu: Move qemuSetUnprivSGIO into qemu_conf.c
  qemu: Refactor qemuSetUnprivSGIO to support scsi host device
  qemu: Set unpriv_sgio for scsi host device
  qemu: Check conflicts for shared scsi host device

 docs/formatdomain.html.in                          |  49 ++-
 docs/schemas/domaincommon.rng                      |  86 +++-
 po/POTFILES.in                                     |   1 +
 src/Makefile.am                                    |   1 +
 src/conf/domain_audit.c                            |  10 +
 src/conf/domain_conf.c                             | 353 +++++++++++++++-
 src/conf/domain_conf.h                             |  24 +-
 src/libvirt_private.syms                           |  23 ++
 src/qemu/qemu_capabilities.c                       |  21 +-
 src/qemu/qemu_capabilities.h                       |   2 +
 src/qemu/qemu_cgroup.c                             |  46 ++-
 src/qemu/qemu_command.c                            | 146 ++++++-
 src/qemu/qemu_command.h                            |   6 +
 src/qemu/qemu_conf.c                               | 372 ++++++++++++-----
 src/qemu/qemu_conf.h                               |  38 +-
 src/qemu/qemu_driver.c                             |  25 +-
 src/qemu/qemu_hostdev.c                            | 235 +++++++++++
 src/qemu/qemu_hostdev.h                            |  10 +
 src/qemu/qemu_hotplug.c                            | 210 ++++++++--
 src/qemu/qemu_process.c                            |  64 +--
 src/qemu/qemu_process.h                            |   1 -
 src/security/security_apparmor.c                   |  49 ++-
 src/security/security_dac.c                        |  76 +++-
 src/security/security_selinux.c                    |  72 +++-
 src/util/virscsi.c                                 | 455 +++++++++++++++++++++
 src/util/virscsi.h                                 |  88 ++++
 tests/qemuhelpdata/qemu-1.0-device                 |  10 +
 tests/qemuhelpdata/qemu-1.1.0-device               |  10 +
 tests/qemuhelpdata/qemu-1.2.0-device               |   5 +
 tests/qemuhelpdata/qemu-kvm-1.2.0-device           |   5 +
 tests/qemuhelptest.c                               |  19 +-
 .../qemuxml2argv-hostdev-scsi-boot.args            |   9 +
 .../qemuxml2argv-hostdev-scsi-boot.xml             |  34 ++
 .../qemuxml2argv-hostdev-scsi-lsi.args             |   9 +
 .../qemuxml2argv-hostdev-scsi-lsi.xml              |  35 ++
 .../qemuxml2argv-hostdev-scsi-readonly.args        |   9 +
 .../qemuxml2argv-hostdev-scsi-readonly.xml         |  36 ++
 .../qemuxml2argv-hostdev-scsi-sgio.xml             |  35 ++
 .../qemuxml2argv-hostdev-scsi-shareable.xml        |  36 ++
 .../qemuxml2argv-hostdev-scsi-virtio-scsi.args     |   9 +
 .../qemuxml2argv-hostdev-scsi-virtio-scsi.xml      |  35 ++
 tests/qemuxml2argvtest.c                           |  18 +
 tests/qemuxml2xmltest.c                            |   6 +
 43 files changed, 2469 insertions(+), 314 deletions(-)
 create mode 100644 src/util/virscsi.c
 create mode 100644 src/util/virscsi.h
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-readonly.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-sgio.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-shareable.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-scsi.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-scsi.xml

-- 
1.8.1.4




More information about the libvir-list mailing list