From patchwork Sat Jul 1 14:57:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benyu Xu X-Patchwork-Id: 783086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x0GrN1gDJz9sQl for ; Sun, 2 Jul 2017 01:04:04 +1000 (AEST) Received: from localhost ([::1]:54832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRJwH-0005aj-Vu for incoming@patchwork.ozlabs.org; Sat, 01 Jul 2017 11:04:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRJtT-0003s2-CJ for qemu-devel@nongnu.org; Sat, 01 Jul 2017 11:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRJtR-0003sN-K9 for qemu-devel@nongnu.org; Sat, 01 Jul 2017 11:01:07 -0400 Received: from mga05.intel.com ([192.55.52.43]:57206) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dRJtR-0003rM-AT for qemu-devel@nongnu.org; Sat, 01 Jul 2017 11:01:05 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP; 01 Jul 2017 08:01:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.40,291,1496127600"; d="scan'208"; a="1167015492" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.48.64]) by fmsmga001.fm.intel.com with ESMTP; 01 Jul 2017 08:01:01 -0700 From: Benyu Xu To: qemu-devel@nongnu.org Date: Sat, 1 Jul 2017 22:57:10 +0800 Message-Id: <1498921030-23255-4-git-send-email-benyux.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1498921030-23255-1-git-send-email-benyux.xu@intel.com> References: <1498921030-23255-1-git-send-email-benyux.xu@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.43 Subject: [Qemu-devel] [PATCH 3/3] add option -vcpupin into qemu-options. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tianyu.lan@intel.com, haozhong.zhang@intel.com, kevin.tian@intel.com, crosthwaite.peter@gmail.com, xudong.hao@intel.com, eddie.dong@intel.com, binx.wu@intel.com, gordon.jin@intel.com, benyux.xu@intel.com, pbonzini@redhat.com, hao.l.li@intel.com, benjamin_xby@163.com, hongbo.wang@intel.com, rth@twiddle.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Benyu Xu --- qemu-options.hx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 297bd8a..0c2cec3 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -141,6 +141,25 @@ given, the total number of CPUs @var{n} can be omitted. @var{maxcpus} specifies the maximum number of hotpluggable CPUs. ETEXI +DEF("vcpupin", HAS_ARG, QEMU_OPTION_vcpupin, + "-vcpupin [pcpu_id_list]\n" + " use the host's physical or logical processor(pcpu) id\n" + " to made a pcpu id list to set cpu affinity.\n" + " here use ',' to seperate the single id or id sequence,\n" + " use '-' as a id sequence's connector,\n" + " eg. qemu ... -smp 8 -vcpupin 0,2,4,6-10 ... \n" + " this means qemu will pin 8 vcpus one by one and 1:1 to\n" + " pcpu 0,2,4,6,7,8,9,10\n" + " if pcpu_id_list=\"auto\", it means the pcpu id list is\n" + " 0,1,...,[smp_cpu_num-1]\n", QEMU_ARCH_ALL) +STEXI +@item -vcpupin @var{pcpu_id_list} +@findex -vcpupin +Pin the vcpus to pcpus(set CPU affinity). Use pcpus' id 0,1,2,3...etc. to +make a valid pcpu id list, the vcpus will sequentially pin to the pcpus of +this list 1:1 , this means we should use the @option{-smp} to allocate vcpus. +ETEXI + DEF("numa", HAS_ARG, QEMU_OPTION_numa, "-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node]\n" "-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node]\n"