1. 21 5月, 2013 2 次提交
  2. 20 5月, 2013 3 次提交
    • O
      storage_conf: Improve the coding style in storage_conf.h · 8b7b43a1
      Osier Yang 提交于
      Changes:
        * Remove useless comments
        * Remove useless blank lines
        * If the struct member is a enum type, comment it like
          /* enum fooBar */
        * Break the long lines
        * Prefer the common function style for the inline function
      8b7b43a1
    • O
      storage_conf: Fix indentions in storage_conf.c · 76359ee5
      Osier Yang 提交于
      Uses the 4 spaces for indention.
      76359ee5
    • O
      storage_conf: Fix the coding stype in storage_conf.c · c8a3cf89
      Osier Yang 提交于
      Changes:
        * Remove the useless space in "for" statement (e.g.
          for (i = 0 ; i < something ; i++)
      
        * Change the function's style to:
          void
          foo(bar)
          {
              printf("foo is not bar\n");
          }
      
        * Don't lose "{}" for "if...else" branches if one of the branch
          has more than one line block. Example of the old ones:
          if (a) {
              printf("a is not funny");
          } else
              printf("a is funny");
      
        * Remove the 1 space before "goto" label.
      
        * Remove the useless blank line(s)
      
        * Add blank line if it can make the code more clear to eyes.
      c8a3cf89
  3. 17 5月, 2013 4 次提交
    • O
      qemu: Change values of disk discard · 9049d6a8
      Osier Yang 提交于
      QEMU might support more values for "-drive discard", so using Bi-state
      values (on/off) for it doesn't make sense.
      
      "on" maps to "unmap", "off" maps to "ignore":
      
      <...>
      @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and
      controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
      requests are ignored or passed to the filesystem.  Some machine types
      may not support discard requests.
      </...>
      9049d6a8
    • J
      Add support for locking domain's memory pages · 55586638
      Jiri Denemark 提交于
      The following XML configuration can be used to request all domain's
      memory pages to be kept locked in host's memory (i.e., domain's memory
      pages will not be swapped out):
      
            <memoryBacking>
              <locked/>
            </memoryBacking>
      55586638
    • O
      conf: Introduce sgio for hostdev · 67653160
      Osier Yang 提交于
      "sgio" is only valid for scsi host device.
      67653160
    • O
      Rename virDomainDiskSGIO to virDomainDeviceSGIO · ead43915
      Osier Yang 提交于
      SCSI host device will also support "sgio", and perhaps we could
      use "sgio" in other places too in future, renaming the enum to
      reuse.
      ead43915
  4. 16 5月, 2013 5 次提交
    • O
      conf: Introduce <shareable> for hostdev · f2c1d9a8
      Osier Yang 提交于
      Unlike disk device, the scsi-generic always writethrough the data,
      so no need to introduce a "cache" tag, and set "cache=off".
      f2c1d9a8
    • O
      conf: Fix the bug of disk->copy_on_read formating · e3b40bec
      Osier Yang 提交于
      The reason for it's not exposed for such long time is that the
      enums for VirtioEventIdx and CopyOnReadType have same enum values
      and Correspondingstrings. This fixes the bug and adds test.
      e3b40bec
    • O
      conf: Improve the coding style · a3f600f9
      Osier Yang 提交于
      Add spaces around "<<", and remove the useless blank-line.
      a3f600f9
    • J
      Adjust improperly formatted <sysinfo> uuid · a2c37618
      John Ferlan 提交于
      If the <sysinfo> system table 'uuid' field is improperly formatted,
      then qemu will fail to start the guest with the error:
      
      virsh start dom
      error: Failed to start domain dom
      error: internal error process exited while connecting to monitor: Invalid SMBIOS UUID string
      
      This was because the parsing rules were lax with respect to allowing extraneous
      spaces and dashes in the provided UUID.  As long as there were 32 hexavalues
      that matched the UUID for the domain the string was accepted. However startup
      failed because the string format wasn't correct. This patch will adjust the
      string format so that when it's presented to the driver it's in the expected
      format.
      
      Added a test for uuid comparison within sysinfo.
      a2c37618
    • J
      Validate the bios_date format for <sysinfo> · 21540f5e
      John Ferlan 提交于
      Add incorrectly formatted bios_date validation test
      21540f5e
  5. 15 5月, 2013 3 次提交
    • O
      qemu: Support discard for disk · a7c4202c
      Osier Yang 提交于
      QEMU introduced "discard" option for drive since commit a9384aff53,
      
      <...>
      @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and
      controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
      requests are ignored or passed to the filesystem.  Some machine types
      may not support discard requests.
      </...>
      
      This patch exposes the support in libvirt.
      
      QEMU supported "discard" for "-drive" since v1.5.0-rc0:
      
      % git tag --contains a9384aff53
      contains
      v1.5.0-rc0
      v1.5.0-rc1
      
      So this only detects the capability bit using virQEMUCapsProbeQMPCommandLine.
      a7c4202c
    • M
      Add VNC WebSocket support · f1ad8d20
      Martin Kletzander 提交于
      Adding support for new attribute 'websocket' in the '<graphics>'
      element, the attribute value is the port to listen on with '-1'
      meaning auto-allocation, '0' meaning no websockets.
      f1ad8d20
    • O
      qemu: New XML to disable memory merge at guest startup · 77b54b96
      Osier Yang 提交于
      QEMU introduced command line "-mem-merge=on|off" (defaults to on) to
      enable/disable the memory merge (KSM) at guest startup. This exposes
      it by new XML:
        <memoryBacking>
          <nosharepages/>
        </memoryBacking>
      
      The XML tag is same with what we used internally for old RHEL.
      77b54b96
  6. 14 5月, 2013 1 次提交
    • G
      Support for static routes on a virtual bridge · ccff335f
      Gene Czarcinski 提交于
      network: static route support for <network>
      
      This patch adds the <route> subelement of <network> to define a static
      route.  the address and prefix (or netmask) attribute identify the
      destination network, and the gateway attribute specifies the next hop
      address (which must be directly reachable from the containing
      <network>) which is to receive the packets destined for
      "address/(prefix|netmask)".
      
      These attributes are translated into an "ip route add" command that is
      executed when the network is started. The command used is of the
      following form:
      
        ip route add <address>/<prefix> via <gateway> \
                     dev <virbr-bridge> proto static metric <metric>
      
      Tests are done to validate that the input data are correct.  For
      example, for a static route ip definition, the address must be a
      network address and not a host address.  Additional checks are added
      to ensure that the specified gateway is directly reachable via this
      network (i.e. that the gateway IP address is in the same subnet as one
      of the IP's defined for the network).
      
      prefix='0' is supported for both family='ipv4' address='0.0.0.0'
      netmask='0.0.0.0' or prefix='0', and for family='ipv6' address='::',
      prefix=0', although care should be taken to not override a desired
      system default route.
      
      Anytime an attempt is made to define a static route which *exactly*
      duplicates an existing static route (for example, address=::,
      prefix=0, metric=1), the following error message will be sent to
      syslog:
      
          RTNETLINK answers: File exists
      
      This can be overridden by decreasing the metric value for the route
      that should be preferred, or increasing the metric for the route that
      shouldn't be preferred (and is thus in place only in anticipation that
      the preferred route may be removed in the future).  Caution should be
      used when manipulating route metrics, especially for a default route.
      
      Note: The use of the command-line interface should be replaced by
      direct use of libnl so that error conditions can be handled better.  But,
      that is being left as an exercise for another day.
      Signed-off-by: NGene Czarcinski <gene@czarc.net>
      Signed-off-by: NLaine Stump <laine@laine.org>
      ccff335f
  7. 13 5月, 2013 4 次提交
    • D
      Add 'nbd' as a valid filesystem driver type · 13579d45
      Daniel P. Berrange 提交于
      The <filesystem> element can now accept a <driver type='nbd'/>
      as an alternative to 'loop'. The benefit of NBD is support
      for non-raw disk image formats.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      13579d45
    • D
      Add support for storage format in FS <driver> · ada14b86
      Daniel P. Berrange 提交于
      Extend the <driver> element in filesystem devices to
      allow a storage format to be set. The new attribute
      uses 'format' to reflect the storage format. This is
      different from the <driver> element in disk devices
      which use 'type' to reflect the storage format. This
      is because the 'type' attribute on filesystem devices
      is already used for the driver backend, for which the
      disk devices use the 'name' attribute. Arggggh.
      
      Anyway for disks we have
      
         <driver name="qemu" type="raw"/>
      
      And for filesystems this change means we now have
      
         <driver type="loop" format="raw"/>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ada14b86
    • O
      Introduce <readonly> for hostdev · f4bb7b48
      Osier Yang 提交于
      Since it's generic enough to be used by other types in future, I
      put it in <hostdev> as sub-element, though now it's only used by
      scsi host device.
      f4bb7b48
    • 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
  8. 10 5月, 2013 1 次提交
  9. 09 5月, 2013 3 次提交
  10. 08 5月, 2013 1 次提交
  11. 07 5月, 2013 1 次提交
  12. 02 5月, 2013 2 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
    • M
      qemu: Generate agent socket path if missing · 297c99a5
      Michal Privoznik 提交于
      It's not desired to force users imagine path for a socket they
      are not even supposed to connect to. On the other hand, we
      already have a release where the qemu agent socket path is
      exposed to XML, so we cannot silently drop it from there.
      The new path is generated in form:
      
      $LOCALSTATEDIR/lib/libvirt/qemu/channel/target/$domain.$name
      
      for qemu system mode, and
      
      $XDG_CONFIG_HOME/qemu/lib/channel/target/$domain.$name
      
      for qemu session mode.
      297c99a5
  13. 27 4月, 2013 3 次提交
    • J
      conf: add missing error on OOM · d0f7fd99
      Ján Tomko 提交于
      I removed it in 5c3d5b22 by accident.
      d0f7fd99
    • L
      conf: remove extraneous _TYPE from driver backend enums · 19635f7d
      Laine Stump 提交于
      This isn't strictly speaking a bugfix, but I realized I'd gotten a bit
      too verbose when I chose the names for
      VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_*. This shortens them all a bit.
      19635f7d
    • L
      network: support <driver name='vfio'/> in network definitions · d64e114f
      Laine Stump 提交于
      I remembered to document this bit, but somehow forgot to implement it.
      
      This adds <driver name='kvm|vfio'/> as a subelement to the <forward>
      element of a network (this puts it parallel to the match between
      mode='hostdev' attribute in a network and type='hostdev' in an
      <interface>).
      
      Since it's already documented, only the parser, formatter, backend
      driver recognition (it just translates/moves the flag into the
      <interface> at the appropriate time), and a test case were needed.
      
      (I used a separate enum for the values both because the original is
      defined in domain_conf.h, which is unavailable from network_conf.h,
      and because in the future it's possible that we may want to support
      other non-hostdev oriented driver names in the network parser; this
      makes sure that one can be expanded without the other).
      d64e114f
  14. 26 4月, 2013 2 次提交
    • 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
    • L
      conf: put hostdev pci address in a struct · 9f80fc1b
      Laine Stump 提交于
      There will soon be other items related to pci hostdevs that need to be
      in the same part of the hostdevsubsys union as the pci address (which
      is currently a single member called "pci". This patch replaces the
      single member named pci with a struct named pci that contains a single
      member named "addr".
      9f80fc1b
  15. 25 4月, 2013 5 次提交
    • J
      conf: reject controllers with duplicate indexes · 2bbbf0be
      Ján Tomko 提交于
      Reject multiple controllers with the same index,
      except for USB controllers.
      Multi-function USB controllers can have the same index.
      2bbbf0be
    • M
      Fix usb master startport parsing · a553dbed
      Martin Kletzander 提交于
      When all usb controllers connected to the same bus have <master
      startport='x'/> specified, none of them have 'id=usb' assigned and
      thus qemu fails due to invalid masterport specification (we use 'usb'
      for that purpose).  Adding a check that at least one of the
      controllers is specified without <master startport='x'/> and in case
      this happens, error out due to invalid configuration.
      a553dbed
    • J
      qemu: auto-add pci-root controller for pc machine types · b33eb0dc
      Ján Tomko 提交于
      <controller type='pci' index='0' model='pci-root'/>
      is auto-added to pc* machine types.
      Without this controller PCI bus 0 is not available and
      no PCI addresses are assigned by default.
      
      Since older libvirt supported PCI bus 0 even without
      this controller, it is removed from the XML when migrating.
      b33eb0dc
    • J
      conf: add PCI controllers · df0ebf6b
      Ján Tomko 提交于
      Add new controller type 'pci' with models 'pci-root' and 'pci-bridge'.
      df0ebf6b
    • J
      qemu: call post-parse callbacks when parsing command line too · 024e9af3
      Ján Tomko 提交于
      Now we set the default disk driver name when parsing
      the qemu command line too, hence all the test changes.
      
      Assume format type is 'auto' when none is specified on
      qemu command line.
      024e9af3