]> xenbits.xensource.com Git - libvirt.git/commit
qemu: fix recording of vCPU pids for MTTCG
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 17 Oct 2018 13:14:32 +0000 (14:14 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 29 Jan 2019 16:31:04 +0000 (16:31 +0000)
commit34f77437da884f9cf0e2450f25f373b17cf527e2
treea1dc2fbc6804cb5004b964a918be9eb29a027247
parent38757744c2e06ace3dc95f31ac1ab0c9c45ba6b7
qemu: fix recording of vCPU pids for MTTCG

MTTCG is the new multi-threaded impl of TCG which follows
KVM in having one host OS thread per vCPU. Historically
we have discarded all PIDs reported for TCG guests, but
we must now selectively honour this data.

We don't have anything in the domain XML that indicates
whether a guest is using TCG or MTTCG. While QEMU does
have an option (-accel tcg,thread=single|multi), it is
not desirable to expose this in libvirt. QEMU will
automatically use MTTCG when the host/guest architecture
pairing is known to be safe. Only developers of QEMU TCG
have a strong reason to override this logic.

Thus we use two sanity checks to decide if the vCPU
PID information is usable. First we see if the PID
duplicates the main emulator PID, and second we see
if the PID duplicates any other vCPUs.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_domain.c