1. 19 8月, 2015 2 次提交
    • J
      api: Adjust comment for virDomainAddIOThread · 53058e11
      John Ferlan 提交于
      The comment for the function indicated that iothread_id had to be
      a positive non-zero value; however, that wasn't checked - that is
      a value of 0 is/was allowed by the API and was left up to the
      hypervisor to reject the value.
      
      More than likely this nuance was missed during the many "adjustments"
      to the API in the review phase.
      53058e11
    • J
      api: Remove check on iothread_id arg in virDomainPinIOThread · d64b81a8
      John Ferlan 提交于
      Allow 0 as an iothread_id and force the hypervisor to handle.
      The qemuDomainPinIOThread API will look up the iothread_id of
      0 and not find it and message that anyway.
      d64b81a8
  2. 18 8月, 2015 1 次提交
  3. 14 8月, 2015 1 次提交
  4. 10 8月, 2015 1 次提交
    • M
      virDomainCoreDumpWithFormat: Mention enum for @dumpformat · bc359f77
      Michal Privoznik 提交于
      So the API takes @dumpformat argument. This is what makes it special
      when compared to virDomainCoreDump. The argument is there so that
      users can choose the format of resulting core dump file. And to ease
      them the choosing process we even have an enum with supported values
      across all the hypervisors. But we don't mention the enum in  the
      function description anywhere. Fix it!
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bc359f77
  5. 10 7月, 2015 1 次提交
  6. 26 6月, 2015 1 次提交
  7. 19 6月, 2015 1 次提交
  8. 04 6月, 2015 2 次提交
  9. 29 5月, 2015 1 次提交
    • L
      debug: assure NULLSTR() around all %s args in debug at top of public APIs · e983e625
      Laine Stump 提交于
      There are also a couple that were very uninformatively just logging
      the value of the pointer rather than the string itself:
      
      * the "name" arg to virNodeDeviceLookupByName()
      * wwnn and wwpn args to virNodeDeviceLookupSCSIHostByWWN()
      
      All char*'s that make sense should now have their contents logged
      rather than the pointer, and all %s args should now be inside
      NULLSTR().
      e983e625
  10. 21 5月, 2015 1 次提交
  11. 14 5月, 2015 1 次提交
  12. 04 5月, 2015 2 次提交
  13. 28 4月, 2015 1 次提交
  14. 14 4月, 2015 1 次提交
  15. 03 4月, 2015 1 次提交
  16. 02 4月, 2015 1 次提交
  17. 26 3月, 2015 2 次提交
  18. 18 3月, 2015 1 次提交
  19. 17 3月, 2015 1 次提交
    • N
      domifaddr: Implement the public APIs · 5b5242a7
      Nehal J Wani 提交于
      Define helper function virDomainInterfaceFree, which allows
      the upper layer application to free the domain interface object
      conveniently.
      
      The API is going to provide multiple methods by flags, e.g.
        * Query guest agent
        * Parse DHCP lease file
      
      include/libvirt/libvirt-domain.h
        * Define virDomainInterfaceAddresses, virDomainInterfaceFree
        * Define structs virDomainInterface, virDomainIPAddress
      
      src/driver-hypervisor.h:
        * Define domainInterfaceAddresses
      
      src/libvirt-domain.c:
        * Implement virDomainInterfaceAddresses
        * Implement virDomainInterfaceFree
      
      src/libvirt_public.syms:
        * Export the new symbols
      Signed-off-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
      5b5242a7
  20. 12 3月, 2015 1 次提交
    • J
      Implement public API for virDomainPinIOThread · 71b234ce
      John Ferlan 提交于
      Add virDomainPinIOThread to allow setting the CPU affinity for a specific
      IOThread based on the output generated from virDomainGetIOThreadsInfo
      
      The API supports updating both the --live domain and the --config data
      71b234ce
  21. 10 3月, 2015 1 次提交
    • C
      qemu: fix memory leak in qemuAgentGetFSInfo · f276b36d
      Chen Fan 提交于
      in virDomainFSInfoFree(), don't free the virDomainFSInfo data.
      
      ==10670== 80 bytes in 2 blocks are definitely lost in loss record 576 of 793
      ==10670==    at 0x4A06BC3: calloc (vg_replace_malloc.c:618)
      ==10670==    by 0x509DEBD: virAlloc (viralloc.c:144)
      ==10670==    by 0x19FBD558: qemuAgentGetFSInfo (qemu_agent.c:1837)
      ==10670==    by 0x1A03CF91: qemuDomainGetFSInfo (qemu_driver.c:19238)
      Signed-off-by: NChen Fan <chen.fan.fnst@cn.fujitsu.com>
      f276b36d
  22. 09 3月, 2015 1 次提交
  23. 06 3月, 2015 2 次提交
    • J
      Implement public API for virDomainGetIOThreadsInfo · 11a5a095
      John Ferlan 提交于
      Add virDomainGetIOThreadInfo in order to return a list of
      virDomainIOThreadInfoPtr structures which list the IOThread ID
      and the CPU Affinity map for each IOThread for the domain.
      
      For an active domain, the live data will be returned, while for
      an inactive domain, the config data will be returned.
      
      The API supports either the --live or --config flag, but not both.
      
      Also added virDomainIOThreadsInfoFree in order to free the cpumap
      and the IOThreadInfo structure.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      11a5a095
    • P
      memtune: change the way how we store unlimited value · cf521fc8
      Pavel Hrdina 提交于
      There was a mess in the way how we store unlimited value for memory
      limits and how we handled values provided by user.  Internally there
      were two possible ways how to store unlimited value: as 0 value or as
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED.  Because we chose to store memory
      limits as unsigned long long, we cannot use -1 to represent unlimited.
      It's much easier for us to say that everything greater than
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED means unlimited and leave 0 as valid
      value despite that it makes no sense to set limit to 0.
      
      Remove unnecessary function virCompareLimitUlong.  The update of test
      is to prevent the 0 to be miss-used as unlimited in future.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146539Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      cf521fc8
  24. 25 2月, 2015 1 次提交
  25. 16 1月, 2015 1 次提交
  26. 13 1月, 2015 1 次提交
    • D
      Add new virDomainDefineXMLFlags public API · 2a5ee954
      Daniel P. Berrange 提交于
      The virDomainDefineXML method is one of the few that still lacks
      an 'unsigned int flags' parameter. This will be needed for adding
      XML validation to this API. virDomainCreateXML fortunately already
      has flags.
      2a5ee954
  27. 17 12月, 2014 1 次提交
    • E
      getstats: add new flag for block backing chain · 4bffafb2
      Eric Blake 提交于
      This patch introduces access to allocation information about
      a backing chain of a live domain.  While querying storage
      volumes for read-only disks could provide some of the details,
      we do NOT want to read() a file while qemu is writing it.
      Also, there is one case where we have to rely on qemu: when
      doing a block commit into a backing file, where that file is
      stored in qcow2 format on a host block device, we want to know
      the current highest write offset into that image, in order to
      know if the disk must be resized larger.  qemu-img does not
      (currently) show this information, and none of the earlier
      block APIs were extensible enough to expose it.  But
      virDomainListGetStats is perfect for the job!
      
      We don't need a new group of statistics, as the existing block
      group is sufficient.  On the other hand, as existing libvirt
      releases already report 1:1 mapping of block.count to <disk>
      devices, changing the array size could confuse older clients;
      and even with newer clients, the time and memory taken to
      report additional statistics is not always necessary (backing
      files are generally read-only except for block-commit, so while
      read statistics may change, sizing statistics will not).  So
      the choice here is to add a new flag that only newer callers
      will pass, when they are prepared for the additional information.
      
      This patch introduces the new API, but it will take more
      patches to get it implemented for qemu.
      
      * include/libvirt/libvirt-domain.h
      (VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING): New flag.
      * src/libvirt-domain.c (virConnectGetAllDomainStats): Document it,
      and add a new field when it is in use.
      * tools/virsh-domain-monitor.c (cmdDomstats): Use new flag.
      * tools/virsh.pod (domstats): Document it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4bffafb2
  28. 09 12月, 2014 2 次提交
    • E
      getstats: add block.n.path stat · 7b499262
      Eric Blake 提交于
      I'm about to make block stats optionally more complex to cover
      backing chains, where block.count will no longer equal the number
      of <disks> for a domain.  For these reasons, it is nicer if the
      statistics output includes the source path (for local files).
      This patch doesn't add anything for network disks, although we
      may decide to add that later.
      
      With this patch, I now see the following for the same domain as
      in the previous patch (one qcow2 file, and an empty cdrom drive):
      $ virsh domstats --block foo
      Domain: 'foo'
        block.count=2
        block.0.name=hda
        block.0.path=/var/lib/libvirt/images/foo.qcow2
        block.1.name=hdc
      
      * src/libvirt-domain.c (virConnectGetAllDomainStats): Document
      new field.
      * tools/virsh.pod (domstats): Document new field.
      * src/qemu/qemu_driver.c (qemuDomainGetStatsBlock): Return the new
      stat for local files/block devices.
      (QEMU_ADD_NAME_PARAM): Add parameter.
      (qemuDomainGetStatsInterface): Update caller.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7b499262
    • E
      getstats: improve documentation · f301fe77
      Eric Blake 提交于
      At least with 'virsh domstats --block' on an offline domain, we
      currently output no stats even though we recognize the stat
      category.  Although a later patch will improve this situation,
      it is better to document that this is expected behavior.
      
      Also, while the current implementation rejects filtering flags
      for virDomainListGetStats, this limitation may be lifted in the
      future and we do not enforce it at the API level.
      
      * src/libvirt-domain.c (virConnectGetAllDomainStats): Document
      that recognized stats might not be reported.
      (virDomainListGetStats): Likewise, and tweak filtering documentation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f301fe77
  29. 03 12月, 2014 1 次提交
    • M
      qemu_migration: Precreate missing storage · cf54c606
      Michal Privoznik 提交于
      Based on previous commit, we can now precreate missing volumes. While
      digging out the functionality from storage driver would be nicer, if
      you've seen the code it's nearly impossible. So I'm going from the
      other end:
      
      1) For given disk target, disk path is looked up.
      2) For the disk path, storage pool is looked up, a volume XML is
      constructed and then passed to virStorageVolCreateXML() which has all
      the knowledge how to create raw images, (encrypted) qcow(2) images,
      etc.
      
      One of the advantages of this approach is, we don't have to care about
      image conversion - qemu does that for us. So for instance, users can
      transform qcow2 into raw on migration (if the correct XML is passed to
      the migration API).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      cf54c606
  30. 02 12月, 2014 1 次提交
    • M
      libvirt.c: Move virDomainGetFSInfo to libvirt-domain.c · 2cc8c44e
      Michal Privoznik 提交于
      Since our big split of libvirt.c there are only a few functions
      living there. The majority was moved to corresponding subfile,
      e.g. domain functions were moved to libvirt-domain.c. However,
      the patches for virDomainGetFSInfo() and virDomainFSInfoFree()
      introduction were posted prior the big split and merged after.
      This resulted in two domain functions landing in wrong file.
      Move them to the correct one.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2cc8c44e
  31. 06 11月, 2014 1 次提交
    • E
      CVE-2014-7823: dumpxml: security hole with migratable flag · b1674ad5
      Eric Blake 提交于
      Commit 28f8dfdc (v1.0.0) introduced a security hole: in at least
      the qemu implementation of virDomainGetXMLDesc, the use of the
      flag VIR_DOMAIN_XML_MIGRATABLE (which is usable from a read-only
      connection) triggers the implicit use of VIR_DOMAIN_XML_SECURE
      prior to calling qemuDomainFormatXML.  However, the use of
      VIR_DOMAIN_XML_SECURE is supposed to be restricted to read-write
      clients only.  This patch treats the migratable flag as requiring
      the same permissions, rather than analyzing what might break if
      migratable xml no longer includes secret information.
      
      Fortunately, the information leak is low-risk: all that is gated
      by the VIR_DOMAIN_XML_SECURE flag is the VNC connection password;
      but VNC passwords are already weak (FIPS forbids their use, and
      on a non-FIPS machine, anyone stupid enough to trust a max-8-byte
      password sent in plaintext over the network deserves what they
      get).  SPICE offers better security than VNC, and all other
      secrets are properly protected by use of virSecret associations
      rather than direct output in domain XML.
      
      * src/remote/remote_protocol.x (REMOTE_PROC_DOMAIN_GET_XML_DESC):
      Tighten rules on use of migratable flag.
      * src/libvirt-domain.c (virDomainGetXMLDesc): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b1674ad5
  32. 24 10月, 2014 3 次提交