1. 07 10月, 2015 3 次提交
    • P
      qemu: migration: Use migration flags in qemuMigrationIsAllowed · b6c44af0
      Peter Krempa 提交于
      Use the migration @flags for checking various migration aspects rather
      than picking them out as booleans. Document the new semantics in the
      function header.
      b6c44af0
    • P
      qemu: migration: Drop @def from qemuMigrationIsAllowed · f558c66f
      Peter Krempa 提交于
      Now that qemuMigrationIsAllowed is always called with @vm, we can drop
      the @def argument and simplify the control flow.
      
      Additionally the comment is invalid so drop it.
      f558c66f
    • P
      qemu: migration: Split source and destination migration checks · b866991f
      Peter Krempa 提交于
      Extract the hostdev check from qemuMigrationIsAllowed into a separate
      function since that is the only part that needs to be done in the v2
      migration protocol prepare phase on the destination. All other checks
      were added when the v3 protocol existed so they don't need to be
      extracted.
      
      This change will allow to drop the @def argument for
      qemuMigrationIsAllowed and further simplify the function.
      b866991f
  2. 06 10月, 2015 5 次提交
  3. 05 10月, 2015 3 次提交
  4. 02 10月, 2015 7 次提交
  5. 29 9月, 2015 1 次提交
  6. 26 9月, 2015 1 次提交
  7. 24 9月, 2015 9 次提交
  8. 23 9月, 2015 2 次提交
    • P
      qemu: Refresh memory size only on fresh starts · d7a0386e
      Peter Krempa 提交于
      Qemu unfortunately doesn't update internal state right after migration
      and so the actual balloon size as returned by 'query-balloon' are
      invalid for a while after the CPUs are started after migration. If we'd
      refresh our internal state at this point we would report invalid current
      memory size until the next balloon event would arrive.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1242940
      d7a0386e
    • P
      qemu: Align memory module sizes to 2MiB · 624ec1c2
      Peter Krempa 提交于
      My original implementation was based on a qemu version that still did
      not have all the checks in place. Using sizes that would align to odd
      megabyte increments will produce the following error:
      
      qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: backend memory size must be multiple of 0x200000
      qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: Device 'pc-dimm' could not be initialized
      
      Introduce an alignment retrieval function for memory devices and use it
      to align the devices separately and modify a test case to verify it.
      624ec1c2
  9. 22 9月, 2015 9 次提交
    • J
      Revert "qemu: Fix integer/boolean logic in qemuSetUnprivSGIO" · ec6754db
      John Ferlan 提交于
      This reverts commit 69b850fe.
      
      This change broke the ability to "clear" or reset unfiltered back
      to filtered.
      ec6754db
    • P
      qemu: ppc64: Align memory sizes to 256MiB blocks · bd874b6c
      Peter Krempa 提交于
      For some machine types ppc64 machines now require that memory sizes are
      aligned to 256MiB increments (due to the dynamically reconfigurable
      memory). As now we treat existing configs reasonably in regards to
      migration, we can round all the sizes unconditionally. The only drawback
      will be that the memory size of a VM can potentially increase by
      (256MiB - 1byte) * number_of_NUMA_nodes.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1249006
      bd874b6c
    • P
      qemu: command: Align memory sizes only on fresh starts · c7d7ba85
      Peter Krempa 提交于
      When we are starting a qemu process for an incomming migration or
      snapshot reloading we should not modify the memory sizes in the domain
      since we could potentially change the guest ABI that was tediously
      checked before. Additionally the function now updates the initial memory
      size according to the NUMA node size, which should not happen if we are
      restoring state.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1252685
      c7d7ba85
    • P
      conf: Don't always recalculate initial memory size from NUMA size totals · 0fed5a7b
      Peter Krempa 提交于
      When implementing memory hotplug I've opted to recalculate the initial
      memory size (contents of the <memory> element) as a sum of the sizes of
      NUMA nodes when NUMA was enabled. This was based on an assumption that
      qemu did not allow starting when the NUMA node size total didn't equal
      to the initial memory size. Unfortunately the check was introduced to
      qemu just lately.
      
      This patch uses the new XML parser flag to decide whether it's safe to
      update the memory size total from the NUMA cell sizes or not.
      
      As an additional improvement we now report an error in case when the
      size of hotplug memory would exceed the total memory size.
      
      The rest of the changes assures that the function is called with correct
      flags.
      0fed5a7b
    • P
      conf: Pre-calculate initial memory size instead of always calculating it · 403e8606
      Peter Krempa 提交于
      Add 'initial_memory' member to struct virDomainMemtune so that the
      memory size can be pre-calculated once instead of inferring it always
      again and again.
      
      Separating of the fields will also allow finer granularity of decisions
      in later patches where it will allow to keep the old initial memory
      value in cases where we are handling incomming migration from older
      versions that did not always update the size from NUMA as the code did
      previously.
      
      The change also requires modification of the qemu memory alignment
      function since at the point where we are modifying the size of NUMA
      nodes the total size needs to be recalculated too.
      
      The refactoring done in this patch also fixes a crash in the hyperv
      driver that did not properly initialize def->numa and thus
      virDomainNumaGetMemorySize(def->numa) crashed.
      
      In summary this patch should have no functional impact at this point.
      403e8606
    • P
      conf: Rename max_balloon to total_memory · 8059a990
      Peter Krempa 提交于
      The name of the variable was misleading. Rename it and it's setting
      accessor before other fixes.
      8059a990
    • P
      conf: Add XML parser flag that will allow us to do incompatible updates · 59173c3d
      Peter Krempa 提交于
      Add a new parser flag that will mark code paths that parse XML files
      wich will not be used with existing VM state so that post parse
      callbacks can possibly do ABI incompatible changes if needed.
      59173c3d
    • P
      qemu: Make memory alignment helper more universal · 3fb08198
      Peter Krempa 提交于
      Extract the size determination into a separate function and reuse it
      across the memory device alignment functions. Since later we will need
      to decide the alignment size according to architecture let's pass def to
      the functions.
      3fb08198
    • P
      conf: Add helper to determine whether memory hotplug is enabled for a vm · 1891cad5
      Peter Krempa 提交于
      Add a simple helper so that the code doesn't have to rewrite the same
      condition multiple times.
      1891cad5