1. 11 1月, 2017 2 次提交
  2. 02 12月, 2016 1 次提交
  3. 25 11月, 2016 1 次提交
    • M
      virstring: Unify string list function names · c2a5a4e7
      Michal Privoznik 提交于
      We have couple of functions that operate over NULL terminated
      lits of strings. However, our naming sucks:
      
      virStringJoin
      virStringFreeList
      virStringFreeListCount
      virStringArrayHasString
      virStringGetFirstWithPrefix
      
      We can do better:
      
      virStringListJoin
      virStringListFree
      virStringListFreeCount
      virStringListHasString
      virStringListGetFirstWithPrefix
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c2a5a4e7
  4. 24 11月, 2016 2 次提交
    • D
      vbox: get rid of g_pVBoxGlobalData · 63586535
      Dawid Zamirski 提交于
      now that we have a new global vboxDriver object, remove the old
      vboxGlobalData struct and all references to it.
      63586535
    • D
      vbox: change how vbox API is initialized. · 04518c36
      Dawid Zamirski 提交于
      * add vboxDriver object to serve as a singleton global object that
        holds references to IVirtualBox and ISession to be shared among
        multiple connections. The vbox_driver is instantiated only once in
        the first call vboxGetDriverConnection function that is guarded by
        a mutex.
      
      * call vbox API initialize only when the first connection is
        established, and likewise uninitialize when last connection
        disconnects. The prevents each subsequent connection from overwriting
        IVirtualBox/ISession instances of any other active connection that
        led to libvirtd segfaults. The virConnectOpen and virConnectClose
        implementations are guarded by mutex on the global vbox_driver_lock
        where the global vbox_driver object counts connectios and decides
        when it's safe to call vbox's init/uninit routines.
      
      * add IVirutalBoxClient to vboxDriver and use it to in tandem with newer
        pfnClientInitialize/pfnClientUninitalize APIs for vbox versions that
        support it, to avoid usage of the old pfnComInitialize/Uninitialize.
      04518c36
  5. 08 11月, 2016 3 次提交
  6. 22 10月, 2016 1 次提交
  7. 12 10月, 2016 1 次提交
  8. 27 9月, 2016 1 次提交
  9. 26 9月, 2016 3 次提交
  10. 19 7月, 2016 1 次提交
  11. 11 7月, 2016 1 次提交
    • P
      conf: Add private data for virDomainVcpuDef · 5fe0b6b0
      Peter Krempa 提交于
      Allow to store driver specific data on a per-vcpu basis.
      
      Move of the virDomainDef*Vcpus* functions was necessary as
      virDomainXMLOptionPtr was declared below this block and I didn't want to
      split the function headers.
      5fe0b6b0
  12. 27 6月, 2016 2 次提交
    • L
      conf: use virNetDevIPInfo for guest-side <interface> config · fbc1843d
      Laine Stump 提交于
      All the same information was already there, just in slightly different
      places in the virDomainNetDef.
      fbc1843d
    • L
      global: consistently use IP rather than Ip in identifiers · 22a6873a
      Laine Stump 提交于
      I'm tired of mistyping this all the time, so let's do it the same all
      the time (similar to how we changed all "Pci" to "PCI" awhile back).
      
      (NB: I've left alone some things in the esx and vbox drivers because
      I'm unable to compile them and they weren't obviously *not* a part of
      some API. I also didn't change a couple of variables named,
      e.g. "somethingIptables", because they were derived from the name of
      the "iptables" command)
      22a6873a
  13. 24 6月, 2016 1 次提交
  14. 22 6月, 2016 1 次提交
  15. 15 6月, 2016 1 次提交
  16. 10 6月, 2016 3 次提交
  17. 08 6月, 2016 1 次提交
  18. 07 6月, 2016 2 次提交
  19. 20 5月, 2016 1 次提交
  20. 17 5月, 2016 1 次提交
  21. 02 5月, 2016 2 次提交
    • C
      conf: domain: reject name containing '/' · b1fc6a7b
      Cole Robinson 提交于
      Trying to define a domain name containing an embedded '/'
      will immediately fail when trying to write the XML to disk for
      our stateful drivers. This patch explicitly rejects names
      containing a '/', and provides an xmlopt feature for drivers
      to avoid this validation check, which is enabled in every
      non-stateful driver that already has xmlopt handling wired up.
      
      (Technically this could reject a previously accepted vmname like
       '/foo', however at least for the qemu driver that falls over
       later when starting qemu)
      
      https://bugzilla.redhat.com/show_bug.cgi?id=639923
      b1fc6a7b
    • J
      qemu: Introduce qemuDomainHostdevPrivatePtr · 27726d8c
      John Ferlan 提交于
      Modeled after the qemuDomainDiskPrivatePtr logic, create a privateData
      pointer in the _virDomainHostdevDef to allow storage of private data
      for a hypervisor in order to at least temporarily store auth/secrets
      data for usage during qemuBuildCommandLine.
      
      NB: Since the qemu_parse_command (qemuParseCommandLine) code is not
      expecting to restore the auth/secret data, there's no need to add
      code to handle this new structure there.
      
      Updated copyrights for modules touched. Some didn't have updates in a
      couple years even though changes have been made.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      27726d8c
  22. 24 4月, 2016 1 次提交
  23. 13 4月, 2016 3 次提交
  24. 09 3月, 2016 1 次提交
    • P
      conf: refactor checking for unsupported memory devices · 185d13b1
      Peter Krempa 提交于
      Introduce a helper to check supported device and domain config and move
      the memory hotplug checks to it.
      
      The advantage of this approach is that by default all new features are
      considered unsupported by all hypervisors unless specifically changed
      rather than the previous approach where every hypervisor would need to
      declare that a given feature is unsupported.
      185d13b1
  25. 08 3月, 2016 1 次提交
    • M
      _virtualboxCreateMachine: Avoid unbounded stack · 18f231e6
      Michal Privoznik 提交于
      If the stars are in the right position and you're building with
      VBox >= 4.2.0 it will happen that compiler thinks an array
      allocated on the stack may be unbounded:
      
      In file included from vbox/vbox_V4_2.c:13:0:
      vbox/vbox_tmpl.c: In function '_virtualboxCreateMachine':
      vbox/vbox_tmpl.c:2811:1: error: stack usage might be unbounded [-Werror=stack-usage=]
       _virtualboxCreateMachine(vboxGlobalData *data, virDomainDefPtr def, IMachine **machine, char *uuidstr ATTRIBUTE_UNUSED)
       ^
      
      Well, given how the variable is declared, I had some hard time
      seeing it is actually bounded. Surprisingly compiler does not
      complain because of -Wframe-larger-than. This is because
      variable length arrays do not count into that warning.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      18f231e6
  26. 03 3月, 2016 1 次提交
    • M
      Initialize couple of variables. · bde6e002
      Michal Privoznik 提交于
      While trying to build with -Os couple of compile errors showed
      up.
      
      conf/domain_conf.c: In function 'virDomainChrRemove':
      conf/domain_conf.c:13666:24: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virDomainChrDefPtr ret, **arrPtr = NULL;
                              ^
      Compiler fails to see that @ret is used only if set in the loop,
      but whatever, there's no harm in initializing the variable.
      
      In vboxAttachDrivesNew and _vboxAttachDrivesOld compiler thinks
      that @rc may be used uninitialized. Well, not directly, but maybe
      after some optimization. Yet again, no harm in initializing a
      variable.
      
      In file included from ./util/virthread.h:26:0,
                       from ./datatypes.h:28,
                       from vbox/vbox_tmpl.c:43,
                       from vbox/vbox_V3_1.c:37:
      vbox/vbox_tmpl.c: In function '_vboxAttachDrivesOld':
      ./util/virerror.h:181:5: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virReportErrorHelper(VIR_FROM_THIS, code, __FILE__,              \
           ^
      In file included from vbox/vbox_V3_1.c:37:0:
      vbox/vbox_tmpl.c:1041:14: note: 'rc' was declared here
           nsresult rc;
                    ^
      Yet again, one uninitialized variable:
      
      qemu/qemu_driver.c: In function 'qemuDomainBlockCommit':
      qemu/qemu_driver.c:17194:9: error: 'baseSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               qemuDomainPrepareDiskChainElement(driver, vm, baseSource,
               ^
      
      And another one:
      
      storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2':
      storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                             thisSource->devices[j].path))
                                       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bde6e002
  27. 23 2月, 2016 1 次提交
    • M
      vbox: Avoid signed and unsigned comparison · a0e5faaf
      Michal Privoznik 提交于
      After 457ff97f there are two defects in our code. In both of
      them we use a signed variable to hold up a number of snapshots
      that domain has. We use a helper function to count the number.
      However, the helper function may fail in which case it returns
      a negative one and control jumps to cleanup label where an
      unsigned variable is used to iterate over array of snapshots. The
      loop condition thus compare signed and unsigned variables which
      in this specific case ends up badly for us.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a0e5faaf