From nobody Sun Feb 8 18:43:13 2026 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=1678812814; cv=none; d=zohomail.com; s=zohoarc; b=LO6/tnAHSJdSN0AtMR7wYHmz4vHjwiExG4V73fX9E5k9xuN30no+0EX7ROwAeGaSPWDLpozuiMfYKVAY/nnyZm/l47jLLQsbPAEOZt6SJjoji45GxTqFMllOuQLRt8KLEDPvpEVfs3sYbBqFfHHPkf85PmcVEwYKWzXtBvAGl7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678812814; 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=MSAsvI/ZUduep7EiZCbFtLNx9xa+ycxksJhvH50KY+s=; b=T3jJeJw81526Fl2diVjas0JEKsk208etjG6H1yDPNkRDZ16QBw/dYUyZWFtjgRJebu8JTZ06Lql8FPTky4wm6tP2ozKllJp9NfbtdAC9cKl6tGBP+N7TONdPgNEkZ0YbIUNC7T/0ZTje71CpRyAYElbbXQuthO9lrt5t6iOMQdY= 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 1678812814226372.33397198117257; Tue, 14 Mar 2023 09:53:34 -0700 (PDT) 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-113-1kk3m8YMNImusmNamLma9Q-1; Tue, 14 Mar 2023 12:53:29 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2CDB185CC0B; Tue, 14 Mar 2023 16:53:19 +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 0D33540C1434; Tue, 14 Mar 2023 16:53:19 +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 90FEC19472E4; Tue, 14 Mar 2023 16:53:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E138D19465A3 for ; Tue, 14 Mar 2023 16:52:58 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D7BB02166B33; Tue, 14 Mar 2023 16:52:36 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DD4D2166B26 for ; Tue, 14 Mar 2023 16:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678812813; 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=MSAsvI/ZUduep7EiZCbFtLNx9xa+ycxksJhvH50KY+s=; b=ZTLDd/37XhAhpR1QP8wzFGMhTSUIR805JI2gDv5IHGQb1z5fzs+B4Jhr/Ah/jcSFE1/PGY nwVP1CXG7emaAphgMG50MI3cjltCdrxFKuhpCbDY3R+oRTj5denWej9zFqE8iuOOC4BWgR VznZBDmQFrMjBQFQ+JLUByhVgNO4vlA= X-MC-Unique: 1kk3m8YMNImusmNamLma9Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 09/15] qemu: Fix qemuDomainGetEmulatorPinInfo() Date: Tue, 14 Mar 2023 17:52:23 +0100 Message-Id: <2798aaec3dbc49fb42e2688292d7d7e41b1f2d34.1678812657.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.2 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: 1678812816161100001 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 fd8136be37..754b2a8192 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