1. 16 3月, 2016 1 次提交
  2. 11 3月, 2016 2 次提交
    • J
      qemu: Introduce qemuBuildDiskDriveCommandLine · 0ea0f6c4
      John Ferlan 提交于
      Add new function to manage adding the disk -drive options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also since using const virDomainDef in new function, that means other
      functions called needed to change their usage.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      0ea0f6c4
    • J
      qemu: Introduce qemuBuildControllerDevCommandLine · 4908772e
      John Ferlan 提交于
      Add new function to manage adding the controller -device options to the
      command line removing that task from the mainline qemuBuildCommandLine.
      
      Also adjust to using const virDomainDef instead of virDomainDefPtr.
      This causes collateral damage in order to modify called APIs to use
      the const virDomainDef instead as well.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      4908772e
  3. 10 3月, 2016 2 次提交
  4. 09 3月, 2016 5 次提交
    • P
      conf: extract ignoring of inactive vcpu pinning information · acf521e1
      Peter Krempa 提交于
      Introduce VIR_DOMAIN_DEF_FEATURE_OFFLINE_VCPUPIN domain feature flag
      whcih will allow to skip ignoring of the pinning information for
      hypervisor drivers which will want to implement forward-pinning of
      vcpus.
      acf521e1
    • 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
    • P
      conf: introduce parser feature flags · 23eb3821
      Peter Krempa 提交于
      To avoid having to forbid new features added to domain XML in post parse
      callbacks for individual hypervisor drivers the feature flag mechanism
      will allow to add a central check that will be disabled for the drivers
      that will add support.
      
      As a first example flag, the 'hasWideSCSIBus' is converted to the new
      bitmap.
      23eb3821
    • P
      qemu: Report pinning for all vCPUs in qemuDomainGetVcpuPinInfo · 0fe41f1a
      Peter Krempa 提交于
      The API documentation states that the function is returning pinning for
      all vCPUs, so we can actually do so if the user passes a large enough
      array.
      0fe41f1a
    • P
      conf: Extract code filling data for virDomainGetVcpuPinInfo · e498e904
      Peter Krempa 提交于
      The implementation of the inner guts of the function is similar for all
      drivers, so we can add a helper and not have to reimplement it three
      times.
      e498e904
  5. 08 3月, 2016 2 次提交
    • J
      Introduce job completed event · f2893001
      Jiri Denemark 提交于
      The VIR_DOMAIN_EVENT_ID_JOB_COMPLETED event will be triggered once a job
      (such as migration) finishes and it will contain statistics for the job
      as one would get by calling virDomainGetJobStats. Thanks to this event
      it is now possible to get statistics of a completed migration of a
      transient domain on the source host.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      f2893001
    • Y
      Fix minor typos · 47b70b87
      Yuri Chornoivan 提交于
      47b70b87
  6. 03 3月, 2016 2 次提交
    • 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
    • M
      Drop inline keyword from some functions. · be8b536a
      Michal Privoznik 提交于
      While trying to build with -Os I've encountered some build
      failures.
      
      util/vircommand.c: In function 'virCommandAddEnvFormat':
      util/vircommand.c:1257:1: error: inlining failed in call to 'virCommandAddEnv': call is unlikely and code size would grow [-Werror=inline]
       virCommandAddEnv(virCommandPtr cmd, char *env)
       ^
      util/vircommand.c:1308:5: error: called from here [-Werror=inline]
           virCommandAddEnv(cmd, env);
           ^
      This function is big enough for the compiler to be not inlined.
      This is the error message I'm seeing:
      
      Then virDomainNumatuneNodeSpecified is exported and called from
      other places. It shouldn't be inlined then.
      
      In file included from network/bridge_driver_platform.h:30:0,
                       from network/bridge_driver_platform.c:26:
      network/bridge_driver_linux.c: In function 'networkRemoveRoutingFirewallRules':
      ./conf/network_conf.h:350:1: error: inlining failed in call to 'virNetworkDefForwardIf.constprop': call is unlikely and code size would grow [-Werror=inline]
       virNetworkDefForwardIf(const virNetworkDef *def, size_t n)
       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      be8b536a
  7. 01 3月, 2016 6 次提交
  8. 26 2月, 2016 2 次提交
    • J
      storage: Fix error path in virStoragePoolObjLoad · c53e4ae0
      John Ferlan 提交于
      While reviewing how storage driver used ObjListPtr's for reference
      in some recent secret driver patches to use the same mechanism, I came
      across an instance where the wrong API was called for error paths after
      successfully allocating the storage pool pointer and inserting into
      the driver pool list.
      
      The path is after virStoragePoolObjAssignDef succeeds - the 'def' passed
      in is assigned to pool->def (or newDef) so it shouldn't be the only thing
      deleted. The pool is now part of driver->pools.objs, so it would need to
      be removed (as happens in the storagePoolCreateXML error paths).
      
      Rather than calling virStoragePoolDefFree to free the def which is now
      assigned to the pool, call virStoragePoolObjRemove to ensure the pool
      element is removed from the driver list and that anything stored in pool
      is properly handled by virStoragePoolObjFree including the call to
      virStoragePoolDefFree for the pool->{def|newDef} element.
      c53e4ae0
    • J
      Revert "Error out on missing machine type in machine configs" · 5f265fa0
      Ján Tomko 提交于
      Revert commit 55e6d8cd.
      
      This fix for https://bugzilla.redhat.com/show_bug.cgi?id=1267256
      unconditionally required a machine type for all machine types
      even though qemu is the only emulator using them.
      
      Revert it to fix persistent configs for drivers with no machine type:
      https://www.redhat.com/archives/libvir-list/2016-February/msg01228.html
      5f265fa0
  9. 22 2月, 2016 2 次提交
  10. 19 2月, 2016 2 次提交
    • C
      domain: add implicit controllers from post parse · 4066c734
      Cole Robinson 提交于
      Seems like the natural fit, since we are already adding other XML bits
      in the PostParse routine.
      
      Previously AddImplicitControllers was only called at the end of XML
      parsing, meaning code that builds a DomainDef by hand had to manually
      call it. Now those PostParse callers get it for free.
      
      There's some test churn here; xen xm and sexpr test suite bits weren't
      calling this before, but now they are, so you'll see new IDE controllers.
      I don't think this will cause problems in practice, since the code already
      needs to handle these implicit controllers like in the case when a user
      defines their own XML.
      4066c734
    • J
      Check for active domain in virDomainObjWait · 5591ca50
      Jiri Denemark 提交于
      virDomainObjWait is designed to be called in a loop. Make sure we break
      the loop in case the domain dies to avoid waiting for an event which
      will never happen.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      5591ca50
  11. 18 2月, 2016 1 次提交
  12. 17 2月, 2016 2 次提交
    • E
      util: Add a return value to void hash iterators · cc48d3a1
      Erik Skultety 提交于
      Our existing virHashForEach method iterates through all items disregarding the
      fact, that some of the iterators might have actually failed. Errors are usually
      dispatched through an error element in opaque data which then causes the
      original caller of virHashForEach to return -1. In that case, virHashForEach
      could return as soon as one of the iterators fail. This patch changes the
      iterator return type and adjusts all of its instances accordingly, so the
      actual refactor of virHashForEach method can be dealt with later.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      cc48d3a1
    • A
      conf: Use a temporary int variable to store GIC version · cda1cc17
      Andrea Bolognani 提交于
      Since no value in the virGICVersion enumeration is negative, a clever
      enough compiler can report an error such as
      
        src/conf/domain_conf.c:15337:75: error: comparison of unsigned enum
        expression < 0 is always false [-Werror,-Wtautological-compare]
          if ((def->gic_version = virGICVersionTypeFromString(tmp)) < 0 ||
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      
      virGICVersionTypeFromString() can, however, return a negative value if
      the input string is not part of the enumeration, so we definitely need
      that check.
      
      Work around the problem by storing the return value in a temporary int
      variable.
      cda1cc17
  13. 16 2月, 2016 1 次提交
  14. 11 2月, 2016 4 次提交
  15. 10 2月, 2016 1 次提交
  16. 08 2月, 2016 5 次提交