1. 25 1月, 2019 1 次提交
  2. 23 1月, 2019 2 次提交
  3. 22 1月, 2019 1 次提交
  4. 18 1月, 2019 9 次提交
  5. 09 1月, 2019 2 次提交
    • M
      qemu: Use ULL instead of uint64_t for RDMA GID event · f8862714
      Michal Privoznik 提交于
      In the previous commit we are using uint64_t for storing subnet
      prefix and interface id that qemu reports in
      RDMA_GID_STATUS_CHANGED event. We also report them in some debug
      messages. This poses a problem because uint64_t can be UL or ULL
      depending on the host architecture and hence we wouldn't know
      which format to use. Switch to ULL which is big enough and
      doesn't suffer from the issue.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f8862714
    • 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
  6. 02 1月, 2019 2 次提交
  7. 21 12月, 2018 1 次提交
  8. 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
  9. 14 12月, 2018 2 次提交
  10. 05 12月, 2018 1 次提交
  11. 03 12月, 2018 2 次提交
  12. 29 11月, 2018 1 次提交
    • J
      qemu: Fix post-copy migration on the source · eca9d21e
      Jiri Denemark 提交于
      Post-copy migration has been broken on the source since commit
      v3.8.0-245-g32c29f10 which implemented support for
      pause-before-switchover QEMU migration capability.
      
      Even though the migration itself went well, the source did not really
      know when it switched to the post-copy mode despite the messages logged
      by MIGRATION event handler. As a result of this, the events emitted by
      source libvirtd were not accurate and statistics of the completed
      migration would cover only the pre-copy part of migration. Moreover, if
      migration failed during the post-copy phase for some reason, the source
      libvirtd would just happily resume the domain, which could lead to disk
      corruption.
      
      With the pause-before-switchover capability enabled, the order of events
      emitted by QEMU changed:
      
                          pause-before-switchover
                 disabled                        enabled
          MIGRATION, postcopy-active      STOP
          STOP                            MIGRATION, pre-switchover
                                          MIGRATION, postcopy-active
      
      The STOP even handler checks the migration status (postcopy-active) and
      sets the domain state accordingly. Which is sufficient when
      pause-before-switchover is disabled, but once we enable it, the
      migration status is still active when we get STOP from QEMU. Thus the
      domain state set in the STOP handler has to be corrected once we are
      notified that migration changed to postcopy-active.
      
      This results in two SUSPENDED events to be emitted by the source
      libvirtd during post-copy migration. The first one with
      VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED detail, while the second one reports
      the corrected VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY detail. This is
      inevitable because we don't know whether migration will eventually
      switch to post-copy at the time we emit the first event.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1647365Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      eca9d21e
  13. 16 11月, 2018 7 次提交
    • 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_tpm: Pass virDomainObjPtr instead of virDomainDefPtr · 592ed505
      Michal Privoznik 提交于
      The TPM code currently accepts pointer to a domain definition.
      This is okay for now, but in near future the security driver APIs
      it calls will require domain object. Therefore, change the TPM
      code to accept the domain object pointer.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      592ed505
    • D
      qemu_process.c: removing qemuProcessStartValidateXML · 91afd53c
      Daniel Henrique Barboza 提交于
      Commit ("qemu_domain.c: moving maxCpu validation to
      qemuDomainDefValidate") shortened the code of qemuProcessStartValidateXML.
      The function is called only by qemuProcessStartValidate, in the
      same file, and its code is now a single check that calls virDomainDefValidate.
      
      Instead of leaving a function call just to execute a single check,
      this patch puts the check in the body of qemuProcessStartValidate in the
      place where qemuProcessStartValidateXML was being called. The function can
      now be removed.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      91afd53c
    • 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
    • D
      qemu_process.c: make qemuValidateCpuCount public · 9a8e0402
      Daniel Henrique Barboza 提交于
      qemuValidateCpuCount validates the maxCpus value of a domain at
      startup time, preventing it to start if the value exceeds a maximum.
      
      This checking is also done at qemu_domain.c, qemuDomainDefValidate.
      However, it is done only for x86 (and even then, in a specific
      scenario). We want this check to be done for all archs.
      
      To accomplish this, let's first make qemuValidateCpuCount public so
      it can be used inside qemuDomainDefValidate. The function was renamed
      to qemuProcessValidateCpuCount to be compliant with the other public
      methods at qemu_process.h. The method signature was slightly adapted
      to fit the const 'def' variable used in qemuDomainDefValidate. This
      change has no downside in in its original usage at
      qemuProcessStartValidateXML.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      9a8e0402
    • D
      qemu_process.c: adding maxCpus value to error message · 8aad8432
      Daniel Henrique Barboza 提交于
      Adding the maxCpus value in the error message of qemuValidateCpuCount
      allows the user to set an acceptable maxCpus count without knowing
      QEMU internals.
      
      x86 guests, that might have been created prior to the x86
      qemuDomainDefValidate maxCpus check code (that validates the maxCpus value
      in editing time), will also benefit from this change.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      8aad8432
  14. 15 11月, 2018 6 次提交
  15. 14 11月, 2018 1 次提交
  16. 12 11月, 2018 1 次提交