1. 12 1月, 2016 1 次提交
    • M
      qemu: change qemuFindAgentConfig return type · d5762cc0
      Michal Privoznik 提交于
      While this is no functional change, whole channel definition is
      going to be needed very soon. Moreover, while touching this obey
      const correctness rule in qemuAgentOpen() - so far it was passed
      regular pointer to channel config even though the function is
      expected to not change pointee at all. Pass const pointer
      instead.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d5762cc0
  2. 09 1月, 2016 1 次提交
  3. 08 1月, 2016 1 次提交
  4. 16 12月, 2015 1 次提交
  5. 15 12月, 2015 1 次提交
  6. 14 12月, 2015 1 次提交
  7. 09 12月, 2015 4 次提交
  8. 05 12月, 2015 1 次提交
    • D
      qemu: include hostname in QEMU log files · 45c7b9e6
      Daniel P. Berrange 提交于
      Often when debugging bug reports one is given a copy of the file
      from /var/log/libvirt/qemu/$NAME.log along with other supporting
      files. In a number of cases I've been given sets of files which
      were from different machines. Including the hostname in the QEMU
      log file will help identify when the bug reporter is providing
      bad information.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      45c7b9e6
  9. 01 12月, 2015 1 次提交
    • W
      qemu_agent: fix deadlock in qemuProcessHandleAgentEOF · fe51174f
      Wang Yufei 提交于
      If VM A is shutdown a by qemu agent at appoximately the same time
      an agent EOF of VM A happened, there's a chance that deadlock may occur:
      
      qemuProcessHandleAgentEOF in main thread
      A)  priv->agent = NULL; //A happened before B
      
          //deadlock when we get agent lock which's held by worker thread
          qemuAgentClose(agent);
      
      qemuDomainObjExitAgent called by qemuDomainShutdownFlags in worker thread
      B)  hasRefs = virObjectUnref(priv->agent); // priv->agent is NULL,
                                                 // return false
          if (hasRefs)
              virObjectUnlock(priv->agent); //agent lock will not be released here
      
      In order to resolve, during EOF close the agent first, then set priv->agent
      to NULL to fix the deadlock.
      
      This essentially reverts commit id '1020a504'. It's also of note that commit
      id '362d0477' notes a possible/rare deadlock similar to what was seen in
      the monitor in commit id '25f582e3'. However, it seems interceding changes
      including commit id 'd960d06f' should remove the deadlock issue.
      
      With this change, if EOF is called:
      
          Get VM lock
          Check if !priv->agent || priv->beingDestroyed, then unlock VM
          Call qemuAgentClose
          Unlock VM
      
      When qemuAgentClose is called
          Get Agent lock
          If Agent->fd open, close it
          Unlock Agent
          Unref Agent
      
      qemuDomainObjEnterAgent
          Enter with VM lock
          Get Agent lock
          Increase Agent refcnt
          Unlock VM
      
      After running agent command, calling qemuDomainObjExitAgent
          Enter with Agent lock
          Unref Agent
          If not last reference, unlock Agent
          Get VM lock
      
      If we were in the middle of an EnterAgent, call Agent command, and
      ExitAgent sequence and the EOF code is triggered, then the EOF code
      can get the VM lock, make it's checks against !priv->agent ||
      priv->beingDestroyed, and call qemuAgentClose. The CloseAgent
      would wait to get agent lock. The other thread then will eventually
      call ExitAgent, release the Agent lock and unref the Agent. Once
      ExitAgent releases the Agent lock, AgentClose will get the Agent
      Agent lock, close the fd, unlock the agent, and unref the agent.
      The final unref would cause deletion of the agent.
      Signed-off-by: NWang Yufei <james.wangyufei@huawei.com>
      Reviewed-by: NRen Guannan <renguannan@huawei.com>
      fe51174f
  10. 26 11月, 2015 6 次提交
  11. 25 11月, 2015 3 次提交
  12. 24 11月, 2015 1 次提交
    • J
      qemu: pass the asyncJob to qemuProcessStartCPUs · 668a0fef
      Ján Tomko 提交于
      Now that new domains are started inside a QEMU_ASYNC_JOB_START job,
      we need to pass it down to qemuProcessStartCPUs too.
      
      This removes the warning:
      qemuDomainObjEnterMonitorInternal:1750 : This thread seems to be the
      async job owner; entering monitor without asking for a nested job is
      dangerous
      
      Introduced by commit 04c721f2, before that this code path was only
      executed with QEMU_ASYNC_JOB_NONE.
      
      (This code is not executed on migration, because qemuMigrationPrepareAny
       sets the VIR_QEMU_PROCESS_START_PAUSED flag.)
      668a0fef
  13. 19 11月, 2015 14 次提交
  14. 12 11月, 2015 1 次提交
  15. 10 11月, 2015 1 次提交
  16. 04 11月, 2015 2 次提交