1. 16 1月, 2019 1 次提交
  2. 09 1月, 2019 2 次提交
    • 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
    • A
      src: Fix a few unmarked_diagnostics issues · 5c7bfc6b
      Andrea Bolognani 提交于
      These were not caught by our current regular expressions
      but will be caught by the improved ones we're about to
      introduce, so fix them ahead of time.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      5c7bfc6b
  3. 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
  4. 17 12月, 2018 1 次提交
  5. 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
  6. 13 12月, 2018 1 次提交
    • M
      qemu: Don't use -mem-prealloc among with .prealloc=yes · c658764d
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1624223
      
      There are two ways to request memory preallocation on cmd line:
      -mem-prealloc and .prealloc attribute for a memory-backend-file.
      However, as it turns out it's not safe to use both at the same
      time. If -mem-prealloc is used then qemu will fully allocate the
      memory (this is done by actually touching every page that has
      been allocated). Then, if .prealloc=yes is specified,
      mbind(flags = MPOL_MF_STRICT | MPOL_MF_MOVE) is called which:
      
      a) has to (possibly) move the memory to a different NUMA node,
      b) can have no effect when hugepages are in play (thus ignoring user
      request to place memory on desired NUMA nodes).
      
      Prefer -mem-prealloc as it is more backward compatible
      compared to switching to "-numa node,memdev=  + -object
      memory-backend-file".
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      c658764d
  7. 12 12月, 2018 1 次提交
  8. 06 12月, 2018 2 次提交
  9. 05 12月, 2018 1 次提交
  10. 03 12月, 2018 3 次提交
  11. 28 11月, 2018 2 次提交
  12. 16 11月, 2018 4 次提交
    • M
      qemu_domain: Track if domain remembers original owner · 7a44ffa6
      Michal Privoznik 提交于
      For metadata locking we might need an extra fork() which given
      latest attempts to do fewer fork()-s is suboptimal. Therefore,
      there will be a qemu.conf knob to {en|dis}able this feature. But
      since the feature is actually not metadata locking itself rather
      than remembering of the original owner of the file this is named
      as 'rememberOwner'. But patches for that feature are not even
      posted yet so there is actually no qemu.conf entry in this patch
      nor a way to enable this feature.
      
      Even though this is effectively a dead code for now it is still
      desired.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      7a44ffa6
    • M
      qemu: add memfd source type · 24b74d18
      Marc-André Lureau 提交于
      Add a new memoryBacking source type "memfd", supported by QEMU (when
      the capability is available).
      
      A memfd is a specialized anonymous memory kind. As such, an anonymous
      source type could be automatically using a memfd. However, there are
      some complications when migrating from different memory backends in
      qemu (mainly due to the internal object naming at this point, but
      there could be more). For now, it is simpler and safer to simply
      introduce a new source type "memfd". Eventually, the "anonymous" type
      could learn to use memfd transparently in a separate change.
      
      The main benefits are that it doesn't need to create filesystem files,
      and it also enforces sealing, providing a bit more safety.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      24b74d18
    • D
      qemu_process.c: moving qemuValidateCpuCount to qemu_domain.c · 9c2fbe97
      Daniel Henrique Barboza 提交于
      Previous patch removed the call to qemuProcessValidateCpuCount
      from qemuProcessStartValidateXML, in qemu_process.c. The only
      caller left is qemuDomainDefValidate, in qemu_domain.c.
      
      Instead of having a public function declared inside qemu_process.c
      that isn't used in that file, this patch moves the function to
      qemu_domain.c, making in static and renaming it to
      qemuDomainValidateCpuCount to be compliant with other static
      functions names in the file.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      9c2fbe97
    • D
      qemu_domain.c: moving maxCpu validation to qemuDomainDefValidate · 2c4a6a34
      Daniel Henrique Barboza 提交于
      Adding maxCpu validation in qemuDomainDefValidate allows the user to
      spot over the board maxCpus counts at editing time, instead of
      facing a runtime error when starting the domain. This check is also
      arch independent.
      
      This leaves us with 2 calls to qemuProcessValidateCpuCount: one in
      qemuProcessStartValidateXML and the new one at qemuDomainDefValidate.
      
      The call in qemuProcessStartValidateXML is redundant. Following
      up in that code, there is a call to virDomainDefValidate, which
      in turn will call config.domainValidateCallback. In this case, the
      callback function is qemuDomainDefValidate. This means that, on startup
      time, qemuProcessValidateCpuCount will be called twice.
      
      To avoid that, let's also remove the qemuProcessValidateCpuCount call
      from qemuProcessStartValidateXML.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      2c4a6a34
  13. 15 11月, 2018 3 次提交
  14. 13 11月, 2018 2 次提交
  15. 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
  16. 07 11月, 2018 1 次提交
    • J
      qemu: Restore lost shutdown reason · 296e05b5
      John Ferlan 提交于
      When qemuProcessReconnectHelper was introduced (commit d38897a5)
      reconnection failure used VIR_DOMAIN_SHUTOFF_FAILED; however, that
      was changed in commit bda2f17d to either VIR_DOMAIN_SHUTOFF_CRASHED
      or VIR_DOMAIN_SHUTOFF_UNKNOWN.
      
      When QEMU_CAPS_NO_SHUTDOWN checking was removed in commit fe35b1ad
      the conditional state was just left at VIR_DOMAIN_SHUTOFF_CRASHED.
      
      So introduce qemuDomainIsUsingNoShutdown which will manage the
      condition when the domain was started with -no-shutdown so that
      when/if reconnection failure occurs we can restore the decision
      point used to determine whether CRASHED or UNKNOWN is provided.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      296e05b5
  17. 19 10月, 2018 1 次提交
  18. 02 10月, 2018 2 次提交
  19. 26 9月, 2018 1 次提交
  20. 22 9月, 2018 2 次提交
  21. 17 9月, 2018 1 次提交
  22. 13 9月, 2018 1 次提交
  23. 12 9月, 2018 1 次提交
    • M
      qemu_domain: Drop namespace check from top level functions · e7d9a8f1
      Michal Privoznik 提交于
      In some cases we are checking if the mount namespace is enabled
      at two places: one is at the beginning of exported function (e.g.
      qemuDomainNamespaceSetupDisk()) and the other is at the beginning
      of qemuDomainNamespaceMknodPaths() which is called from the
      former function anyway. Then we have some other functions which
      rely on the later check solely.
      
      In order to compensate for possibly needless function call,
      qemuDomainNamespaceMknodPaths() returns early if @npaths is zero.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      e7d9a8f1
  24. 07 9月, 2018 1 次提交
  25. 06 9月, 2018 1 次提交
  26. 31 8月, 2018 1 次提交
  27. 29 8月, 2018 1 次提交
    • L
      qemu: Validate memory access during validate domain config · fe67e3e2
      Luyao Huang 提交于
      Commit 6534b3c4 tried to raise an error when there is no numa
      nodes by setting access='shared' in the domain config, but added
      a helper called from qemuDomainDeviceDefValidate instead of a
      helper called from qemuDomainDefValidate for XML:
      
        <memoryBacking>
          <hugepages/>
          <access mode='shared'/>
        </memoryBacking>
      
      Since there are no memory devices in the test XML, there would
      be no validation failure, but the test added was still failing.
      Investigating that it turns out that unnecessary XML elements
      were causing the failure (no need for <video>, <graphics>,
      <pm>, usb controller model "piix3-uhci", disk attribute for
      "discard='unmap'", <serial>, <console>, <channel> and a
      memballoon model). Removing all those before moving the method
      caused the test to succeed.
      
      So this patch moves the validation to the right place and
      removes all the unnecessary XML pieces that were causing
      a false validation failure.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1448149#c14Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      fe67e3e2