1. 07 5月, 2013 1 次提交
  2. 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
  3. 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
  4. 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
  5. 25 4月, 2013 7 次提交
    • 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
    • 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
  6. 24 4月, 2013 3 次提交
  7. 23 4月, 2013 2 次提交
    • G
      update input ip processing · 1e5306c7
      Gene Czarcinski 提交于
      1. Handle invalid ULong prefix specified.
      When parsing for @prefix as a ULong, a -2 can be returned
      if the specification is not a valid ULong.
      
      2.  Error out if address= is not specified.
      
      3.  Merge netmask process/tests under family tests.
      
      4. Max sure that prefix does not exceed maximum.
      .
      Signed-off-by: NGene Czarcinski <gene@czarc.net>
      1e5306c7
    • G
      create virSocketAddrGetIpPrefix utility function · bd7c7c1b
      Gene Czarcinski 提交于
      Create the utility function virSocketAddrGetIpPrefix() to
      determine the prefix for this network.  The code in this
      function was adapted from virNetworkIpDefPrefix().
      
      Update virNetworkIpDefPrefix() in src/conf/network_conf.c
      to use the new utility function.
      Signed-off-by: NGene Czarcinski <gene@czarc.net>
      bd7c7c1b
  8. 20 4月, 2013 3 次提交
  9. 19 4月, 2013 2 次提交
    • P
      conf: Reword error message to be more universal · bcefb507
      Peter Krempa 提交于
      The error message reported when attempting to change/get persistent
      configuration of a transient domain suggests that changes are being
      made. Reword it to suit getter APIs too.
      
      Before:
      $ virsh vcpucount transient-domain --config
      error: Requested operation is not valid: cannot change persistent config of a transient domain
      
      After:
      $ virsh vcpucount transient-domain --config
      error: Requested operation is not valid: transient domains do not have any persistent config
      bcefb507
    • P
      network: bridge_driver: don't lose transient networks on daemon restart · 446dd66b
      Peter Krempa 提交于
      Until now tranisent networks weren't really useful as libvirtd wasn't
      able to remember them across restarts. This patch adds support for
      loading status files of transient networks (that already were generated)
      so that the status isn't lost.
      
      This patch chops up virNetworkObjUpdateParseFile and turns it into
      virNetworkLoadState and a few friends that will help us to load status
      XMLs and refactors the functions that are loading the configs to use
      them.
      446dd66b
  10. 18 4月, 2013 1 次提交
  11. 17 4月, 2013 1 次提交
    • O
      cleanup: Remove the duplicate header · bc95be5d
      Osier Yang 提交于
      Detected by a simple Shell script:
      
      for i in $(git ls-files -- '*.[ch]'); do
          awk 'BEGIN {
              fail=0
          }
          /# *include.*\.h/{
              match($0, /["<][^">]*[">]/)
              arr[substr($0, RSTART+1, RLENGTH-2)]++
          }
          END {
              for (key in arr) {
                  if (arr[key] > 1) {
                      fail=1
                      printf("%d %s\n", arr[key], key)
                  }
              }
              if (fail == 1)
                  exit 1
          }' $i
      
          if test $? != 0; then
              echo "Duplicate header(s) in $i"
          fi
      done;
      
      A later patch will add the syntax-check to avoid duplicate
      headers.
      bc95be5d
  12. 16 4月, 2013 1 次提交
  13. 13 4月, 2013 6 次提交
  14. 12 4月, 2013 1 次提交
    • P
      conf: Allow for non-contiguous device boot orders · 039a3283
      Peter Krempa 提交于
      This patch adds the ability to configure non-contiguous boot orders on boot
      devices. This allows unplugging devices that have boot order specified without
      breaking migration.
      
      The new code now uses a slightly less memory efficient approach to store the
      boot order fields in a hashtable instead of a bitmap.
      039a3283
  15. 11 4月, 2013 5 次提交