From nobody Fri Dec 19 16:07:13 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678274283; cv=none; d=zohomail.com; s=zohoarc; b=kpcpdv5LHlwm6gIjKztReYMwdexjlL5vR4OoFIag0aTZgPvNXY1JWQYWHZvTBb3R+kSY01gNnoH9FBS1YGSPOnAMxZ1p6YfdvkSMThwuHyaBmWNKVxW9+BWhyVonRgx1oiM5MOERfARpB6WQi/dePCh5KaSUd36TjKf8PgCppRM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678274283; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=H8Hkx7SnMNMr+xzqEaDK52rtmXwMtZHFCQW4D7gzBug=; b=Jl53gUQdnUWKh8789TTBIdIitp3uU2L7z7TcaH8Ag20fjzJO2yQlTsQzTnYjakItSllEpdBOBt5RDQsAOqbU79ibPBH9y7VB7WQPgIefPJYXkyABTzV5/E/hJclHjOAmVG7ySKhu/oCq3IaFfwbjrdn23RUsOo4EjrOHjkJ6rh0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678274283814672.129504033234; Wed, 8 Mar 2023 03:18:03 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-605-XGhB3_D6Og6yIzQM87PtGQ-1; Wed, 08 Mar 2023 06:17:22 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FD61802C18; Wed, 8 Mar 2023 11:17:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08392112132D; Wed, 8 Mar 2023 11:17:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AAC551946A44; Wed, 8 Mar 2023 11:17:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2261019465B1 for ; Wed, 8 Mar 2023 11:14:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 087EB1121331; Wed, 8 Mar 2023 11:14:49 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E535112132D for ; Wed, 8 Mar 2023 11:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678274282; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=H8Hkx7SnMNMr+xzqEaDK52rtmXwMtZHFCQW4D7gzBug=; b=fg+Rn8WKTBcskLhvF1y1BNydwvSCYRGP7wRJnevswbbtC0hxU8MmxoElc4h8BsgV6NYwuU WtXpinDlYO3q/T2V+hLh29FzoF6NNO4a6cLLK5O1+/EgVnRPxDAwxxrSG2Hfl3NJbfFZek m7XI5uNgP/XpWGQrAaFXr1vi8sLaFqk= X-MC-Unique: XGhB3_D6Og6yIzQM87PtGQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 09/14] qemu: Fix qemuDomainGetEmulatorPinInfo() Date: Wed, 8 Mar 2023 12:14:36 +0100 Message-Id: <375ee4ad94136997f4b7cc3865c43766333d19af.1678274036.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678274285015100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The order of pinning priority (at least for emulator thread) was set by v1.2.15-rc1~58 (for cgroup code). But later, when automatic placement was implemented into qemuDomainGetEmulatorPinInfo(), the priority was not honored. Now that we have this priority code in a separate function, we can just call that and avoid this type of error. Fixes: 776924e37649f2d47acd805746d5fd9325212ea5 Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- src/qemu/qemu_driver.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c546e35953..0a6f96e68c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4574,14 +4574,9 @@ qemuDomainGetEmulatorPinInfo(virDomainPtr dom, if (live) autoCpuset =3D QEMU_DOMAIN_PRIVATE(vm)->autoCpuset; =20 - if (def->cputune.emulatorpin) { - cpumask =3D def->cputune.emulatorpin; - } else if (def->cpumask) { - cpumask =3D def->cpumask; - } else if (vm->def->placement_mode =3D=3D VIR_DOMAIN_CPU_PLACEMENT_MOD= E_AUTO && - autoCpuset) { - cpumask =3D autoCpuset; - } else { + if (!(cpumask =3D qemuDomainEvaluateCPUMask(def, + def->cputune.emulatorpin, + autoCpuset))) { if (!(bitmap =3D virHostCPUGetAvailableCPUsBitmap())) goto cleanup; cpumask =3D bitmap; --=20 2.39.2