1. 13 5月, 2013 1 次提交
    • H
      conf: Generic XMLs for scsi hostdev · 5c811dce
      Han Cheng 提交于
      An example of the scsi hostdev XML:
      
          <hostdev mode='subsystem' type='scsi'>
            <source>
              <adapter name='scsi_host0'/>
              <address bus='0' target='0' unit='0'/>
            </source>
            <address type='drive' controller='0' bus='0' target='4' unit='8'/>
          </hostdev>
      
      Controller is implicitly added for scsi hostdev, though the scsi
      controller's model defaults to "lsilogic", which might be not what
      the user wants (same problem exists for virtio-scsi disk). It's
      the existing problem, will be addressed later.
      
      The device address must be specified manually. Later patch will let
      libvirt generate it automatically.
      
      This only introduces the generic XMLs for scsi hostdev, later patches
      will add other elements, e.g. <readonly>, <shareable>.
      Signed-off-by: NHan Cheng <hanc.fnst@cn.fujitsu.com>
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      5c811dce
  2. 26 4月, 2013 1 次提交
    • L
      conf: formatter/parser/RNG/docs for hostdev <driver name='kvm|vfio'/> · c4f63ef0
      Laine Stump 提交于
      A domain's <interface> or <hostdev>, as well as a <network>'s
      <forward>, can now have an optional <driver name='kvm|vfio'/>
      element. As of this patch, there is no functionality behind this new
      knob - this patch adds support to the domain and network
      formatter/parser, and to the RNG and documentation.
      
      When the backend is added, legacy KVM PCI device assignment will
      continue to be used when no driver name is specified (or if <driver
      name='kvm'/> is specified), but if driver name is 'vfio', the new UEFI
      Secure Boot compatible VFIO device assignment will be used.
      
      Note that the parser doesn't automatically insert the current default
      value of this setting. This is done on purpose because the two
      possibilities are functionally equivalent from the guest's point of
      view, and we want to be able to automatically start using vfio as the
      default (even for existing domains) at some time in the future. This
      is similar to what was done with the "vhost" driver option in
      <interface>.
      c4f63ef0
  3. 25 4月, 2013 3 次提交
    • J
      conf: add PCI controllers · df0ebf6b
      Ján Tomko 提交于
      Add new controller type 'pci' with models 'pci-root' and 'pci-bridge'.
      df0ebf6b
    • L
      Add NVRAM device · bf188873
      Li Zhang 提交于
      For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device.
      Users are allowed to specify spapr-vio devices'address.
      But NVRAM is not supported in libvirt. So this patch is to
      add NVRAM device to allow users to specify its address.
      
      In QEMU, NVRAM device's address is specified by
       "-global spapr-nvram.reg=xxxxx".
      
      In libvirt, XML file is defined as the following:
      
        <nvram>
          <address type='spapr-vio' reg='0x3000'/>
        </nvram>
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      bf188873
    • O
      Introduce a sub-element <driver> for controller · 45d6c671
      Osier Yang 提交于
      Like what we did for "disk", "filesystem" and "interface", this
      introduces sub-element <driver> for "controller", and put the "queues"
      into it.
      45d6c671
  4. 24 4月, 2013 1 次提交
    • O
      Change the tag name "num_queues" into "queues" · 18b42898
      Osier Yang 提交于
      Instead of making a choice between the underscore and camelCase, this
      simply changes "num_queues" into "queues", which is also consistent
      with Michal's multiple queue support for interface.
      18b42898
  5. 18 4月, 2013 1 次提交
    • L
      rng: tighten up domain <controller> schema · 0f4f5cb2
      Laine Stump 提交于
      The rng schema for <controller> had been non-specific about which
      types of controllers allowed which models, and also allowed the
      num_queues attribute (since that hasn't been released yet, should we
      rename it to "numQueues"?) and <master> subelement to be included for
      any controller type. In reality, half of the models are allowed only
      for type='scsi', and the other half only for type='usb', num_queues is
      allowed only for type='scsi', and <master> only for type='usb'.
      
      This patch makes a separate <group> for type='scsi' and type='usb',
      with each group allowing only the appropriate model values, and
      allowing num_queue and <master> only when appropriate.
      
      <interleave> also hadn't been specified, forcing a specific order of
      subelements, which should never be done. (Note that the <interleave>
      had to surround the main element attributes that are in the <group>
      subelements, due to one of the <group>s containing a subelement).
      0f4f5cb2
  6. 16 4月, 2013 1 次提交
  7. 13 4月, 2013 1 次提交
  8. 09 4月, 2013 2 次提交
  9. 08 4月, 2013 3 次提交
    • O
      Support seclabels for volume type disk · 664270b8
      Osier Yang 提交于
      "seclabels" is only valid for 'file' or 'block' type storage volume.
      664270b8
    • O
      Support startupPolicy for 'volume' disk · 43404fee
      Osier Yang 提交于
      "startupPolicy" is only valid for file type storage volume, otherwise
      it fails on starting the domain.
      43404fee
    • O
      Introduce new XMLs to specify disk source using libvirt storage · 4bc331c8
      Osier Yang 提交于
      With this patch, one can specify the disk source using libvirt
      storage like:
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw' cache='none'/>
          <source pool='default' volume='fc18.img'/>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      "seclabels" and "startupPolicy" are not supported for this new
      disk type ("volume"). They will be supported in later patches.
      
      docs/formatdomain.html.in:
        * Add documents for new XMLs
      docs/schemas/domaincommon.rng:
        * Add rng for new XMLs;
      src/conf/domain_conf.h:
        * New struct for 'volume' type disk source (virDomainDiskSourcePoolDef)
        * Add VIR_DOMAIN_DISK_TYPE_VOLUME for enum virDomainDiskType
      src/conf/domain_conf.c:
        * New helper virDomainDiskSourcePoolDefParse to parse the 'volume'
          type disk source.
        * New helper virDomainDiskSourcePoolDefFree to free the source def
          if 'volume' type disk.
      tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      tests/qemuxml2xmltest.c:
        * New test
      4bc331c8
  10. 06 4月, 2013 1 次提交
    • O
      qemu: Support multiple queue virtio-scsi · d4bf0a93
      Osier Yang 提交于
      This introduce a new attribute "num_queues" (same with the good name
      QEMU uses) for virtio-scsi controller. An example of the XML:
      
      <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
      
      The corresponding QEMU command line:
      
      -device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
      d4bf0a93
  11. 05 4月, 2013 1 次提交
  12. 03 4月, 2013 1 次提交
  13. 22 3月, 2013 4 次提交
  14. 21 3月, 2013 1 次提交
  15. 20 3月, 2013 1 次提交
  16. 14 3月, 2013 2 次提交
    • P
      virtio-rng: Add rate limiting options for virtio-RNG · 32bd699f
      Peter Krempa 提交于
      Qemu's implementation of virtio RNG supports rate limiting of the
      entropy used. This patch exposes the option to tune this functionality.
      
      This patch is based on qemu commit 904d6f588063fb5ad2b61998acdf1e73fb4
      
      The rate limiting is exported in the XML as:
      <devices>
        ...
        <rng model='virtio'>
          <rate bytes='123' period='1234'/>
          <backend model='random'/>
        </rng>
        ...
      32bd699f
    • V
      S390: Documentation for CCW address type · 41ce2c9e
      Viktor Mihajlovski 提交于
      The native bus for s390 I/O is called CCW (channel command word).
      As QEMU has added basic support for the CCW bus, i.e. the
      ability to assign CCW devnos (bus addresses) to devices.
      Domains with the new machine type s390-ccw-virtio can use the
      CCW bus. Currently QEMU will only allow to define virtio
      devices on the CCW bus.
      Here we add the new machine type and the new device address to the
      schema definition and add a new paragraph to the domain XML
      documentation.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      41ce2c9e
  17. 07 3月, 2013 1 次提交
  18. 05 3月, 2013 1 次提交
    • E
      rng: restrict passthrough names to known-good files · 4932ef45
      Eric Blake 提交于
      There is some controversy[1] on the qemu list on whether qemu should
      have ever allowed arbitrary file name passthrough, or whether it
      should be restricted to JUST /dev/random and /dev/hwrng.  It is
      always easier to add support for additional filenames than it is
      to remove support for something once released, so this patch
      restricts libvirt 1.0.3 (where the virtio-random backend was first
      supported) to just the two uncontroversial names, letting us defer
      to a later date any decision on whether supporting arbitrary files
      makes sense. Additionally, since qemu 1.4 does NOT support
      /dev/fdset/nnn fd passthrough for the backend, limiting to just
      two known names means that we don't get tempted to try fd
      passthrough where it won't work.
      
      [1]https://lists.gnu.org/archive/html/qemu-devel/2013-03/threads.html#00023
      
      * src/conf/domain_conf.c (virDomainRNGDefParseXML): Only allow
      /dev/random and /dev/hwrng.
      * docs/schemas/domaincommon.rng: Flag invalid files.
      * docs/formatdomain.html.in (elementsRng): Document this.
      * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args:
      Update test to match.
      * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml:
      Likewise.
      4932ef45
  19. 27 2月, 2013 1 次提交
  20. 25 2月, 2013 1 次提交
    • P
      doc: schema: Add basic documentation for the virtual RNG device support · fa16c80f
      Peter Krempa 提交于
      This patch documents XML elements used for (basic) support of virtual
      RNG devices.
      
      In the devices section in the domain XML users may specify:
      
      For the default 'random' backend:
        <devices>
          <rng model='virtio'>
            <backend model='random'>/dev/urandom</backend>
          </rng>
        </devices>
      
      For the slightly more advanced EGD backend:
        <devices>
          <rng model='virtio'>
            <backend model='egd' type='udp'>
              <!-- this is a definition of a character device -->
              <source mode='bind' service='1234'/>
              <source mode='connect' host='1.2.3.4' service='1234'/>
              <!-- or other valid character device configuration -->
            </backend>
          </rng>
        </devices>
      
      For the planned random daemon/pool:
        <devices>
          <rng model='virtio'>
            <backend model='pool' pool='poolname'>class</backend>
          </rng>
        </devices>
      
      to enable the RNG device for guests.
      fa16c80f
  21. 12 2月, 2013 1 次提交
    • V
      S390: Documentation for CCW address type · 24aa7f8d
      Viktor Mihajlovski 提交于
      The native bus for s390 I/O is called CCW (channel command word).
      As QEMU has added basic support for the CCW bus, i.e. the
      ability to assign CCW devnos (bus addresses) to devices.
      Domains with the new machine type s390-ccw-virtio can use the
      CCW bus. Currently QEMU will only allow to define virtio
      devices on the CCW bus.
      Here we add the new machine type and the new device address to the
      schema definition and add a new paragraph to the domain XML
      documentation.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      24aa7f8d
  22. 25 1月, 2013 1 次提交
    • J
      qemu: escape ipv6 for rbd network disk hosts · c1509ab4
      Josh Durgin 提交于
      Hosts for rbd are ceph monitor daemons. These have fixed IP addresses,
      so they are often referenced by IP rather than hostname for
      convenience, or to avoid relying on DNS. Using IPv4 addresses as the
      host name works already, but IPv6 addresses require rbd-specific
      escaping because the colon is used as an option separator in the
      string passed to qemu.
      
      Escape these colons, and enclose the IPv6 address in square brackets
      so it is distinguished from the port, which is currently mandatory.
      Acked-by: NOsier Yang <jyang@redhat.com>
      Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
      c1509ab4
  23. 24 1月, 2013 1 次提交
  24. 23 1月, 2013 1 次提交
    • A
      qemu: Support ram bar size for qxl devices · 55bfd020
      Alon Levy 提交于
      Adds a "ram" attribute globally to the video.model element, that changes
      the resulting qemu command line only if video.type == "qxl".
      
      <video>
        <model type='qxl' ram='65536' vram='65536' heads='1'/>
      </video>
      
      That attribute gets a default value of 64*1024. The schema is unchanged
      for other video element types.
      
      The resulting qemu command line change is the addition of
      
      -global qxl-vga.ram_size=<ram>*1024
      
      or
      
      -global qxl.ram_size=<ram>*1024
      
      For the main and secondary qxl devices respectively.
      
      The default for the qxl ram bar is 64*1024 kilobytes (the same as the
      default qxl vram bar size).
      55bfd020
  25. 10 1月, 2013 1 次提交
    • G
      qemu: add usb-serial support · e3a04455
      Guannan Ren 提交于
      Add an optional 'type' attribute to <target> element of serial port
      device. There are two choices for its value, 'isa-serial' and
      'usb-serial'. For backward compatibility, when attribute 'type' is
      missing the 'isa-serial' will be chosen as before.
      
      Libvirt XML sample
      
          <serial type='pty'>
            <target type='usb-serial' port='0'/>
            <address type='usb' bus='0' port='1'/>
          </serial>
      
      qemu commandline:
      
      qemu ${other_vm_args}              \
          -chardev pty,id=charserial0    \
          -device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1
      e3a04455
  26. 08 1月, 2013 1 次提交
  27. 07 1月, 2013 1 次提交
    • O
      docs: Add docs and rng schema for new XML tag sgio · b9c57e7b
      Osier Yang 提交于
      This introduces new XML tag "sgio" for disk, its valid values
      are "filtered" and "unfiltered", setting it as "filtered" will
      set the disk's unpriv_sgio to 0, and "unfiltered" to set it
      as 1, which allows the unprivileged SG_IO commands.
      b9c57e7b
  28. 18 12月, 2012 1 次提交
    • D
      Add support for <hostdev mode="capabilities"> · aae0fc2a
      Daniel P. Berrange 提交于
      The <hostdev> device type has long had a redundant "mode"
      attribute, which has always been "subsys". This finally
      introduces a new mode "capabilities", which will be used
      by the LXC driver for device assignment. Since container
      based virtualization uses a single kernel, the idea of
      assigning physical PCI devices doesn't make sense. It is
      still reasonable to assign USB devices, but for assigning
      arbitrary nodes in /dev, the new 'capabilities' mode is
      to be used.
      
      The first capability support is 'storage', which is for
      assignment of block devices. Functionally this is really
      pretty similar to the <disk> support. The only difference
      is the device node name is identical in both host and
      container namespaces.
      
          <hostdev mode='capabilities' type='storage'>
            <source>
              <block>/dev/sdf1</block>
            </source>
          </hostdev>
      
      The second capability support is 'misc', which is for
      assignment of character devices. There is no existing
      parallel to this. Again the device node is the same
      inside & outside the container.
      
          <hostdev mode='capabilities' type='misc'>
            <source>
              <char>/dev/input/event3</char>
            </source>
          </hostdev>
      
      The reason for keeping the char & storage devices
      separate in the domain XML, is to mirror the split
      in the node device XML. NB the node device XML does
      not yet report character devices, but that's another
      new patch to come
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      aae0fc2a
  29. 17 12月, 2012 1 次提交
    • G
      conf: add optional attribte primary to video <model> element · 09938bb3
      Guannan Ren 提交于
      If there are multiple video devices
      primary = 'yes' marks this video device as the primary one.
      The rest are secondary video devices. No more than one could be
      mark as primary. If none of them has primary attribute, the first
      one will be the primary by default like what it was.
      The reason of this changing is that for qemu, only one primary video
      device is permitted which can be of any type. For secondary video
      devices, only qxl is allowd. Primary attribute removes the restriction
      that the first have to be the primary one.
      
      We always put the primary video device into the first position of
      video device structure array after parsing.
      09938bb3
  30. 07 12月, 2012 1 次提交
  31. 27 11月, 2012 1 次提交
    • H
      Add Gluster protocol as supported network disk backend · a2d2b80f
      Harsh Prateek Bora 提交于
      This patch introduces the RNG schema and updates necessary data strucutures
      to allow various hypervisors to make use of Gluster protocol as one of the
      supported network disk backend. Next patch will add support to make use of
      this feature in Qemu since it now supports Gluster protocol as one of the
      network based storage backend.
      
      Two new optional attributes for <host> element are introduced - 'transport'
      and 'socket'. Valid transport values are tcp, unix or rdma. If none specified,
      tcp is assumed. If transport is unix, socket specifies path to unix socket.
      
      This patch allows users to specify disks on gluster backends like this:
      
          <disk type='network' device='disk'>
            <driver name='qemu' type='raw'/>
            <source protocol='gluster' name='Volume1/image'>
              <host name='example.org' port='6000' transport='tcp'/>
            </source>
            <target dev='vda' bus='virtio'/>
          </disk>
      
          <disk type='network' device='disk'>
            <driver name='qemu' type='raw'/>
            <source protocol='gluster' name='Volume2/image'>
              <host transport='unix' socket='/path/to/sock'/>
            </source>
            <target dev='vdb' bus='virtio'/>
          </disk>
      Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
      a2d2b80f