1. 30 11月, 2015 2 次提交
    • E
      livirt: Move URI alias matching to util · fb90fcc0
      Erik Skultety 提交于
      As we need to provide support for URI aliases in libvirt-admin as well, URI
      alias matching needs to be internally visible. Since
      virConnectOpenResolveURIAlias does have a compatible signature, it could be
      easily reused by libvirt-admin. This patch moves URI alias matching to util,
      renaming it accordingly.
      fb90fcc0
    • E
      libvirt: Move config getters to util · c4bdff19
      Erik Skultety 提交于
      virConnectGetConfig and virConnectGetConfigPath were static libvirt
      methods, merely because there hasn't been any need for having them
      internally exported yet. Since libvirt-admin also needs to reference
      its config file, 'xGetConfig' should be exported.
      Besides moving, this patch also renames the methods accordingly,
      as they are libvirt config specific.
      c4bdff19
  2. 04 11月, 2015 1 次提交
  3. 17 6月, 2015 3 次提交
  4. 03 6月, 2015 1 次提交
  5. 27 1月, 2015 2 次提交
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
    • D
      don't disable state driver when libvirtd is not built · 220c01aa
      Daniel P. Berrange 提交于
      A bunch of code is wrapped in #if WITH_LIBVIRTD in order to
      enable the virStateDriver to be disabled when libvirtd is not
      built. Disabling this code doesn't have any real functional
      benefit beyond removing 1 pointer from the virConnectPtr struct,
      while having a cost of many more conditionals.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      220c01aa
  6. 02 12月, 2014 1 次提交
    • M
      libvirt.c: Move virDomainGetFSInfo to libvirt-domain.c · 2cc8c44e
      Michal Privoznik 提交于
      Since our big split of libvirt.c there are only a few functions
      living there. The majority was moved to corresponding subfile,
      e.g. domain functions were moved to libvirt-domain.c. However,
      the patches for virDomainGetFSInfo() and virDomainFSInfoFree()
      introduction were posted prior the big split and merged after.
      This resulted in two domain functions landing in wrong file.
      Move them to the correct one.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2cc8c44e
  7. 24 11月, 2014 1 次提交
  8. 29 10月, 2014 1 次提交
    • E
      maint: avoid static zero init in core files · 39871fce
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/libvirt.c: Fix initialization.
      * src/util/viralloc.c: Likewise.
      * src/util/virdbus.c: Likewise.
      * src/util/virevent.c: Likewise.
      * src/util/virfile.c (safezero): Likewise.
      * src/util/virlog.c: Likewise.
      * src/util/virnetlink.c: Likewise.
      * src/util/virthread.h (VIR_ONCE_GLOBAL_INIT): Likewise.
      * src/util/virprocess.c (virProcessGetStartTime): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      39871fce
  9. 24 10月, 2014 11 次提交
  10. 23 10月, 2014 1 次提交
  11. 15 10月, 2014 1 次提交
  12. 01 10月, 2014 1 次提交
  13. 25 9月, 2014 2 次提交
    • M
      virNodeAllocPages: Disallow RO connection · 92b0577d
      Michal Privoznik 提交于
      Due to a missing check the API can be successfully called even if
      the connection is ReadOnly. Fortunately, the API hasn't been
      released yet, so there's no need for a CVE.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      92b0577d
    • M
      Introduce virNodeAllocPages · fa5c5580
      Michal Privoznik 提交于
      A long time ago in a galaxy far, far away it has been decided
      that libvirt will manage not only domains but host as well. And
      with my latest work on qemu driver supporting huge pages, we miss
      the cherry on top: an API to allocate huge pages on the run.
      Currently users are forced to log into the host and adjust the
      huge pages pool themselves.  However, with this API the problem
      is gone - they can both size up and size down the pool.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      fa5c5580
  14. 23 9月, 2014 1 次提交
  15. 18 9月, 2014 9 次提交
  16. 12 9月, 2014 1 次提交
    • E
      blockjob: allow finer bandwidth tuning for set speed · 0a6a6b1a
      Eric Blake 提交于
      We stupidly modeled block job bandwidth after migration
      bandwidth, which in turn was an 'unsigned long' and therefore
      subject to 32-bit vs. 64-bit interpretations.  To work around
      the fact that 10-gigabit interfaces are possible but don't fit
      within 32 bits, the original interface took the number scaled
      as MiB/sec.  But this scaling is rather coarse, and it might
      be nice to tune bandwidth finer than in megabyte chunks.
      
      Several of the block job calls that can set speed are fed
      through a common interface, so it was easier to adjust them all
      at once.  Note that there is intentionally no flag for the new
      virDomainBlockCopy; there, since the API already uses a 64-bit
      type always, instead of a possible 32-bit type, and is brand
      new, it was easier to just avoid scaling issues.  As with the
      previous patch that adjusted the query side (commit db33cc24),
      omitting the new flag preserves old behavior, and the
      documentation now mentions limits of what happens when a 32-bit
      machine is on either client or server side.
      
      * include/libvirt/libvirt.h.in (virDomainBlockJobSetSpeedFlags)
      (virDomainBlockPullFlags)
      (VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES)
      (VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES): New enums.
      * src/libvirt.c (virDomainBlockJobSetSpeed, virDomainBlockPull)
      (virDomainBlockRebase, virDomainBlockCommit): Document them.
      * src/qemu/qemu_driver.c (qemuDomainBlockJobSetSpeed)
      (qemuDomainBlockPull, qemuDomainBlockRebase)
      (qemuDomainBlockCommit, qemuDomainBlockJobImpl): Support new flag.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0a6a6b1a
  17. 10 9月, 2014 1 次提交
    • J
      qemu: Recompute downtime and total time when migration completes · eaee338a
      Jiri Denemark 提交于
      Total time of a migration and total downtime transfered from a source to
      a destination host do not count with the transfer time to the
      destination host and with the time elapsed before guest CPUs are
      resumed. Thus, source libvirtd remembers when migration started and when
      guest CPUs were paused. Both timestamps are transferred to destination
      libvirtd which uses them to compute total migration time and total
      downtime. Obviously, this requires the time to be synchronized between
      the two hosts. The reported times are useless otherwise but they would
      be equally useless if we didn't do this recomputation so don't lose
      anything by doing it.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      eaee338a