1. 19 6月, 2019 1 次提交
  2. 17 6月, 2019 1 次提交
  3. 14 6月, 2019 1 次提交
    • J
      qemu: Try harder to remove pr-helper object and kill pr-helper process · 7a232286
      Jie Wang 提交于
      If libvirt receives DISCONNECTED event and prDaemonRunning is set
      to false, and qemuDomainRemoveDiskDevice() is performing in the
      meantime, then qemuDomainRemoveDiskDevice() will fail to remove
      pr-helper object because prDaemonRunning is false. But removing
      that check from qemuHotplugRemoveManagedPR() is not enough,
      because after removing the object through monitor the
      qemuProcessKillManagedPRDaemon() is called which contains the
      same check. Thus the pr-helper process might be left behind.
      Signed-off-by: NJie Wang <wangjie88@huawei.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      7a232286
  4. 13 6月, 2019 1 次提交
  5. 12 6月, 2019 7 次提交
  6. 10 6月, 2019 14 次提交
  7. 06 6月, 2019 1 次提交
  8. 04 6月, 2019 5 次提交
    • A
      qemu: Drop cleanup label from qemuProcessInitCpuAffinity() · de563ebc
      Andrea Bolognani 提交于
      We're using VIR_AUTOPTR() for everything now, plus the
      cleanup section was not doing anything useful anyway.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      de563ebc
    • A
      qemu: Fix leak in qemuProcessInitCpuAffinity() · 2f2254c7
      Andrea Bolognani 提交于
      In two out of three scenarios we are cleaning up properly after
      ourselves, but commit 5f2212c0 has changed the remaining one
      in a way that caused it to start leaking cpumapToSet.
      
      Refactor the logic so that cpumapToSet is always a freshly
      allocated bitmap that gets cleaned up automatically thanks to
      VIR_AUTOPTR(); this also allows us to remove the hostcpumap
      variable.
      Reported-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      2f2254c7
    • A
      qemu: Fix qemuProcessInitCpuAffinity() · 5f2212c0
      Andrea Bolognani 提交于
      Ever since the feature was introduced with commit 0f8e7ae3,
      it has contained a logic error in that it attempted to use a NUMA
      node map where a CPU map was expected.
      
      Because of that, guests using <numatune> might fail to start:
      
        # virsh start guest
        error: Failed to start domain guest
        error: cannot set CPU affinity on process 40055: Invalid argument
      
      This was particularly easy to trigger on POWER 8 machines, where
      secondary threads always show up as offline in the host: having
      
        <numatune>
          <memory mode='strict' placement='static' nodeset='1'/>
        </numatune>
      
      in the guest configuration, for example, would result in libvirt
      trying to set the process affinity so that it would prefer
      running on CPU 1, but since that's a secondary thread and thus
      shows up as offline, the operation would fail, and so would
      starting the guest.
      
      Use the newly introduced virNumaNodesetToCPUset() to convert the
      NUMA node map to a CPU map, which in the example above would be
      48,56,64,72,80,88 - a valid input for virProcessSetAffinity().
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1703661Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      5f2212c0
    • J
      qemu: Check TSC frequency before starting QEMU · 7da62c91
      Jiri Denemark 提交于
      When migrating a domain with invtsc CPU feature enabled, the TSC
      frequency of the destination host must match the frequency used when the
      domain was started on the source host or the destination host has to
      support TSC scaling.
      
      If the frequencies do not match and the destination host does not
      support TSC scaling, QEMU will fail to set the right TSC frequency when
      starting vCPUs on the destination and thus migration will fail. However,
      this is quite late since both host might have spent significant time
      transferring memory and perhaps even storage data.
      
      By adding the check to libvirt we can let migration fail before any data
      starts to be sent over. If for some reason libvirt is unable to detect
      the host's TSC frequency or scaling support, we'll just let QEMU try and
      the migration will either succeed or fail later.
      
      Luckily, we mandate TSC frequency to be explicitly set in the domain XML
      to even allow migration of domains with invtsc. We can just check
      whether the requested frequency is compatible with the current host
      before starting QEMU.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1641702Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      7da62c91
    • J
      qemu: Make virQEMUCapsProbeHostCPUForEmulator more generic · dd3fc650
      Jiri Denemark 提交于
      The function is renamed as virQEMUCapsProbeHostCPU and it does not get
      the list of allowed CPU models from qemuCaps anymore. This is
      responsibility is moved to the caller. The result is just a very thin
      wrapper around virCPUGetHost mostly required mocking in tests.
      
      The generic function is used in place of a direct call to virCPUGetHost
      in virQEMUCapsInitHostCPUModel to make sure tests don't accidentally
      probe host CPU.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      dd3fc650
  9. 03 6月, 2019 9 次提交