From nobody Wed Nov 27 21:43:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=yadro.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1535014471817965.2724735773863; Thu, 23 Aug 2018 01:54:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3076308213E; Thu, 23 Aug 2018 08:54:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F8FF2010CAA; Thu, 23 Aug 2018 08:54:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 959874BB75; Thu, 23 Aug 2018 08:54:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7N8o5ss006320 for ; Thu, 23 Aug 2018 04:50:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8FD1A3091343; Thu, 23 Aug 2018 08:50:05 +0000 (UTC) Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 867DA309132E for ; Thu, 23 Aug 2018 08:50:02 +0000 (UTC) Received: from mta-01.yadro.com (mta-01.yadro.com [89.207.88.251]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9466230832F4 for ; Thu, 23 Aug 2018 08:50:01 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 287B0418FF for ; Thu, 23 Aug 2018 08:50:00 +0000 (UTC) Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6_f47bJ4Z-Nq for ; Thu, 23 Aug 2018 11:49:59 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 4E419404CD for ; Thu, 23 Aug 2018 11:49:59 +0300 (MSK) Received: from localhost (172.17.1.90) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Thu, 23 Aug 2018 11:49:58 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:mime-version:x-mailer:message-id:date :date:subject:subject:from:from:received:received:received; s= mta-01; t=1535014199; x=1536828600; bh=nq3muEHXpEu0Dtd5oheCVoaqu HgwTyIXi6IxpZxXXAM=; b=EVMukK5Ogmlx9QSOQ1N56f/CrcxSNjily8/090+Vg NcynsPW4I4SMwFPMTslhJPjTndYXEi26cIyjBTVpS8FEeVK5Gl36SJABSvS6/wMH wWK6vBymzzG5pDLweCnzvkEJG5qBVauW5utpiKLKTBaMCeWhd0q1cBM8SjYwN3PU BY= X-Virus-Scanned: amavisd-new at yadro.com From: Roman Bolshakov To: Date: Thu, 23 Aug 2018 11:49:48 +0300 Message-ID: <20180823084948.37524-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.1.90] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 23 Aug 2018 08:50:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 23 Aug 2018 08:50:01 +0000 (UTC) for IP:'89.207.88.251' DOMAIN:'mta-01.yadro.com' HELO:'mta-01.yadro.com' FROM:'r.bolshakov@yadro.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, SPF_PASS) 89.207.88.251 mta-01.yadro.com 89.207.88.251 mta-01.yadro.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.44 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-loop: libvir-list@redhat.com Cc: Roman Bolshakov Subject: [libvirt] [PATCH v2] qemu: Start domain on a node without cpu affinity X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 23 Aug 2018 08:54:30 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" qemuProcessInitCpuAffinity prevents a VM from getting started on a platform that uses cpu affinity wrapper stubs e.g. macOS. The patch adds qemuProcessInitCpuAffinity stub on all platforms without HAVE_SCHED_GETAFFINITY or HAVE_BSD_CPU_AFFINITY. Signed-off-by: Roman Bolshakov --- Changes since v1: * Replaced no-op virProcessGetAffinity with qemuProcessInitCpuAffinity stub. src/qemu/qemu_process.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ab749389ee..28d52f01f6 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2343,6 +2343,7 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, /* * To be run between fork/exec of QEMU only */ +#if defined(HAVE_SCHED_GETAFFINITY) || defined(HAVE_BSD_CPU_AFFINITY) static int qemuProcessInitCpuAffinity(virDomainObjPtr vm) { @@ -2413,6 +2414,13 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm) virBitmapFree(hostcpumap); return ret; } +#else +static int +qemuProcessInitCpuAffinity(virDomainObjPtr vm ATTRIBUTE_UNUSED) +{ + return 0; +} +#endif =20 /* set link states to down on interfaces at qemu start */ static int --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list