From nobody Fri Apr 26 23:55:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1599831146; cv=none; d=zohomail.com; s=zohoarc; b=j1qbpmuvIJeZxUc/XrC153VT1gOOL/YMapYQlm5XxFaubkb6BPXtHjX5E2Si040GovfbmR+ue3EWcMCotO/nILHouaAd04k81x+SCQhgk8rbI78zgVXC75OY9pK1Uh7FfkFF3BJ/7OeeECZ293XSqby1xV7X0+XIEsOYgl0pqIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599831146; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Hft9ljPN8fzBYHbXFry5QtXQ89rMCsuUCfXuUh6TXJE=; b=htytQatvrOOmK9tSXsne/tDIoNfm/p3X3PWHrc1LRXXVb75+5o3kQdW7ZlOVwlv3BnglEJFa1y8Dlb6DGcTrfDRGO83aFR5ccbTsA0eKjIz4LDLeQcnVNVXnJOdby8MMWJtaDVi7qwMxhawWDlBp0S/n0bNzcNS4npuTRviLHjo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1599831146048175.90672087460996; Fri, 11 Sep 2020 06:32:26 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-557-bJ2V37USNg6quq46zn3HQg-1; Fri, 11 Sep 2020 09:32:21 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D711E1882FA8; Fri, 11 Sep 2020 13:32:15 +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 439717C0BA; Fri, 11 Sep 2020 13:32:15 +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 CD4FA1832FC2; Fri, 11 Sep 2020 13:32:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08BDWB81026469 for ; Fri, 11 Sep 2020 09:32:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id BBA7410013D9; Fri, 11 Sep 2020 13:32:11 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEFDD10023A7; Fri, 11 Sep 2020 13:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599831144; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Hft9ljPN8fzBYHbXFry5QtXQ89rMCsuUCfXuUh6TXJE=; b=UVMwX+0La8JWQ3GT7GZN7UKVN32qIS4HlqIQZV9zVOrlK9FM1W4T6HJubgWUxrmKw83usN h99L+BvBwYN45QyxC7dY3Wvz2eqvoGmkvQVzx7y/Z59fGP/ZPXGe4/Aja88O96fr8YcI2x StjblwU7iFxh5LBi7yaeD2DnWtH0ZLs= X-MC-Unique: bJ2V37USNg6quq46zn3HQg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Subject: [PATCH] smp: drop support for deprecated (invalid topologies) Date: Fri, 11 Sep 2020 09:32:02 -0400 Message-Id: <20200911133202.938754-1-imammedo@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, pbonzini@redhat.com, mst@redhat.com, ehabkost@redhat.com, rth@twiddle.net 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" it's was deprecated since 3.1 Support for invalid topologies is removed, the user must ensure that topologies described with -smp include all possible cpus, i.e. (sockets * cores * threads) =3D=3D maxcpus or QEMU will exit with error. Signed-off-by: Igor Mammedov Acked-by:=20 --- docs/system/deprecated.rst | 26 +++++++++++++------------- hw/core/machine.c | 16 ++++------------ hw/i386/pc.c | 16 ++++------------ 3 files changed, 21 insertions(+), 37 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 122717cfee..d737728fab 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -47,19 +47,6 @@ The 'file' driver for drives is no longer appropriate fo= r character or host devices and will only accept regular files (S_IFREG). The correct driver for these file types is 'host_cdrom' or 'host_device' as appropriate. =20 -``-smp`` (invalid topologies) (since 3.1) -''''''''''''''''''''''''''''''''''''''''' - -CPU topology properties should describe whole machine topology including -possible CPUs. - -However, historically it was possible to start QEMU with an incorrect topo= logy -where *n* <=3D *sockets* * *cores* * *threads* < *maxcpus*, -which could lead to an incorrect topology enumeration by the guest. -Support for invalid topologies will be removed, the user must ensure -topologies described with -smp include all possible cpus, i.e. -*sockets* * *cores* * *threads* =3D *maxcpus*. - ``-vnc acl`` (since 4.0.0) '''''''''''''''''''''''''' =20 @@ -618,6 +605,19 @@ New machine versions (since 5.1) will not accept the o= ption but it will still work with old machine types. User can check the QAPI schema to see if the = legacy option is supported by looking at MachineInfo::numa-mem-supported property. =20 +``-smp`` (invalid topologies) (removed 5.2) +''''''''''''''''''''''''''''''''''''''''''' + +CPU topology properties should describe whole machine topology including +possible CPUs. + +However, historically it was possible to start QEMU with an incorrect topo= logy +where *n* <=3D *sockets* * *cores* * *threads* < *maxcpus*, +which could lead to an incorrect topology enumeration by the guest. +Support for invalid topologies is removed, the user must ensure +topologies described with -smp include all possible cpus, i.e. +*sockets* * *cores* * *threads* =3D *maxcpus*. + Block devices ------------- =20 diff --git a/hw/core/machine.c b/hw/core/machine.c index ea26d61237..09aee4ea52 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -754,23 +754,15 @@ static void smp_parse(MachineState *ms, QemuOpts *opt= s) exit(1); } =20 - if (sockets * cores * threads > ms->smp.max_cpus) { - error_report("cpu topology: " - "sockets (%u) * cores (%u) * threads (%u) > " - "maxcpus (%u)", + if (sockets * cores * threads !=3D ms->smp.max_cpus) { + error_report("Invalid CPU topology: " + "sockets (%u) * cores (%u) * threads (%u) " + "!=3D maxcpus (%u)", sockets, cores, threads, ms->smp.max_cpus); exit(1); } =20 - if (sockets * cores * threads !=3D ms->smp.max_cpus) { - warn_report("Invalid CPU topology deprecated: " - "sockets (%u) * cores (%u) * threads (%u) " - "!=3D maxcpus (%u)", - sockets, cores, threads, - ms->smp.max_cpus); - } - ms->smp.cpus =3D cpus; ms->smp.cores =3D cores; ms->smp.threads =3D threads; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d071da787b..fbde6b04e6 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -746,23 +746,15 @@ void pc_smp_parse(MachineState *ms, QemuOpts *opts) exit(1); } =20 - if (sockets * dies * cores * threads > ms->smp.max_cpus) { - error_report("cpu topology: " - "sockets (%u) * dies (%u) * cores (%u) * threads = (%u) > " - "maxcpus (%u)", + if (sockets * dies * cores * threads !=3D ms->smp.max_cpus) { + error_report("Invalid CPU topology deprecated: " + "sockets (%u) * dies (%u) * cores (%u) * threads = (%u) " + "!=3D maxcpus (%u)", sockets, dies, cores, threads, ms->smp.max_cpus); exit(1); } =20 - if (sockets * dies * cores * threads !=3D ms->smp.max_cpus) { - warn_report("Invalid CPU topology deprecated: " - "sockets (%u) * dies (%u) * cores (%u) * threads (= %u) " - "!=3D maxcpus (%u)", - sockets, dies, cores, threads, - ms->smp.max_cpus); - } - ms->smp.cpus =3D cpus; ms->smp.cores =3D cores; ms->smp.threads =3D threads; --=20 2.27.0