1. 18 1月, 2019 6 次提交
  2. 17 1月, 2019 1 次提交
  3. 09 1月, 2019 1 次提交
    • Y
      qemu: Process RDMA GID state change event · ed357cef
      Yuval Shaia 提交于
      This event is emitted on the monitor when a GID table in pvrdma device
      is modified and the change needs to be propagate to the backend RDMA
      device's GID table.
      
      The control over the RDMA device's GID table is done by updating the
      device's Ethernet function addresses.
      Usually the first GID entry is determine by the MAC address, the second
      by the first IPv6 address and the third by the IPv4 address. Other
      entries can be added by adding more IP addresses. The opposite is the
      same, i.e. whenever an address is removed, the corresponding GID entry
      is removed.
      
      The process is done by the network and RDMA stacks. Whenever an address
      is added the ib_core driver is notified and calls the device driver's
      add_gid function which in turn update the device.
      
      To support this in pvrdma device we need to hook into the create_bind
      and destroy_bind HW commands triggered by pvrdma driver in guest.
      Whenever a changed is made to the pvrdma device's GID table a special
      QMP messages is sent to be processed by libvirt to update the address of
      the backend Ethernet device.
      Signed-off-by: NYuval Shaia <yuval.shaia@oracle.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ed357cef
  4. 21 12月, 2018 1 次提交
    • N
      qemu: don't log error for missing optional storage sources on stats · 318d807a
      Nikolay Shirokovskiy 提交于
      Every time we call all domain stats for inactive domain with
      unavailable storage source we get error message in logs [1]. It's a bit noisy.
      While it's arguable whether we need such message or not for mandatory
      disks we would like not to see messages for optional disks. Let's
      filter at least for cases of local files. Fixing other cases would
      require passing flag down the stack to .backendInit of storage
      which is ugly.
      
      Stats for active domain are fine because we either drop disks
      with unavailable sources or clean source which is handled
      by virStorageSourceIsEmpty in qemuDomainGetStatsOneBlockFallback.
      
      We have these logs for successful stats since 25aa7035 (version 1.2.15)
      which in turn fixes 596a1371 (version 1.2.12 )which added substantial
      stats for offline disks.
      
      [1] error message example:
      qemuOpenFileAs:3324 : Failed to open file '/path/to/optional/disk': No such file or directory
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      318d807a
  5. 17 12月, 2018 1 次提交
    • D
      qemu: use line breaks in command line args written to log · 07c9d660
      Daniel P. Berrangé 提交于
      The QEMU command line arguments are very long and currently all written
      on a single line to /var/log/libvirt/qemu/$GUEST.log. This introduces
      logic to add line breaks after every env variable and "-" optional
      argument, and every positional argument. This will create a clearer log
      file, which will in turn present better in bug reports when people cut +
      paste from the log into a bug comment.
      
      An example log file entry now looks like this:
      
        2018-12-14 12:57:03.677+0000: starting up libvirt version: 5.0.0, qemu version: 3.0.0qemu-3.0.0-1.fc29, kernel: 4.19.5-300.fc29.x86_64, hostname: localhost.localdomain
        LC_ALL=C \
        PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin \
        HOME=/home/berrange \
        USER=berrange \
        LOGNAME=berrange \
        QEMU_AUDIO_DRV=none \
        /usr/bin/qemu-system-ppc64 \
        -name guest=guest,debug-threads=on \
        -S \
        -object secret,id=masterKey0,format=raw,file=/home/berrange/.config/libvirt/qemu/lib/domain-33-guest/master-key.aes \
        -machine pseries-2.10,accel=tcg,usb=off,dump-guest-core=off \
        -m 1024 \
        -realtime mlock=off \
        -smp 1,sockets=1,cores=1,threads=1 \
        -uuid c8a74977-ab18-41d0-ae3b-4041c7fffbcd \
        -display none \
        -no-user-config \
        -nodefaults \
        -chardev socket,id=charmonitor,fd=23,server,nowait \
        -mon chardev=charmonitor,id=monitor,mode=control \
        -rtc base=utc \
        -no-shutdown \
        -boot strict=on \
        -device qemu-xhci,id=usb,bus=pci.0,addr=0x1 \
        -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
        -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
        -msg timestamp=on
        2018-12-14 12:57:03.730+0000: shutting down, reason=failed
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      07c9d660
  6. 14 12月, 2018 1 次提交
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  7. 11 12月, 2018 1 次提交
  8. 07 12月, 2018 2 次提交
    • J
      qemu: Don't fail stats collection due to IOThread capability · 61d12533
      John Ferlan 提交于
      Commit 212dc928 made a generic qemuDomainGetIOThreadsMon which
      would fail if the QEMU_CAPS_OBJECT_IOTHREAD didn't exist. Then
      commit d1eac927 used that helper for the collection of all domain
      stats. However, if the capability doesn't exist, then the entire
      stats collection fails. Since the IOThread stats were meant to be
      if available only, thus rather than failing if the capability
      doesn't exist, let's just not collect the stats. Restore the caps
      failure logic for qemuDomainGetIOThreadsLive.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      61d12533
    • J
      qemu: Save qemuDomainGetStats error · e1fc7ec0
      John Ferlan 提交于
      During qemuConnectGetAllDomainStats if qemuDomainGetStats causes
      a failure, then when collecting more than one domain's worth of
      statistics the loop in virDomainStatsRecordListFree would call
      virDomainFree which would call virResetLastError effectively wiping
      out the reason we failed leaving the caller with no idea why the
      collection failed.
      
      To fix this, let's Preserve the error and Restore it prior to return
      so that a caller such as 'virsh domstats' doesn't get the generic
      "error: An error occurred, but the cause is unknown".
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      e1fc7ec0
  9. 05 12月, 2018 1 次提交
  10. 04 12月, 2018 2 次提交
  11. 03 12月, 2018 1 次提交
  12. 27 11月, 2018 1 次提交
    • W
      qemu: Report cache occupancy (CMT) with domstats · a91ebc89
      Wang Huaqiang 提交于
      Adding the interface in qemu to report CMT statistic information
      through command 'virsh domstats --cpu-total'.
      
      Below is a typical output:
      
               # virsh domstats 1 --cpu-total
               Domain: 'ubuntu16.04-base'
                 ...
                 cpu.cache.monitor.count=2
                 cpu.cache.monitor.0.name=vcpus_1
                 cpu.cache.monitor.0.vcpus=1
                 cpu.cache.monitor.0.bank.count=2
                 cpu.cache.monitor.0.bank.0.id=0
                 cpu.cache.monitor.0.bank.0.bytes=4505600
                 cpu.cache.monitor.0.bank.1.id=1
                 cpu.cache.monitor.0.bank.1.bytes=5586944
                 cpu.cache.monitor.1.name=vcpus_4-6
                 cpu.cache.monitor.1.vcpus=4,5,6
                 cpu.cache.monitor.1.bank.count=2
                 cpu.cache.monitor.1.bank.0.id=0
                 cpu.cache.monitor.1.bank.0.bytes=17571840
                 cpu.cache.monitor.1.bank.1.id=1
                 cpu.cache.monitor.1.bank.1.bytes=29106176
      Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      a91ebc89
  13. 19 11月, 2018 5 次提交
  14. 16 11月, 2018 1 次提交
  15. 15 11月, 2018 1 次提交
  16. 12 11月, 2018 1 次提交
  17. 08 11月, 2018 1 次提交
    • E
      snapshot: Don't hose list on deletion failure · 68b2596f
      Eric Blake 提交于
      If qemuDomainSnapshotDiscard() fails for any reason (rare,
      but possible with an ill-timed ENOMEM or if
      qemuDomainSnapshotForEachQcow2() has problems talking to the
      qemu guest monitor), then an attempt to retry the snapshot
      deletion API will crash because we didn't undo the effects
      of virDomainSnapshotDropParent() temporarily rearranging the
      internal list structures, and the second attempt to drop
      parents will dereference NULL.  Fix it by instead noting that
      there are only two callers to qemuDomainSnapshotDiscard(),
      and only one of the two callers wants the parent to be updated;
      thus we can move the call to virDomainSnapshotDropParent()
      into a code path that only gets executed on success.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      68b2596f
  18. 08 10月, 2018 2 次提交
  19. 04 10月, 2018 1 次提交
  20. 26 9月, 2018 3 次提交
  21. 20 9月, 2018 2 次提交
  22. 19 9月, 2018 1 次提交
    • J
      qemu: Fix error reporting in qemuDomainSaveImageStartVM · 1468536d
      Jiri Denemark 提交于
      When restoring a domain from a compressed image, we launch an
      intermediate process for decompressing the saved data. If QEMU fails to
      load the data for some reason, we force close the stdin/stdout file
      descriptors of the intermediate process and wait for it to die. However,
      virCommandWait can report various errors which would overwrite the real
      error from QEMU. Thus instead of getting something useful:
      
          internal error: process exited while connecting to monitor:
          2018-09-17T15:17:29.998910Z qemu-system-x86_64: can't apply global
          Skylake-Client-x86_64-cpu.osxsave=off: Property '.osxsave' not found
      
      we could get an irrelevant error message:
      
          internal error: Child process (lzop -dc --ignore-warn) unexpected
          fatal signal 13
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      1468536d
  23. 18 9月, 2018 1 次提交
    • M
      security_manager: Load lock plugin on init · 3e26b476
      Michal Privoznik 提交于
      Now that we know what metadata lock manager user wishes to use we
      can load it when initializing security driver. This is achieved
      by adding new argument to virSecurityManagerNewDriver() and
      subsequently to all functions that end up calling it.
      
      The cfg.mk change is needed in order to allow lock_manager.h
      inclusion in security driver without 'syntax-check' complaining.
      This is safe thing to do as locking APIs will always exist (it's
      only backend implementation that changes). However, instead of
      allowing the include for all other drivers (like cpu, network,
      and so on) allow it only for security driver. This will still
      trigger the error if including from other drivers.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      3e26b476
  24. 17 9月, 2018 2 次提交