1. 18 6月, 2015 2 次提交
  2. 15 6月, 2015 1 次提交
    • J
      storage: Need to set secrettype for direct iscsi disk volume · 1feaccf0
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1200206
      
      Commit id '1b4eaa61' added the ability to have a mode='direct' for
      an iscsi disk volume.  It relied on virStorageTranslateDiskSourcePool
      in order to copy any disk source pool authentication information to
      the direct disk volume, but it neglected to also copy the 'secrettype'
      field which ends up being used in the domain volume formatting code.
      Adding a secrettype for this case will allow for proper formatting later
      and allow disk snapshotting to work properly
      
      Additionally libvirtd restart processing would fail to find the domain
      since the translation processing code is run after domain xml processing,
      so handle the the case where the authdef could have an empty secrettype
      field when processing the auth and additionally ignore performing the
      actual and expected auth secret type checks for a DISK_VOLUME since that
      data will be reassembled later during translation processing of the
      running domain.
      1feaccf0
  3. 12 6月, 2015 3 次提交
    • M
      virsysinfo: s/system/sysdef/ · c1dff918
      Michal Privoznik 提交于
      A variable can't be named system, obviously. Well, it can if the
      compiler is new enough to distinguish a variable named system and a
      function call system(). And some older systems, don't have wise
      compiler.
      
        CC     util/libvirt_util_la-virsysinfo.lo
      cc1: warnings being treated as errors
      ../../src/util/virsysinfo.c: In function 'virSysinfoParseSystem':
      ../../src/util/virsysinfo.c:649: error: declaration of 'system' shadows a global declaration [-Wshadow]
      /usr/include/stdlib.h:717: error: shadowed declaration is here [-Wshadow]
      make[3]: *** [util/libvirt_util_la-virsysinfo.lo] Error 1
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c1dff918
    • M
      virSysinfoDef: Exempt SYSTEM variables · 0b92974c
      Michal Privoznik 提交于
      Move all the system_* fields into a separate struct. Not only this
      simplifies the code a bit it also helps us to identify whether BIOS
      info is present. We don't have to check all the four variables for
      being not-NULL, but we can just check the pointer to the struct.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0b92974c
    • M
      virSysinfoDef: Exempt BIOS variables · 3f9cae18
      Michal Privoznik 提交于
      Move all the bios_* fields into a separate struct. Not only this
      simplifies the code a bit it also helps us to identify whether BIOS
      info is present. We don't have to check all the four variables for
      being not-NULL, but we can just check the pointer to the struct.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3f9cae18
  4. 11 6月, 2015 1 次提交
  5. 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
  6. 03 6月, 2015 3 次提交
  7. 27 5月, 2015 1 次提交
  8. 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
  9. 24 5月, 2015 1 次提交
  10. 21 5月, 2015 3 次提交
  11. 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
  12. 18 5月, 2015 1 次提交
  13. 16 5月, 2015 1 次提交
  14. 15 5月, 2015 3 次提交
  15. 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
  16. 12 5月, 2015 1 次提交
  17. 11 5月, 2015 8 次提交
  18. 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
  19. 04 5月, 2015 1 次提交