1. 22 9月, 2015 5 次提交
    • 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
      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
    • P
      Removed unneeded check · e2863e77
      Pavel Fedin 提交于
      Since test suite now correctly creates capabilities cache, the hack is not
      needed any more.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      e2863e77
  2. 21 9月, 2015 1 次提交
  3. 18 9月, 2015 4 次提交
  4. 10 9月, 2015 1 次提交
    • A
      qemu: Try several network devices when looking for a default · 75036c69
      Andrea Bolognani 提交于
      Up until now, the default has been rtl8139, but no check was in
      place to make sure that device was actually available.
      
      Now we try rtl8139, e1000 and virtio-net in turn, checking for
      availability before using any of them: this means we have a much
      better chance for the guest to be able to boot.
      75036c69
  5. 04 9月, 2015 1 次提交
    • J
      qemu: Introduce qemuDomainMachineIsS390CCW · d334c917
      John Ferlan 提交于
      Rather than have different usages of STR function in order to determine
      whether the domain is s390-ccw or s390-ccw-virtio, make a single API
      which will check the machine.os prefix. Then use the function.
      d334c917
  6. 24 8月, 2015 1 次提交
  7. 13 8月, 2015 3 次提交
    • M
      qemu: Keep numad hint after daemon restart · 8ce86722
      Martin Kletzander 提交于
      The numad hint stored in priv->autoNodeset is information that gets lost
      during daemon restart.  And because we would like to use that
      information in the future, we also need to save it in the status XML.
      For the sake of tests, we need to initialize nnumaCell_max to some
      value, so that the restoration doesn't fail in our test suite.  There is
      no need to fill in the actual numa cell data since the recalculating
      function virCapabilitiesGetCpusForNodemask() will not fail, it will just
      skip filling the data in the bitmap which we don't use in tests anyway.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      8ce86722
    • M
      conf: Pass private data to Parse function of XML options · 7c8028cd
      Martin Kletzander 提交于
      This needs a reorder of XML option definitions.  It might come in handy
      one day.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      7c8028cd
    • M
      qemu: Fix segfault when parsing private domain data · 92ddffdb
      Martin Kletzander 提交于
      When parsing private domain data, there are two paths that are flawed.
      They are both error paths, just from different parts of the function.
      One of them can call free() on an uninitialized pointer.  Initialization
      to NULL is enough here.  The other one is a bit trickier to explain, but
      as easy as the first one to fix.  We create capabilities, parse them and
      then assign them into the private data pointer inside the domain object.
      If, however, we get to fail from now on, the error path calls unrefs the
      capabilities and then, when the domain object is being cleaned,
      qemuDomainObjPrivateFree() tries to unref them as well.  That causes a
      segfault.  Settin the pointer to NULL upon successful addition to the
      private data is enough.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      92ddffdb
  8. 12 8月, 2015 1 次提交
    • L
      qemu: fix qemuDomainSupportsPCI() for ARM machines of "virt" machinetype · 9bd16ad3
      Laine Stump 提交于
      Commit e8d55172 updated the domain post-parse to automatically add
      pcie-root et al for certain ARM "virt" machinetypes, but didn't update
      the function qemuDomainSupportsPCI() which is called later on when we
      are auto-assigning PCI addresses and default settings for the PCI
      controller <model> and <target> attributes. The result was that PCI
      addresses weren't assigned, and the controllers didn't have their
      attribute default values set, leading to an error when the domain was
      started, e.g.:
      
        internal error: autogenerated dmi-to-pci-bridge options not set
      
      This patch adds the same check made in the earlier patch to
      qemuDomainSupportsPCI(), so that PCI address auto-assignment and
      target/model default values will be set.
      9bd16ad3
  9. 06 8月, 2015 2 次提交
  10. 03 8月, 2015 1 次提交
    • M
      qemu: Remove double unlock for domains · c43c661f
      Martin Kletzander 提交于
      The virDomainObjListRemove() function unlocks a domain that it's given
      due to legacy code.  And because of that code, which should be
      refactored, that last virObjectUnlock() cannot be just removed.  So
      instead, lock it right back for qemu for now.  All calls to
      qemuDomainRemoveInactive() are followed by code that unlocks the domain
      again, plus the domain should be locked during qemuDomainObjEndJob(), so
      the right place to lock it is right after virDomainObjListRemove().
      
      The only place where this would cause a problem is the autodestroy
      callback, so we need to get another reference there and uref+unlock it
      afterwards.  Luckily, returning NULL from that function doesn't mean an
      error, and only means that it doesn't need to be unlocked anymore.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      c43c661f
  11. 08 7月, 2015 2 次提交
  12. 01 7月, 2015 2 次提交
  13. 19 6月, 2015 5 次提交
  14. 18 6月, 2015 1 次提交
    • P
      qemu: 'privileged' flag is not really configuration · 0b416434
      Peter Krempa 提交于
      The privileged flag will not change while the configuration might
      change. Make the 'privileged' flag member of the driver again and mark
      it immutable. Should that ever change add an accessor that will group
      reads of the state.
      0b416434
  15. 04 6月, 2015 2 次提交
  16. 01 6月, 2015 1 次提交
  17. 20 5月, 2015 1 次提交
  18. 15 5月, 2015 2 次提交
  19. 04 5月, 2015 1 次提交
  20. 28 4月, 2015 1 次提交
    • J
      qemu: Use domain iothreadids to IOThread's 'thread_id' · 8d4614a5
      John Ferlan 提交于
      Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the
      'thread_id' as returned from the live qemu monitor data.
      
      Remove the iothreadpids list from _qemuDomainObjPrivate and replace with
      the new iothreadids 'thread_id' element.
      
      Rather than use the default numbering scheme of 1..number of iothreads
      defined for the domain, use the iothreadid's list for the iothread_id
      
      Since iothreadids list keeps track of the iothread_id's, these are
      now used in place of the many places where a for loop would "know"
      that the ID was "+ 1" from the array element.
      
      The new tests ensure usage of the <iothreadid> values for an exact number
      of iothreads and the usage of a smaller number of <iothreadid> values than
      iothreads that exist (and usage of the default numbering scheme).
      8d4614a5
  21. 26 4月, 2015 1 次提交
    • P
      qemu: agent: Differentiate errors when the agent channel was hotplugged · e1c04108
      Peter Krempa 提交于
      When the guest agent channel gets hotplugged to a VM, libvirt would
      still report that "QEMU guest agent is not configured" rather than
      stating that the connection was not established yet.
      
      Currently the code won't be able to connect to the agent after hotplug
      but that will change in a later patch.
      
      As the qemuFindAgentConfig() helper is quite helpful in this case move
      it to a more usable place and export it.
      e1c04108
  22. 24 4月, 2015 1 次提交