From nobody Mon Feb 9 01:51:57 2026 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561029773; cv=none; d=zoho.com; s=zohoarc; b=mYwhR00Y4sxuBGSZXiUCvFN89/EpnpGN8a89dzs2wFbl/q0tOF1R80gSyzcv08bCmOaghwaIWyNgt5aHwfiZu+XXKA4kyBbZLjnn0FzzHISAlCiPvLrfEF8HTKBNsmdjbSMHKl2sPAG8sTtuKAMoaNK8HxsK/XxyKaAId5rfdn8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561029773; 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:ARC-Authentication-Results; bh=tEO249WVjrVyh5B2URgGEmHvoSexKSwy/anS69uhqEQ=; b=WumCYWOh9sfrDODXhiFFlY3GpYlf2Gyvk8n74KdRV412LA8ayts42vpKLny32GdEs8oohACdJ6G/ttUa/1cRDyBMhxX2ExVtL9YFDshfcBuyRkF/Y6Hth6gIFBSNVSQbtwLuiPRCD3d+jcXcIMyLwb2y9qvIgMqSYg4/l4RwTvY= ARC-Authentication-Results: i=1; mx.zoho.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=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1561029773164576.4333489171389; Thu, 20 Jun 2019 04:22:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D583B81130; Thu, 20 Jun 2019 11:22:39 +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 A577A19C4F; Thu, 20 Jun 2019 11:22:35 +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 423A7C57E; Thu, 20 Jun 2019 11:22:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5KBMVVv031524 for ; Thu, 20 Jun 2019 07:22:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2633F18967; Thu, 20 Jun 2019 11:22:31 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5ABA84E9 for ; Thu, 20 Jun 2019 11:22:30 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 20 Jun 2019 13:22:26 +0200 Message-Id: <7f993e866e758f48453db11e83b39f3c68ce1034.1561029563.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] qemu: monitor: Remove text monitor support for cpu hot(un)plug 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 20 Jun 2019 11:22:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The "cpu-add" command is supported in all supported qemu versions and cpu unplug did not work at all until the new cpu unplug approach (using device_add/del) was implemented. Remove the support for falling back to the text monitor. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor_json.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 4eca75ecc9..6d4f119a35 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2979,8 +2979,9 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon, "i:id", cpu, NULL); } else { - /* offlining is not yet implemented in qmp */ - goto fallback; + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("vCPU unplug is not supported by this qemu")); + goto cleanup; } if (!cmd) goto cleanup; @@ -2988,20 +2989,12 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon, if ((ret =3D qemuMonitorJSONCommand(mon, cmd, &reply)) < 0) goto cleanup; - if (qemuMonitorJSONHasError(reply, "CommandNotFound")) - goto fallback; - else - ret =3D qemuMonitorJSONCheckError(cmd, reply); + ret =3D qemuMonitorJSONCheckError(cmd, reply); cleanup: virJSONValueFree(cmd); virJSONValueFree(reply); return ret; - - fallback: - VIR_DEBUG("no QMP support for cpu_set, trying HMP"); - ret =3D qemuMonitorTextSetCPU(mon, cpu, online); - goto cleanup; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list