1. 02 6月, 2014 1 次提交
    • J
      qemu: Process DEVICE_DELETED event in a separate thread · 47f424c2
      Jiri Denemark 提交于
      Currently, we don not acquire any job when removing a device after
      DEVICE_DELETED event was received from QEMU. This means that if there is
      another API running at the time DEVICE_DELETED is delivered and the API
      acquired a job, we may happily change the definition of the domain the
      API is working with whenever it unlocks the domain object (e.g., to talk
      with its monitor). That said, we have to acquire a job before finishing
      device removal to make things safe. However, doing so in the main event
      loop would cause a deadlock so we need to move most of the event handler
      into a separate thread.
      
      Another good reason for both acquiring a job and handling the event in a
      separate thread is that we currently remove a device backend immediately
      after removing its frontend while we should only remove the backend once
      we already received DEVICE_DELETED event. That is, we will have to talk
      to QEMU monitor from the event handler.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      47f424c2
  2. 14 5月, 2014 2 次提交
    • J
      qemu: Make qemuDomainObjBeginNestedJob static · 1643b158
      Jiri Denemark 提交于
      It's only used within qemu_domain.c.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      1643b158
    • R
      qemu: extract PCI handling structs · c453f2d0
      Roman Bogorodskiy 提交于
      Introduce new files (domain_addr.[ch]) to provide
      an API for domain device handling that could be
      shared across the drivers.
      
      A list of data types were extracted and moved there:
      
       qemuDomainPCIAddressBus -> virDomainPCIAddressBus
       qemuDomainPCIAddressBusPtr -> virDomainPCIAddressBusPtr
       _qemuDomainPCIAddressSet -> virDomainPCIAddressSet
       qemuDomainPCIAddressSetPtr -> virDomainPCIAddressSetPtr
       qemuDomainPCIConnectFlags -> virDomainPCIConnectFlags
      
      Also, move the related definitions and macros.
      c453f2d0
  3. 07 5月, 2014 1 次提交
  4. 24 4月, 2014 1 次提交
  5. 18 3月, 2014 1 次提交
  6. 17 2月, 2014 1 次提交
    • M
      qemu: Implement VIR_DOMAIN_TAINT_HOOK · 3b2c2794
      Michal Privoznik 提交于
      Currently, there's just one place where we care if hook script is
      changing the domain XML: migration hook for incoming migration. In
      all other places where a hook script is executed, we don't read the
      XML back from the script.
      
      Anyway, the hook script can alter domain XML and hence we should taint
      it if the script did.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3b2c2794
  7. 10 2月, 2014 1 次提交
  8. 07 2月, 2014 1 次提交
  9. 10 12月, 2013 1 次提交
  10. 18 10月, 2013 1 次提交
  11. 11 10月, 2013 1 次提交
    • M
      qemu: Introduce qemuDomainDefCheckABIStability · 7d704812
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=994364
      
      Whenever we check for ABI stability, we have new xml (e.g. provided by
      user, or obtained from snapshot, whatever) which we compare to old xml
      and see if ABI won't break. However, if the new xml was produced via
      virDomainGetXMLDesc(..., VIR_DOMAIN_XML_MIGRATABLE) it lacks some
      devices, e.g. 'pci-root' controller. Hence, the ABI stability check
      fails even though it is stable. Moreover, we can't simply fix
      virDomainDefCheckABIStability because removing the correct devices is
      task for the driver. For instance, qemu driver wants to remove the usb
      controller too, while LXC driver doesn't. That's why we need special
      qemu wrapper over virDomainDefCheckABIStability which removes the
      correct devices from domain XML, produces MIGRATABLE xml and calls the
      check ABI stability function.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7d704812
  12. 19 8月, 2013 1 次提交
    • M
      qemu: Drop qemuDomainMemoryLimit · 16bcb3b6
      Michal Privoznik 提交于
      This function is to guess the correct limit for maximal memory
      usage by qemu for given domain. This can never be guessed
      correctly, not to mention all the pains and sleepless nights this
      code has caused. Once somebody discovers algorithm to solve the
      Halting Problem, we can compute the limit algorithmically. But
      till then, this code should never see the light of the release
      again.
      16bcb3b6
  13. 01 8月, 2013 1 次提交
    • G
      qemu: add helper functions for diskchain checking · d7b7aa2c
      Guannan Ren 提交于
      *src/util/virstoragefile.c: Add a helper function to get
      the first name of missing backing files, if the name is NULL,
      it means the diskchain is not broken.
      *src/qemu/qemu_domain.c: qemuDiskChainCheckBroken(disk) to
      check if its chain is broken
      d7b7aa2c
  14. 20 7月, 2013 1 次提交
  15. 18 7月, 2013 1 次提交
  16. 08 7月, 2013 1 次提交
  17. 03 7月, 2013 2 次提交
  18. 13 6月, 2013 1 次提交
  19. 14 5月, 2013 1 次提交
    • E
      qemu: use bool in monitor struct · 764bb5e5
      Eric Blake 提交于
      Follows on the heels of other bool cleanups, such as commit 93002b98.
      
      * src/qemu/qemu_monitor.h (qemuMonitorOpen, qemuMonitorOpenFD):
      Update json parameter type.
      * src/qemu/qemu_monitor.c (qemuMonitorOpen, qemuMonitorOpenFD):
      Likewise.
      (_qemuMonitor): Adjust field type.
      * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Likewise.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLParse): Adjust
      client.
      * src/qemu/qemu_process.c (qemuProcessStart): Likewise.
      * tests/qemumonitortestutils.c (qemuMonitorTestNew): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      764bb5e5
  20. 03 5月, 2013 1 次提交
    • E
      build: avoid non-portable cast of pthread_t · 22d12905
      Eric Blake 提交于
      POSIX says pthread_t is opaque.  We can't guarantee if it is scaler
      or a pointer, nor what size it is; and BSD differs from Linux.
      We've also had reports of gcc complaining on attempts to cast it,
      if we use a cast to the wrong type (for example, pointers have to be
      cast to void* or intptr_t before being narrowed; while casting a
      function return of scalar pthread_t to void* triggers a different
      warning).
      
      Give up on casts, and use unions to get at decent bits instead.  And
      rather than futz around with figuring which 32 bits of a potentially
      64-bit pointer are most likely to be unique, convert the rest of
      the code base to use 64-bit values when using a debug id.
      
      Based on a report by Guido Günther against kFreeBSD, but with a
      fix that doesn't regress commit 4d970fd2 for FreeBSD.
      
      * src/util/virthreadpthread.c (virThreadSelfID, virThreadID): Use
      union to get at a decent bit representation of thread_t bits.
      * src/util/virthread.h (virThreadSelfID, virThreadID): Alter
      signature.
      * src/util/virthreadwin32.c (virThreadSelfID, virThreadID):
      Likewise.
      * src/qemu/qemu_domain.h (qemuDomainJobObj): Alter type of owner.
      * src/qemu/qemu_domain.c (qemuDomainObjTransferJob)
      (qemuDomainObjSetJobPhase, qemuDomainObjReleaseAsyncJob)
      (qemuDomainObjBeginNestedJob, qemuDomainObjBeginJobInternal): Fix
      clients.
      * src/util/virlog.c (virLogFormatString): Likewise.
      * src/util/vireventpoll.c (virEventPollInterruptLocked):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      22d12905
  21. 16 4月, 2013 1 次提交
  22. 05 4月, 2013 1 次提交
    • P
      qemu: Record the default NIC model in the domain XML · a68d6726
      Peter Krempa 提交于
      This patch implements the devices post parse callback and uses it to fill
      the default qemu network card model into the XML if none is specified.
      
      Libvirt assumes that the network card model for qemu is the "rtl8139".
      Record this in the XML using the new callback to avoid user
      confusion.
      a68d6726
  23. 14 3月, 2013 1 次提交
    • V
      S390: QEMU driver support for CCW addresses · 608512b2
      Viktor Mihajlovski 提交于
      This commit adds the QEMU driver support for CCW addresses. The
      current QEMU only allows virtio devices to be attached to the
      CCW bus. We named the new capability indicating that support
      QEMU_CAPS_VIRTIO_CCW accordingly.
      
      The fact that CCW devices can only be assigned to domains with a
      machine type of s390-ccw-virtio requires a few extra checks for
      machine type in qemu_command.c on top of querying
      QEMU_CAPS_VIRTIO_{CCW|S390}.
      
      The majority of the new functions deals with CCW address generation
      and management.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      608512b2
  24. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  25. 01 3月, 2013 2 次提交
    • D
      Revert hack for autodestroy in qemuProcessStop · 9c4ecb3e
      Daniel P. Berrange 提交于
      This reverts the hack done in
      
      commit 568a6cda
      Author: Jiri Denemark <jdenemar@redhat.com>
      Date:   Fri Feb 15 15:11:47 2013 +0100
      
          qemu: Avoid deadlock in autodestroy
      
      since we now have a fix which avoids the deadlock scenario
      entirely
      9c4ecb3e
    • J
      qemu: Make sure qemuProcessStart is run within a job · e4e28220
      Jiri Denemark 提交于
      qemuProcessStart expects to be run with a job already set and every
      caller except for qemuMigrationPrepareAny use it correctly. This bug can
      be observed in libvirtd logs during incoming migration as
      
          warning : qemuDomainObjEnterMonitorInternal:979 : This thread seems
          to be the async job owner; entering monitor without asking for a
          nested job is dangerous
      e4e28220
  26. 23 2月, 2013 2 次提交
    • M
      Introduce NBD migration cookie · 121d4cfb
      Michal Privoznik 提交于
      This migration cookie is meant for two purposes. The first is to be sent
      in begin phase from source to destination to let it know we support new
      implementation of VIR_MIGRATE_NON_SHARED_{DISK,INC} so destination can
      start NBD server. Then, the second purpose is, destination can let us
      know, on which port the NBD server is running.
      121d4cfb
    • J
      qemu: Parse more fields from query-migrate QMP command · 4121a77c
      Jiri Denemark 提交于
      As a side effect, this also fixes reporting disk migration process.
      It was added to memory migration progress, which was wrong. Disk
      progress has dedicated fields in virDomainJobInfo structure.
      4121a77c
  27. 21 2月, 2013 1 次提交
    • J
      qemu: Avoid deadlock in autodestroy · 568a6cda
      Jiri Denemark 提交于
      Since closeCallbacks were turned into virObjectLockable, we can no
      longer call virQEMUCloseCallbacks APIs from within a registered close
      callback.
      568a6cda
  28. 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
  29. 08 2月, 2013 1 次提交
  30. 05 1月, 2013 2 次提交
  31. 21 12月, 2012 1 次提交
  32. 29 11月, 2012 2 次提交
  33. 12 11月, 2012 1 次提交
    • M
      qemu: Allow migration to be cancelled at prepare phase · ab5e7d49
      Michal Privoznik 提交于
      Currently, if user calls virDomainAbortJob we just issue
      'migrate_cancel' and hope for the best. However, if user calls
      the API in wrong phase when migration hasn't been started yet
      (perform phase) the cancel request is just ignored. With this
      patch, the request is remembered and as soon as perform phase
      starts, migration is cancelled.
      ab5e7d49
  34. 03 11月, 2012 1 次提交