1. 10 6月, 2019 3 次提交
  2. 21 5月, 2019 11 次提交
  3. 20 5月, 2019 3 次提交
    • M
      Revert "qemu: Do not override config XML in case of snapshot revert" · da04eab9
      Michal Privoznik 提交于
      This reverts commit dfd70ca1.
      
      Pushed by a mistake, sorry. There's still some discussion going
      on upstream.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      da04eab9
    • H
      qemu: Add entry for balloon stats stat-htlb-pgalloc and stat-htlb-pgfail · a699b19f
      Han Han 提交于
      Qemu added reporting of virtio balloon new statistics stat-htlb-pgalloc and
      stat-htlb-pgfail since qemu-3.0 commit b7b12644297. The value of
      stat-htlb-pgalloc represents the number of successful hugetlb page allocations
      while stat-htlb-pgfail represents the number of failed ones. Add this
      statistics reporting to libvirt.
      
      To enable this feature for vm, guest kenel >= 4.17 is required because
      the exporting hugetlb page allocation for virtio balloon is introduced
      since 6c64fe7f.
      Signed-off-by: NHan Han <hhan@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a699b19f
    • M
      qemu: Do not override config XML in case of snapshot revert · dfd70ca1
      Maxiwell S. Garcia 提交于
      Snapshot create operation saves the live XML and uses it to replace the
      domain definition in case of revert. But the VM config XML is not saved
      and the revert operation does not address this issue. This commit
      prevents the config XML from being overridden by snapshot definition.
      
      An active domain stores both current and new definitions. The current
      definition (vm->def) stores the live XML and the new definition
      (vm->newDef) stores the config XML. In an inactive domain, only the
      config XML is persistent, and it's saved in vm->def.
      
      The revert operation uses the virDomainObjAssignDef() to set the
      snapshot definition in vm->newDef, if domain is active, or in vm->def
      otherwise. But before that, it saves the old value to return to
      caller. This return is used here to restore the config XML after
      all snapshot startup process finish.
      Signed-off-by: NMaxiwell S. Garcia <maxiwell@linux.ibm.com>
      dfd70ca1
  4. 14 5月, 2019 1 次提交
    • M
      qemuDomainSnapshotCreateXML: Don't leak parsed snapshot definition · b58a6b05
      Michal Privoznik 提交于
      This function gets snapshot XML (provided by used) as an
      argument. It parses it into a local variable @def and then sets
      some more members (e.g. it creates a copy of live domain XML).
      Then it proceeds to checking if snapshot XML is valid (e.g. it
      contains as many disks as currently in the domain). If this fails
      then the control jumps to endjob label and subsequently return
      from the function. This is where AUTOFREE function for @def is
      ran. Well, because the code says to run plain VIR_FREE() we leak
      some memory because @def is actually an object and therefore
      it should have been declared as AUTOUNREF.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      b58a6b05
  5. 09 5月, 2019 4 次提交
  6. 05 5月, 2019 1 次提交
  7. 30 4月, 2019 1 次提交
  8. 26 4月, 2019 4 次提交
  9. 25 4月, 2019 1 次提交
  10. 18 4月, 2019 1 次提交
    • D
      network: use 'bridge' as actual type instead of 'network' · 518026e1
      Daniel P. Berrangé 提交于
      Ports allocated on virtual networks with type=nat|route|open all get
      given an actual type of 'network'.
      
      Only ports in networks with type=bridge use an actual type of 'bridge'.
      
      This distinction makes little sense since the virtualization drivers
      will treat both actual types in exactly the same way, as they're all
      just bridge devices a VM needs to be connected to.
      
      This doesn't affect user visible XML since the "actual" device XML
      is internal only, but we need code to convert the data upgrades.
      Reviewed-by: NLaine Stump <laine@laine.org>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      518026e1
  11. 17 4月, 2019 3 次提交
  12. 16 4月, 2019 1 次提交
    • D
      network: restrict usage of port management APIs · dd52444f
      Daniel P. Berrangé 提交于
      The port allocation APIs are currently called unconditionally for all
      types of NIC, but (mostly) only do anything for NICs with type=network.
      
      The exception is the port allocate API which does some validation even
      for NICs with type!=network. Relying on this validation is flawed,
      however, since the network driver may not even be installed. IOW virt
      drivers must not delegate validation to the network driver for NICs
      with type != network.
      
      This change allows us to report errors when the virtual network driver
      is not registered.
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      dd52444f
  13. 15 4月, 2019 1 次提交
    • J
      qemu: Don't cache microcode version · 673c62a3
      Jiri Denemark 提交于
      My earlier commit be46f613 was incomplete. It removed caching of
      microcode version in the CPU driver, which means the capabilities XML
      will see the correct microcode version. But it is also cached in the
      QEMU capabilities cache where it is used to detect whether we need to
      reprobe QEMU. By missing the second place, the original commit
      be46f613 made the situation even worse since libvirt would report
      correct microcode version while still using the old host CPU model
      (visible in domain capabilities XML).
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      673c62a3
  14. 12 4月, 2019 1 次提交
  15. 10 4月, 2019 2 次提交
    • M
      domain capabilities: Expose firmware auto selection feature · 5b9819ee
      Michal Privoznik 提交于
      If a management application wants to use firmware auto selection
      feature it can't currently know if the libvirtd it's talking to
      support is or not. Moreover, it doesn't know which values that
      are accepted for the @firmware attribute of <os/> when parsing
      will allow successful start of the domain later, i.e. if the mgmt
      application wants to use 'bios' whether there exists a FW
      descriptor in the system that describes bios.
      
      This commit then adds 'firmware' enum to <os/> element in
      <domainCapabilities/> XML like this:
      
        <enum name='firmware'>
          <value>bios</value>
          <value>efi</value>
        </enum>
      
      We can see both 'bios' and 'efi' listed which means that there
      are descriptors for both found in the system (matched with the
      machine type and architecture reported in the domain capabilities
      earlier and not shown here).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      5b9819ee
    • P
      util: Move enum convertors into virenum.(c|h) · 285c5f28
      Peter Krempa 提交于
      virutil.(c|h) is a very gross collection of random code. Remove the enum
      handlers from there so we can limit the scope where virtutil.h is used.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      285c5f28
  16. 04 4月, 2019 1 次提交
  17. 03 4月, 2019 1 次提交