1. 01 2月, 2016 1 次提交
  2. 08 1月, 2016 1 次提交
  3. 26 11月, 2015 2 次提交
    • D
      qemu: convert monitor to use qemuDomainLogContextPtr indirectly · a48539c0
      Daniel P. Berrange 提交于
      Currently the QEMU monitor is given an FD to the logfile. This
      won't work in the future with virtlogd, so it needs to use the
      qemuDomainLogContextPtr instead, but it shouldn't directly
      access that object either. So define a callback that the
      monitor can use for reporting errors from the log file.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a48539c0
    • D
      qemu: unify code for reporting errors from QEMU log files · 69b09921
      Daniel P. Berrange 提交于
      There are two pretty similar functions qemuProcessReadLog and
      qemuProcessReadChildErrors. Both read from the QEMU log file
      and try to strip out libvirt messages. The latter then reports
      an error, while the former lets the callers report an error.
      
      Re-write qemuProcessReadLog so that it uses a single read
      into a dynamically allocated buffer. Then introduce a new
      qemuProcessReportLogError that calls qemuProcessReadLog
      and reports an error.
      
      Convert all callers to use qemuProcessReportLogError.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      69b09921
  4. 25 11月, 2015 3 次提交
  5. 19 11月, 2015 3 次提交
    • J
      qemu: Use -incoming defer for migrations · 2c4ba8b4
      Jiri Denemark 提交于
      Traditionally, we pass incoming migration URI on QEMU command line,
      which has some drawbacks. Depending on the URI QEMU may initialize its
      migration state immediately without giving us a chance to set any
      additional migration parameters (this applies mainly for fd: URIs). For
      some URIs the monitor may be completely blocked from the beginning until
      migration is finished, which means we may be stuck in qmp_capabilities
      command without being able to send any QMP commands.
      
      QEMU solved this by introducing "defer" parameter for -incoming command
      line option. This will tell QEMU to prepare for an incoming migration
      while the actual incoming URI is sent using migrate-incoming QMP
      command. Before calling this command we can normally talk to the
      monitor and even set any migration parameters which will be honored by
      the incoming migration.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      2c4ba8b4
    • J
      qemu: Always set async job when starting a domain · 04c721f2
      Jiri Denemark 提交于
      We only started an async job for incoming migration from another host.
      When we were starting a domain from scratch or restoring from a saved
      state (migration from file) we didn't set any async job. Let's introduce
      a new QEMU_ASYNC_JOB_START for these cases.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      04c721f2
    • J
      qemu: Introduce qemuProcessIncomingDef · 2bf5333f
      Jiri Denemark 提交于
      Incoming migration may require quite a few parameters (URI, fd, path) to
      be considered while starting QEMU and we will soon add another one.
      Let's group all of them in a single struct.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      2bf5333f
  6. 26 4月, 2015 1 次提交
    • P
      qemu: Connect to guest agent after channel hotplug · a03e2d3a
      Peter Krempa 提交于
      If a user hot-attaches the guest agent channel libvirt would ignore it
      until the restart of libvirtd or shutdown/destroy and start of the VM
      itself.
      
      This patch adds code that opens or closes the guest agent connection
      according to the state of the guest agent channel according to
      connect/disconnect events.
      
      To allow opening the channel from the event handler qemuConnectAgent
      needed to be exported.
      a03e2d3a
  7. 02 4月, 2015 1 次提交
  8. 16 3月, 2015 1 次提交
  9. 03 3月, 2015 1 次提交
  10. 12 2月, 2015 1 次提交
  11. 14 8月, 2014 1 次提交
  12. 25 6月, 2014 1 次提交
    • J
      qemu: enum cleanups in "src/qemu/*" · aa990efe
      Julio Faracco 提交于
      As we are doing with the enum structures, a cleanup in "src/qemu/"
      directory was done now. All the enums that were defined in the
      header files were converted to typedefs in this directory. This
      patch includes all the adjustments to remove conflicts when you do
      this kind of change. "Enum-to-typedef"'s conversions were made in
      "src/qemu/qemu_{capabilities, domain, migration, hotplug}.h".
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      aa990efe
  13. 06 5月, 2014 1 次提交
  14. 25 9月, 2013 1 次提交
  15. 26 8月, 2013 1 次提交
  16. 03 7月, 2013 1 次提交
  17. 17 5月, 2013 1 次提交
  18. 28 2月, 2013 1 次提交
  19. 21 2月, 2013 1 次提交
    • O
      qemu: Merge qemuCheckSharedDisk into qemuAddSharedDisk · 371df778
      Osier Yang 提交于
      Based on moving various checking into qemuAddSharedDisk, this
      avoids the caller using it in wrong ways. Also this adds two
      new checking for qemuCheckSharedDisk (disk device not 'lun'
      and kernel doesn't support unpriv_sgio simply returns 0).
      371df778
  20. 13 2月, 2013 1 次提交
    • D
      Remove qemuDriverLock from almost everywhere · a9e97e0c
      Daniel P. Berrange 提交于
      With the majority of fields in the virQEMUDriverPtr struct
      now immutable or self-locking, there is no need for practically
      any methods to be using the QEMU driver lock. Only a handful
      of helper APIs in qemu_conf.c now need it
      a9e97e0c
  21. 11 2月, 2013 1 次提交
  22. 05 2月, 2013 1 次提交
    • D
      Introduce a virQEMUDriverConfigPtr object · b090aa7d
      Daniel P. Berrange 提交于
      Currently the virQEMUDriverPtr struct contains an wide variety
      of data with varying access needs. Move all the static config
      data into a dedicated virQEMUDriverConfigPtr object. The only
      locking requirement is to hold the driver lock, while obtaining
      an instance of virQEMUDriverConfigPtr. Once a reference is held
      on the config object, it can be used completely lockless since
      it is immutable.
      
      NB, not all APIs correctly hold the driver lock while getting
      a reference to the config object in this patch. This is safe
      for now since the config is never updated on the fly. Later
      patches will address this fully.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b090aa7d
  23. 07 1月, 2013 2 次提交
  24. 29 11月, 2012 1 次提交
  25. 24 10月, 2012 1 次提交
  26. 21 9月, 2012 1 次提交
  27. 15 8月, 2012 1 次提交
  28. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  29. 12 6月, 2012 2 次提交
    • M
      qemu: Don't overwrite security labels · 86032b22
      Michal Privoznik 提交于
      Currently, if qemuProcessStart fail at some point, e.g. because
      domain being started wants a PCI/USB device already assigned to
      a different domain, we jump to cleanup label where qemuProcessStop
      is performed. This unconditionally calls virSecurityManagerRestoreAllLabel
      which is wrong because the other domain is still using those devices.
      
      However, once we successfully label all devices/paths in
      qemuProcessStart() from that point on, we have to perform a rollback
      on failure - that is - we have to virSecurityManagerRestoreAllLabel.
      86032b22
    • M
      qemuProcessStop: Switch to flags · 69dd7714
      Michal Privoznik 提交于
      Currently, we are passing only one boolean (migrated) so there is
      no real profit in this. But it creates starting position for
      next patch.
      69dd7714
  30. 16 4月, 2012 1 次提交
  31. 30 3月, 2012 1 次提交
    • W
      fix a deadlock when qemu cannot start · ff68d6ee
      Wen Congyang 提交于
      When qemu cannot start, we may call qemuProcessStop() twice.
      We have check whether the vm is running at the beginning of
      qemuProcessStop() to avoid libvirt deadlock. We call
      qemuProcessStop() with driver and vm locked. It seems that
      we can avoid libvirt deadlock. But unfortunately we may
      unlock driver and vm in the function qemuProcessKill() while
      vm->def->id is not -1. So qemuProcessStop() will be run twice,
      and monitor will be freed unexpectedly. So we should set
      vm->def->id to -1 at the beginning of qemuProcessStop().
      ff68d6ee
  32. 08 3月, 2012 1 次提交
    • M
      qemu: Fix startupPolicy for snapshot-revert · b819b3b7
      Michal Privoznik 提交于
      Currently, startupPolicy='requisite' was determining cold boot
      by migrateFrom != NULL. That means, if domain was started up
      with migrateFrom set we didn't require disk source path and allowed
      it to be dropped. However, on snapshot-revert domain wasn't migrated
      but according to documentation, requisite should drop disk source
      as well.
      b819b3b7
  33. 02 3月, 2012 1 次提交
    • E
      build: use correct type for pid and similar types · 3e2c3d8f
      Eric Blake 提交于
      No thanks to 64-bit windows, with 64-bit pid_t, we have to avoid
      constructs like 'int pid'.  Our API in libvirt-qemu cannot be
      changed without breaking ABI; but then again, libvirt-qemu can
      only be used on systems that support UNIX sockets, which rules
      out Windows (even if qemu could be compiled there) - so for all
      points on the call chain that interact with this API decision,
      we require a different variable name to make it clear that we
      audited the use for safety.
      
      Adding a syntax-check rule only solves half the battle; anywhere
      that uses printf on a pid_t still needs to be converted, but that
      will be a separate patch.
      
      * cfg.mk (sc_correct_id_types): New syntax check.
      * src/libvirt-qemu.c (virDomainQemuAttach): Document why we didn't
      use pid_t for pid, and validate for overflow.
      * include/libvirt/libvirt-qemu.h (virDomainQemuAttach): Tweak name
      for syntax check.
      * src/vmware/vmware_conf.c (vmwareExtractPid): Likewise.
      * src/driver.h (virDrvDomainQemuAttach): Likewise.
      * tools/virsh.c (cmdQemuAttach): Likewise.
      * src/remote/qemu_protocol.x (qemu_domain_attach_args): Likewise.
      * src/qemu_protocol-structs (qemu_domain_attach_args): Likewise.
      * src/util/cgroup.c (virCgroupPidCode, virCgroupKillInternal):
      Likewise.
      * src/qemu/qemu_command.c(qemuParseProcFileStrings): Likewise.
      (qemuParseCommandLinePid): Use pid_t for pid.
      * daemon/libvirtd.c (daemonForkIntoBackground): Likewise.
      * src/conf/domain_conf.h (_virDomainObj): Likewise.
      * src/probes.d (rpc_socket_new): Likewise.
      * src/qemu/qemu_command.h (qemuParseCommandLinePid): Likewise.
      * src/qemu/qemu_driver.c (qemudGetProcessInfo, qemuDomainAttach):
      Likewise.
      * src/qemu/qemu_process.c (qemuProcessAttach): Likewise.
      * src/qemu/qemu_process.h (qemuProcessAttach): Likewise.
      * src/uml/uml_driver.c (umlGetProcessInfo): Likewise.
      * src/util/virnetdev.h (virNetDevSetNamespace): Likewise.
      * src/util/virnetdev.c (virNetDevSetNamespace): Likewise.
      * tests/testutils.c (virtTestCaptureProgramOutput): Likewise.
      * src/conf/storage_conf.h (_virStoragePerms): Use mode_t, uid_t,
      and gid_t rather than int.
      * src/security/security_dac.c (virSecurityDACSetOwnership): Likewise.
      * src/conf/storage_conf.c (virStorageDefParsePerms): Avoid
      compiler warning.
      3e2c3d8f