1. 11 6月, 2015 1 次提交
  2. 04 6月, 2015 4 次提交
    • P
      conf: Fix mistakes in pointer usage in virDomainObjGetDefs · f9ab9eff
      Peter Krempa 提交于
      Coverity rightfully determined that in commit 3d021381
      I made a mistake in the first check if @persDef is not NULL is
      dereferencing it rather than checking.
      
      Additionally if the vm is online the code would set @liveDef twice
      rather than modifying @persDef. Fix both mistakes.
      f9ab9eff
    • P
      conf: Add new helpers to resolve virDomainModificationImpact to domain defs · 3d021381
      Peter Krempa 提交于
      virDomainLiveConfigHelperMethod that is used for this job now does
      modify the flags but still requires the callers to extract the correct
      definition objects.
      
      In addition coverity and other static analyzers are usually unhappy as
      they don't grasp the fact that @flags are upadted according to the
      correct def to be present.
      
      To work this issue around and simplify the calling chain let's add a new
      helper that will work only on drivers that always copy the persistent
      def to a transient at start of a vm. This will allow to drop a few
      arguments. The new function syntax will also fill two definition
      pointers rather than modifying the @flags parameter.
      3d021381
    • P
      conf: Store cpu count as unsigned int · fbbea798
      Peter Krempa 提交于
      While we probably won't see machines with more than 65536 cpus for a
      while lets store the cpu count as an integer so that we can avoid quite
      a lot of overflow checks in our code.
      fbbea798
    • J
      Always add 'console' matching the 'serial' device · 8728a78e
      Ján Tomko 提交于
      We have been formatting the first serial device also
      as a console device, but only if there were no other consoles.
      
      If there is a <serial> device present in the XML, but no serial
      <console>, or if there isn't any <console> at all but the domain
      definition hasn't gone through a parse->format->parse round-trip,
      the <console> device would not be formatted.
      
      Change the code to always add the stub device for the first
      serial device.
      
      Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1089914
      8728a78e
  3. 03 6月, 2015 3 次提交
  4. 27 5月, 2015 1 次提交
  5. 26 5月, 2015 1 次提交
    • J
      conf: Resolve Coverity NEGATIVE_RETURNS · c214f56a
      John Ferlan 提交于
      Commit id '73eda710' added virDomainKeyWrapDefParseXML which uses
      virXPathNodeSet, but does not handle a -1 return thus causing a possible
      loop condition exit problem later when the return value is used.
      
      Change the logic to return the value from virXPathNodeSet if <= 0
      c214f56a
  6. 24 5月, 2015 1 次提交
  7. 21 5月, 2015 3 次提交
  8. 20 5月, 2015 2 次提交
    • P
      conf: Catch memory size overflow earlier · bc89ebe5
      Peter Krempa 提交于
      virDomainParseMemory parses the size and then rounds up while converting
      it to kibibytes. Since the number is limit-checked before the rounding
      it's possible to use a number that would be correctly parsed the first
      time, but not the second time. For numbers not limited to 32 bit systems
      the magic is 9223372036854775807 bytes. That number then can't be parsed
      back in kibibytes.
      
      To solve the issue add a second overflow check for the few values that
      would cause the problem. Since virDomainParseMemory is used in config
      parsing, this avoids vanishing VMs.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1221504
      bc89ebe5
    • J
      Taint domains using cdrom-passthrough · 99a2d6af
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=976387
      
      For a domain configured using the host cdrom, we should taint the domain
      due to problems encountered when the host and guest try to control the tray.
      99a2d6af
  9. 18 5月, 2015 1 次提交
  10. 16 5月, 2015 1 次提交
  11. 15 5月, 2015 3 次提交
  12. 14 5月, 2015 2 次提交
    • J
      reject out of range memory in SetMemory APIs · 3511c122
      Ján Tomko 提交于
      The APIs take the memory value in KiB and we store it in KiB
      internally, but we cannot parse the whole ULONG_MAX range
      on 64-bit systems, because virDomainParseScaledValue
      needs to fit the value in bytes in an unsigned long long.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1176739
      3511c122
    • J
      conf: Expose iothreadids when delete non sequential iothreadids · 375c185c
      John Ferlan 提交于
      Since 'autofill'd iothreadid entries are not written during XML format
      processing, it is possible that if an iothreadid in the middle of an
      autofilled list would then change it's id on a subsequent restart.
      
      Thus during the iothreadid deletion, if we determine the delete is not
      the "last" thread, then clear the autofill bit for all iothreadid's
      following the one being deleted (either the first or one in the middle).
      This way, iothreadid's will be printed/saved.
      375c185c
  13. 12 5月, 2015 1 次提交
  14. 11 5月, 2015 8 次提交
  15. 05 5月, 2015 1 次提交
    • M
      Introduce GIC feature · 921c52b0
      Michal Privoznik 提交于
      Some platforms, like aarch64, don't have APIC but GIC. So there's
      no reason to have <apic/> feature turned on. However, we are
      still missing <gic/> feature. This commit introduces the feature
      to XML parser and formatter, adds documentation and updates RNG
      schema.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      921c52b0
  16. 04 5月, 2015 1 次提交
  17. 29 4月, 2015 2 次提交
  18. 28 4月, 2015 4 次提交
    • J
      conf: Resolve some Coverity errors · e505591e
      John Ferlan 提交于
      Resolve some Coverity errors with IOThread changes
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      e505591e
    • R
      conf: explicitly initialize 'cpumask' variable · fb9da19e
      Roman Bogorodskiy 提交于
      Build with clang fails with:
      
        CC       conf/libvirt_conf_la-domain_conf.lo
        conf/domain_conf.c:13377:9: error: variable 'cpumask' is used
        uninitialized whenever 'if' condition is true
        [-Werror,-Wsometimes-uninitialized]
            if (!(tmp = virXMLPropString(node, "cpuset"))) {
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      and many other similar errors regarding the 'cpuset' variable.
      
      Fix by explicitly initializing it with NULL.
      fb9da19e
    • J
      domain: Introduce virDomainIOThreadSchedDelId · c6e2dc80
      John Ferlan 提交于
      We're about to allow IOThreads to be deleted, but an iothreadid may be
      included in some domain thread sched, so add a new API to allow removing
      an iothread from some entry.
      
      Then during the writing of the threadsched data and an additional check
      to determine whether the bitmap is all clear before writing it out.
      c6e2dc80
    • J
      conf: Adjust the iothreadsched expectations · 4dec8a01
      John Ferlan 提交于
      With iothreadid's allowing any 'id' value for an iothread_id, the
      iothreadsched code needs a slight adjustment to allow for "any"
      unsigned int value in order to create the bitmap of ids that will
      have scheduler adjustments. Adjusted the doc description as well.
      4dec8a01