From nobody Sun Apr 28 19:55:10 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.zoho.com; dkim=fail spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1495871182272686.2259724460416; Sat, 27 May 2017 00:46:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99ACB8553E; Sat, 27 May 2017 07:46:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D33E918989; Sat, 27 May 2017 07:46:16 +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 CE550180BAF7; Sat, 27 May 2017 07:46:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4R7kAma031602 for ; Sat, 27 May 2017 03:46:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0421317B9D; Sat, 27 May 2017 07:46:10 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F29CC17B88 for ; Sat, 27 May 2017 07:46:08 +0000 (UTC) Received: from m15-114.126.com (m15-114.126.com [220.181.15.114]) by mx1.redhat.com (Postfix) with ESMTP id 2C3CD3DD47 for ; Sat, 27 May 2017 07:46:06 +0000 (UTC) Received: from localhost.localdomain.localdomain (unknown [58.213.111.46]) by smtp7 (Coremail) with SMTP id DsmowAAX2lR0JylZ2R+rJg--.43205S2; Sat, 27 May 2017 15:15:06 +0800 (CST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 99ACB8553E Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=126.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 99ACB8553E Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (1024-bit key) header.d=126.com header.i=@126.com header.b="nXHrAUdw" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2C3CD3DD47 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=126.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=chen_han_xiao@126.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2C3CD3DD47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=ADNVYapsVBdp79h50p MOHd3S8xqmf6YKF/8hsn0yeL0=; b=nXHrAUdwOFgeWpdGqBpqSJ5EPwBJqeOI9d Hb0FWEs0fLIscpMGmYyynq0+vqkXI9RWgtQom1SvT+3mGSzyoVq9MxAAjwt+I0oo Z1KQqHHzNgJ0q6EMPIWcwjodfqea6qV9NDmZRqoiclyodjZ2andN3P62gl9SOasS aBOdWZFdY= From: Chen Hanxiao To: libvir-list@redhat.com Date: Sat, 27 May 2017 15:14:11 +0800 Message-Id: <1495869251-25796-1-git-send-email-chen_han_xiao@126.com> X-CM-TRANSID: DsmowAAX2lR0JylZ2R+rJg--.43205S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Wryxtr4UAFWDWFyUKw4DArb_yoW8Kr1kpr 1rCF9Fq3yfXFnxAw1ktr95ua40g3s7XrWjyrnYga13XF4fXrs7Jr17XF909FyrZr1vvan7 AFyF9ryYkFy3tFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UShFxUUUUU= X-Originating-IP: [58.213.111.46] X-CM-SenderInfo: xfkh0spkdqs5xldrqiyswou0bp/1tbiFhrkrlhgkf-QWwAAsb X-Greylist: Delayed for 00:30:56 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 27 May 2017 07:46:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 27 May 2017 07:46:07 +0000 (UTC) for IP:'220.181.15.114' DOMAIN:'m15-114.126.com' HELO:'m15-114.126.com' FROM:'chen_han_xiao@126.com' RCPT:'' X-RedHat-Spam-Score: 3.599 *** (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_ANBREP_L2, RCVD_IN_PSBL, RP_MATCHES_RCVD, SPF_PASS) 220.181.15.114 m15-114.126.com 220.181.15.114 m15-114.126.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Chen Hanxiao Subject: [libvirt] [PATCH] tools: make setvcpus --maximum imply --config 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 27 May 2017 07:46:21 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Chen Hanxiao Currently --maximum was possible if and only if --config was specified. This patch makes setvcpus --maximum imply --config. Signed-off-by: Chen Hanxiao --- tools/virsh-domain.c | 7 ++++--- tools/virsh.pod | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 5c42021..04ef816 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6819,8 +6819,8 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd) VSH_EXCLUSIVE_OPTIONS_VAR(current, live); VSH_EXCLUSIVE_OPTIONS_VAR(current, config); VSH_EXCLUSIVE_OPTIONS_VAR(guest, config); - - VSH_REQUIRE_OPTION_VAR(maximum, config); + VSH_EXCLUSIVE_OPTIONS_VAR(maximum, live); + VSH_EXCLUSIVE_OPTIONS_VAR(maximum, current); =20 if (config) flags |=3D VIR_DOMAIN_AFFECT_CONFIG; @@ -6829,7 +6829,8 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd) if (guest) flags |=3D VIR_DOMAIN_VCPU_GUEST; if (maximum) - flags |=3D VIR_DOMAIN_VCPU_MAXIMUM; + flags |=3D VIR_DOMAIN_VCPU_MAXIMUM | + VIR_DOMAIN_AFFECT_CONFIG; if (hotpluggable) flags |=3D VIR_DOMAIN_VCPU_HOTPLUGGABLE; =20 diff --git a/tools/virsh.pod b/tools/virsh.pod index e7c513b..bc8b539 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2501,10 +2501,11 @@ flag. Vcpus added to live domains supporting vcpu u= nplug are automatically marked as hotpluggable. =20 The I<--maximum> flag controls the maximum number of virtual cpus that can -be hot-plugged the next time the domain is booted. As such, it must only = be -used with the I<--config> flag, and not with the I<--live> or the I<--curr= ent> -flag. Note that it may not be possible to change the maximum vcpu count if -the processor topology is specified for the guest. +be hot-plugged the next time the domain is booted. As such, it implies +I<--config> be set. Also it can be used with the I<--config> flag, +but not with the I<--live> or the I<--current> flag. Note that it may not +be possible to change the maximum vcpu count if the processor topology +is specified for the guest. =20 =3Ditem B I I [I<--enable>] | [I<--disable>] [[I<--live>] [I<--config>] | [I<--current>]] --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list