[{"id":1760418,"web_url":"http://patchwork.ozlabs.org/comment/1760418/","msgid":"<8a7e8d96-0d32-97cd-0e5a-335aff4d9d39@redhat.com>","list_archive_url":null,"date":"2017-08-30T19:06:55","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":66152,"url":"http://patchwork.ozlabs.org/api/people/66152/","name":"Thomas Huth","email":"thuth@redhat.com"},"content":"On 30.08.2017 19:05, David Hildenbrand wrote:\n> Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the\n> guest tries to bring these CPUs up but fails), because we don't support\n> multiple CPUs on s390x under TCG.\n> \n> Let's bail out if more than 1 are specified, so we don't raise people's\n> hope.\n\nAurelien recently posted a patch to add that basic SIGP support:\n\n https://patchwork.kernel.org/patch/9717489/\n\nI think it would make more sense to get that included instead.\n\n Thomas","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=thuth@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjFPm4qGnz9t16\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 05:07:37 +1000 (AEST)","from localhost ([::1]:52264 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dn8Ko-0003ya-RG\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 15:07:30 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:38596)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1dn8KS-0003xh-M0\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 15:07:09 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1dn8KQ-0005Bd-2j\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 15:07:08 -0400","from mx1.redhat.com ([209.132.183.28]:42578)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <thuth@redhat.com>) id 1dn8KP-0005BK-SK\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 15:07:06 -0400","from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 807B1883CD;\n\tWed, 30 Aug 2017 19:07:01 +0000 (UTC)","from [10.36.116.20] (ovpn-116-20.ams2.redhat.com [10.36.116.20])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 8B7E698160;\n\tWed, 30 Aug 2017 19:06:56 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 807B1883CD","To":"David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>","From":"Thomas Huth <thuth@redhat.com>","Message-ID":"<8a7e8d96-0d32-97cd-0e5a-335aff4d9d39@redhat.com>","Date":"Wed, 30 Aug 2017 21:06:55 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170830170601.15855-9-david@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.16","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tWed, 30 Aug 2017 19:07:01 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"cohuck@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tAlexander Graf <agraf@suse.de>, Aurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1760679,"web_url":"http://patchwork.ozlabs.org/comment/1760679/","msgid":"<20170831084200.359bd5c7.cohuck@redhat.com>","list_archive_url":null,"date":"2017-08-31T06:42:00","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Wed, 30 Aug 2017 21:06:55 +0200\nThomas Huth <thuth@redhat.com> wrote:\n\n> On 30.08.2017 19:05, David Hildenbrand wrote:\n> > Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the\n> > guest tries to bring these CPUs up but fails), because we don't support\n> > multiple CPUs on s390x under TCG.\n> > \n> > Let's bail out if more than 1 are specified, so we don't raise people's\n> > hope.  \n> \n> Aurelien recently posted a patch to add that basic SIGP support:\n> \n>  https://patchwork.kernel.org/patch/9717489/\n> \n> I think it would make more sense to get that included instead.\n\nI'd look at it if it were reposted :)","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjXqj0n4hz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 16:42:37 +1000 (AEST)","from localhost ([::1]:54151 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnJBS-0006BY-Ao\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 02:42:34 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51680)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnJB5-0006Ai-HC\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 02:42:12 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnJB2-0005y2-FT\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 02:42:11 -0400","from mx1.redhat.com ([209.132.183.28]:40198)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dnJB2-0005xc-8k\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 02:42:08 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 023C47EBD6;\n\tThu, 31 Aug 2017 06:42:07 +0000 (UTC)","from gondolin (ovpn-116-164.ams2.redhat.com [10.36.116.164])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 21A5660657;\n\tThu, 31 Aug 2017 06:42:02 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 023C47EBD6","Date":"Thu, 31 Aug 2017 08:42:00 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Thomas Huth <thuth@redhat.com>","Message-ID":"<20170831084200.359bd5c7.cohuck@redhat.com>","In-Reply-To":"<8a7e8d96-0d32-97cd-0e5a-335aff4d9d39@redhat.com>","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>\n\t<8a7e8d96-0d32-97cd-0e5a-335aff4d9d39@redhat.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tThu, 31 Aug 2017 06:42:07 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Alexander Graf <agraf@suse.de>,\n\tRichard Henderson <richard.henderson@linaro.org>,\n\tqemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,\n\tDavid Hildenbrand <david@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1760984,"web_url":"http://patchwork.ozlabs.org/comment/1760984/","msgid":"<6482075e-082e-f04c-317b-2d83775b1848@redhat.com>","list_archive_url":null,"date":"2017-08-31T13:24:18","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"On 30.08.2017 21:06, Thomas Huth wrote:\n> On 30.08.2017 19:05, David Hildenbrand wrote:\n>> Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the\n>> guest tries to bring these CPUs up but fails), because we don't support\n>> multiple CPUs on s390x under TCG.\n>>\n>> Let's bail out if more than 1 are specified, so we don't raise people's\n>> hope.\n> \n> Aurelien recently posted a patch to add that basic SIGP support:\n> \n>  https://patchwork.kernel.org/patch/9717489/\n> \n> I think it would make more sense to get that included instead.\n> \n>  Thomas\n> \n\nEven then, it doesn't work reliably:\n\n- \"*very rough* SMP support\"\n- \"this patch is nothing more than a way to determine what needs to\n   be implemented\"\n- \"It should be rewritten from scratch before reaching in an acceptable\n   state.\"\n\nSuch broken feature should not be exposed to the user. Once we have\nproperly fixed that we can enable and announce it \"s390x now supports\nmore than 1 VCPU under TCG\". At this point, this is just wrong, even\nwith this patch included.\n\nSo I'd suggest including this now and reverting it once we have actual\nsupport. \"so we don't raise people's hope.\"","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=david@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjjly2D5Qz9sPm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 23:25:01 +1000 (AEST)","from localhost ([::1]:55810 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnPSq-0006dQ-Ca\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 09:24:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56692)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnPSP-0006c5-Uz\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 09:24:34 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnPSM-0003ya-0P\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 09:24:29 -0400","from mx1.redhat.com ([209.132.183.28]:48618)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <david@redhat.com>) id 1dnPSL-0003yN-QK\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 09:24:25 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id B956681DE8;\n\tThu, 31 Aug 2017 13:24:24 +0000 (UTC)","from [10.36.118.11] (unknown [10.36.118.11])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 137BFA2495;\n\tThu, 31 Aug 2017 13:24:19 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com B956681DE8","To":"Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>\n\t<8a7e8d96-0d32-97cd-0e5a-335aff4d9d39@redhat.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<6482075e-082e-f04c-317b-2d83775b1848@redhat.com>","Date":"Thu, 31 Aug 2017 15:24:18 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<8a7e8d96-0d32-97cd-0e5a-335aff4d9d39@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 31 Aug 2017 13:24:24 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"cohuck@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tAlexander Graf <agraf@suse.de>, Aurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761070,"web_url":"http://patchwork.ozlabs.org/comment/1761070/","msgid":"<20170831164142.607711ec.cohuck@redhat.com>","list_archive_url":null,"date":"2017-08-31T14:41:42","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Wed, 30 Aug 2017 19:05:58 +0200\nDavid Hildenbrand <david@redhat.com> wrote:\n\n> Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the\n> guest tries to bring these CPUs up but fails), because we don't support\n> multiple CPUs on s390x under TCG.\n> \n> Let's bail out if more than 1 are specified, so we don't raise people's\n> hope.\n> \n> Signed-off-by: David Hildenbrand <david@redhat.com>\n> ---\n>  hw/s390x/s390-virtio-ccw.c | 6 ++++++\n>  1 file changed, 6 insertions(+)\n> \n> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c\n> index 7754e3eaf9..eff96808c4 100644\n> --- a/hw/s390x/s390-virtio-ccw.c\n> +++ b/hw/s390x/s390-virtio-ccw.c\n> @@ -23,6 +23,7 @@\n>  #include \"hw/s390x/css.h\"\n>  #include \"virtio-ccw.h\"\n>  #include \"qemu/config-file.h\"\n> +#include \"qemu/error-report.h\"\n>  #include \"s390-pci-bus.h\"\n>  #include \"hw/s390x/storage-keys.h\"\n>  #include \"hw/s390x/storage-attributes.h\"\n> @@ -56,6 +57,11 @@ static void s390_init_cpus(MachineState *machine)\n>      if (machine->cpu_model == NULL) {\n>          machine->cpu_model = s390_default_cpu_model_name();\n>      }\n> +    if (tcg_enabled() && max_cpus > 1) {\n> +        error_report(\"Number of SMP CPUs requested (%d) exceeds max CPUs \"\n> +                     \"supported by TCG (1) on s390x\", max_cpus);\n\nMake this a #define, so we can just flip the switch when smp support is\nready?\n\n> +        exit(1);\n> +    }\n>  \n>      ms->cpus = g_new0(S390CPU *, max_cpus);\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjlTH1qX1z9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 00:42:26 +1000 (AEST)","from localhost ([::1]:56132 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnQfo-0005KG-Ja\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 10:42:24 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48910)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnQfL-0005Iy-GE\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 10:41:56 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnQfG-0006Jr-R8\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 10:41:55 -0400","from mx1.redhat.com ([209.132.183.28]:20657)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dnQfG-0006Jg-Kr\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 10:41:50 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 961EA7EA91;\n\tThu, 31 Aug 2017 14:41:49 +0000 (UTC)","from gondolin (ovpn-117-247.ams2.redhat.com [10.36.117.247])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id BC924A2461;\n\tThu, 31 Aug 2017 14:41:45 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 961EA7EA91","Date":"Thu, 31 Aug 2017 16:41:42 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"David Hildenbrand <david@redhat.com>","Message-ID":"<20170831164142.607711ec.cohuck@redhat.com>","In-Reply-To":"<20170830170601.15855-9-david@redhat.com>","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tThu, 31 Aug 2017 14:41:49 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"thuth@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,\n\tborntraeger@de.ibm.com, Aurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761094,"web_url":"http://patchwork.ozlabs.org/comment/1761094/","msgid":"<9beeb7d0-edb8-2227-3182-9275567b2fb5@redhat.com>","list_archive_url":null,"date":"2017-08-31T15:03:21","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"On 31.08.2017 16:41, Cornelia Huck wrote:\n> On Wed, 30 Aug 2017 19:05:58 +0200\n> David Hildenbrand <david@redhat.com> wrote:\n> \n>> Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the\n>> guest tries to bring these CPUs up but fails), because we don't support\n>> multiple CPUs on s390x under TCG.\n>>\n>> Let's bail out if more than 1 are specified, so we don't raise people's\n>> hope.\n>>\n>> Signed-off-by: David Hildenbrand <david@redhat.com>\n>> ---\n>>  hw/s390x/s390-virtio-ccw.c | 6 ++++++\n>>  1 file changed, 6 insertions(+)\n>>\n>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c\n>> index 7754e3eaf9..eff96808c4 100644\n>> --- a/hw/s390x/s390-virtio-ccw.c\n>> +++ b/hw/s390x/s390-virtio-ccw.c\n>> @@ -23,6 +23,7 @@\n>>  #include \"hw/s390x/css.h\"\n>>  #include \"virtio-ccw.h\"\n>>  #include \"qemu/config-file.h\"\n>> +#include \"qemu/error-report.h\"\n>>  #include \"s390-pci-bus.h\"\n>>  #include \"hw/s390x/storage-keys.h\"\n>>  #include \"hw/s390x/storage-attributes.h\"\n>> @@ -56,6 +57,11 @@ static void s390_init_cpus(MachineState *machine)\n>>      if (machine->cpu_model == NULL) {\n>>          machine->cpu_model = s390_default_cpu_model_name();\n>>      }\n>> +    if (tcg_enabled() && max_cpus > 1) {\n>> +        error_report(\"Number of SMP CPUs requested (%d) exceeds max CPUs \"\n>> +                     \"supported by TCG (1) on s390x\", max_cpus);\n> \n> Make this a #define, so we can just flip the switch when smp support is\n> ready?\n\nAs an alternative: yield a warning?\n\n> \n>> +        exit(1);\n>> +    }\n>>  \n>>      ms->cpus = g_new0(S390CPU *, max_cpus);\n>>  \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=david@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjlyD14gvz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 01:04:02 +1000 (AEST)","from localhost ([::1]:56225 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnR0h-0007L1-1R\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 11:03:59 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56605)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnR0E-0007JS-PM\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:03:35 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnR09-0006JK-TY\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:03:30 -0400","from mx1.redhat.com ([209.132.183.28]:51016)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <david@redhat.com>) id 1dnR09-0006J6-Ng\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:03:25 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 58756883A0;\n\tThu, 31 Aug 2017 15:03:24 +0000 (UTC)","from [10.36.118.11] (unknown [10.36.118.11])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 75A83B32D8;\n\tThu, 31 Aug 2017 15:03:22 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 58756883A0","To":"Cornelia Huck <cohuck@redhat.com>","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>\n\t<20170831164142.607711ec.cohuck@redhat.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<9beeb7d0-edb8-2227-3182-9275567b2fb5@redhat.com>","Date":"Thu, 31 Aug 2017 17:03:21 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170831164142.607711ec.cohuck@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tThu, 31 Aug 2017 15:03:24 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"thuth@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,\n\tborntraeger@de.ibm.com, Aurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761096,"web_url":"http://patchwork.ozlabs.org/comment/1761096/","msgid":"<20170831170733.7fe86dbc.cohuck@redhat.com>","list_archive_url":null,"date":"2017-08-31T15:07:33","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Thu, 31 Aug 2017 17:03:21 +0200\nDavid Hildenbrand <david@redhat.com> wrote:\n\n> On 31.08.2017 16:41, Cornelia Huck wrote:\n> > On Wed, 30 Aug 2017 19:05:58 +0200\n> > David Hildenbrand <david@redhat.com> wrote:\n> >   \n> >> Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the\n> >> guest tries to bring these CPUs up but fails), because we don't support\n> >> multiple CPUs on s390x under TCG.\n> >>\n> >> Let's bail out if more than 1 are specified, so we don't raise people's\n> >> hope.\n> >>\n> >> Signed-off-by: David Hildenbrand <david@redhat.com>\n> >> ---\n> >>  hw/s390x/s390-virtio-ccw.c | 6 ++++++\n> >>  1 file changed, 6 insertions(+)\n> >>\n> >> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c\n> >> index 7754e3eaf9..eff96808c4 100644\n> >> --- a/hw/s390x/s390-virtio-ccw.c\n> >> +++ b/hw/s390x/s390-virtio-ccw.c\n> >> @@ -23,6 +23,7 @@\n> >>  #include \"hw/s390x/css.h\"\n> >>  #include \"virtio-ccw.h\"\n> >>  #include \"qemu/config-file.h\"\n> >> +#include \"qemu/error-report.h\"\n> >>  #include \"s390-pci-bus.h\"\n> >>  #include \"hw/s390x/storage-keys.h\"\n> >>  #include \"hw/s390x/storage-attributes.h\"\n> >> @@ -56,6 +57,11 @@ static void s390_init_cpus(MachineState *machine)\n> >>      if (machine->cpu_model == NULL) {\n> >>          machine->cpu_model = s390_default_cpu_model_name();\n> >>      }\n> >> +    if (tcg_enabled() && max_cpus > 1) {\n> >> +        error_report(\"Number of SMP CPUs requested (%d) exceeds max CPUs \"\n> >> +                     \"supported by TCG (1) on s390x\", max_cpus);  \n> > \n> > Make this a #define, so we can just flip the switch when smp support is\n> > ready?  \n> \n> As an alternative: yield a warning?\n\nIf we know that this can't work, it makes sense to stop immediately, no?\n\n> \n> >   \n> >> +        exit(1);\n> >> +    }\n> >>  \n> >>      ms->cpus = g_new0(S390CPU *, max_cpus);\n> >>    \n> >   \n> \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjm2z5bKFz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 01:08:11 +1000 (AEST)","from localhost ([::1]:56237 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnR4j-0000dG-Qe\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 11:08:09 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:58065)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnR4M-0000cr-KC\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:07:51 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnR4H-0000bZ-MQ\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:07:46 -0400","from mx1.redhat.com ([209.132.183.28]:57811)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dnR4H-0000ae-G4\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:07:41 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 543654E4C3;\n\tThu, 31 Aug 2017 15:07:40 +0000 (UTC)","from gondolin (ovpn-117-247.ams2.redhat.com [10.36.117.247])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 80F1CB32BC;\n\tThu, 31 Aug 2017 15:07:36 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 543654E4C3","Date":"Thu, 31 Aug 2017 17:07:33 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"David Hildenbrand <david@redhat.com>","Message-ID":"<20170831170733.7fe86dbc.cohuck@redhat.com>","In-Reply-To":"<9beeb7d0-edb8-2227-3182-9275567b2fb5@redhat.com>","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>\n\t<20170831164142.607711ec.cohuck@redhat.com>\n\t<9beeb7d0-edb8-2227-3182-9275567b2fb5@redhat.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]);\n\tThu, 31 Aug 2017 15:07:40 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"thuth@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,\n\tborntraeger@de.ibm.com, Aurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761125,"web_url":"http://patchwork.ozlabs.org/comment/1761125/","msgid":"<f8d4feed-9025-534f-9344-baba1204d607@redhat.com>","list_archive_url":null,"date":"2017-08-31T15:33:13","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"On 31.08.2017 17:07, Cornelia Huck wrote:\n> On Thu, 31 Aug 2017 17:03:21 +0200\n> David Hildenbrand <david@redhat.com> wrote:\n> \n>> On 31.08.2017 16:41, Cornelia Huck wrote:\n>>> On Wed, 30 Aug 2017 19:05:58 +0200\n>>> David Hildenbrand <david@redhat.com> wrote:\n>>>   \n>>>> Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the\n>>>> guest tries to bring these CPUs up but fails), because we don't support\n>>>> multiple CPUs on s390x under TCG.\n>>>>\n>>>> Let's bail out if more than 1 are specified, so we don't raise people's\n>>>> hope.\n>>>>\n>>>> Signed-off-by: David Hildenbrand <david@redhat.com>\n>>>> ---\n>>>>  hw/s390x/s390-virtio-ccw.c | 6 ++++++\n>>>>  1 file changed, 6 insertions(+)\n>>>>\n>>>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c\n>>>> index 7754e3eaf9..eff96808c4 100644\n>>>> --- a/hw/s390x/s390-virtio-ccw.c\n>>>> +++ b/hw/s390x/s390-virtio-ccw.c\n>>>> @@ -23,6 +23,7 @@\n>>>>  #include \"hw/s390x/css.h\"\n>>>>  #include \"virtio-ccw.h\"\n>>>>  #include \"qemu/config-file.h\"\n>>>> +#include \"qemu/error-report.h\"\n>>>>  #include \"s390-pci-bus.h\"\n>>>>  #include \"hw/s390x/storage-keys.h\"\n>>>>  #include \"hw/s390x/storage-attributes.h\"\n>>>> @@ -56,6 +57,11 @@ static void s390_init_cpus(MachineState *machine)\n>>>>      if (machine->cpu_model == NULL) {\n>>>>          machine->cpu_model = s390_default_cpu_model_name();\n>>>>      }\n>>>> +    if (tcg_enabled() && max_cpus > 1) {\n>>>> +        error_report(\"Number of SMP CPUs requested (%d) exceeds max CPUs \"\n>>>> +                     \"supported by TCG (1) on s390x\", max_cpus);  \n>>>\n>>> Make this a #define, so we can just flip the switch when smp support is\n>>> ready?  \n>>\n>> As an alternative: yield a warning?\n> \n> If we know that this can't work, it makes sense to stop immediately, no?\n\nHmm, like that than?\n\ndiff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c\nindex 18ed0c57e3..dae848fa5f 100644\n--- a/hw/s390x/s390-virtio-ccw.c\n+++ b/hw/s390x/s390-virtio-ccw.c\n@@ -23,6 +23,7 @@\n #include \"hw/s390x/css.h\"\n #include \"virtio-ccw.h\"\n #include \"qemu/config-file.h\"\n+#include \"qemu/error-report.h\"\n #include \"s390-pci-bus.h\"\n #include \"hw/s390x/storage-keys.h\"\n #include \"hw/s390x/storage-attributes.h\"\n@@ -56,6 +57,12 @@ static void s390_init_cpus(MachineState *machine)\n     if (machine->cpu_model == NULL) {\n         machine->cpu_model = s390_default_cpu_model_name();\n     }\n+    if (tcg_enabled() && max_cpus > S390_TCG_MAX_CPUS) {\n+        error_report(\"Number of SMP CPUs requested (%d) exceeds max CPUs \"\n+                     \"supported by TCG (%d) on s390x\", max_cpus,\n+                     S390_TCG_MAX_CPUS);\n+        exit(1);\n+    }\n\n     ms->cpus = g_new0(S390CPU *, max_cpus);\n\ndiff --git a/target/s390x/cpu.h b/target/s390x/cpu.h\nindex 7ed9103b33..4e1de2102d 100644\n--- a/target/s390x/cpu.h\n+++ b/target/s390x/cpu.h\n@@ -210,6 +210,8 @@ static inline S390CPU\n*s390_env_get_cpu(CPUS390XState *env)\n\n #define ENV_OFFSET offsetof(S390CPU, env)\n\n+#define S390_TCG_MAX_CPUS 1\n+\n #ifndef CONFIG_USER_ONLY\n extern const struct VMStateDescription vmstate_s390_cpu;\n #endif","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=david@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjmcT1GP6z9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 01:33:45 +1000 (AEST)","from localhost ([::1]:56330 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnRTT-0002bT-9e\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 11:33:43 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36416)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnRT6-0002bM-Gm\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:33:21 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnRT3-0003le-D4\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:33:20 -0400","from mx1.redhat.com ([209.132.183.28]:26562)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <david@redhat.com>) id 1dnRT3-0003l6-3N\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:33:17 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id F28C561477;\n\tThu, 31 Aug 2017 15:33:15 +0000 (UTC)","from [10.36.118.11] (unknown [10.36.118.11])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 098D85D97E;\n\tThu, 31 Aug 2017 15:33:13 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com F28C561477","To":"Cornelia Huck <cohuck@redhat.com>","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>\n\t<20170831164142.607711ec.cohuck@redhat.com>\n\t<9beeb7d0-edb8-2227-3182-9275567b2fb5@redhat.com>\n\t<20170831170733.7fe86dbc.cohuck@redhat.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<f8d4feed-9025-534f-9344-baba1204d607@redhat.com>","Date":"Thu, 31 Aug 2017 17:33:13 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170831170733.7fe86dbc.cohuck@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tThu, 31 Aug 2017 15:33:16 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"thuth@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,\n\tborntraeger@de.ibm.com, Aurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761147,"web_url":"http://patchwork.ozlabs.org/comment/1761147/","msgid":"<20170831180610.50d089aa.cohuck@redhat.com>","list_archive_url":null,"date":"2017-08-31T16:06:10","subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Thu, 31 Aug 2017 17:33:13 +0200\nDavid Hildenbrand <david@redhat.com> wrote:\n\n> On 31.08.2017 17:07, Cornelia Huck wrote:\n\n> > If we know that this can't work, it makes sense to stop immediately, no?  \n> \n> Hmm, like that than?\n> \n> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c\n> index 18ed0c57e3..dae848fa5f 100644\n> --- a/hw/s390x/s390-virtio-ccw.c\n> +++ b/hw/s390x/s390-virtio-ccw.c\n> @@ -23,6 +23,7 @@\n>  #include \"hw/s390x/css.h\"\n>  #include \"virtio-ccw.h\"\n>  #include \"qemu/config-file.h\"\n> +#include \"qemu/error-report.h\"\n>  #include \"s390-pci-bus.h\"\n>  #include \"hw/s390x/storage-keys.h\"\n>  #include \"hw/s390x/storage-attributes.h\"\n> @@ -56,6 +57,12 @@ static void s390_init_cpus(MachineState *machine)\n>      if (machine->cpu_model == NULL) {\n>          machine->cpu_model = s390_default_cpu_model_name();\n>      }\n> +    if (tcg_enabled() && max_cpus > S390_TCG_MAX_CPUS) {\n> +        error_report(\"Number of SMP CPUs requested (%d) exceeds max CPUs \"\n> +                     \"supported by TCG (%d) on s390x\", max_cpus,\n> +                     S390_TCG_MAX_CPUS);\n> +        exit(1);\n> +    }\n> \n>      ms->cpus = g_new0(S390CPU *, max_cpus);\n> \n> diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h\n> index 7ed9103b33..4e1de2102d 100644\n> --- a/target/s390x/cpu.h\n> +++ b/target/s390x/cpu.h\n> @@ -210,6 +210,8 @@ static inline S390CPU\n> *s390_env_get_cpu(CPUS390XState *env)\n> \n>  #define ENV_OFFSET offsetof(S390CPU, env)\n> \n> +#define S390_TCG_MAX_CPUS 1\n> +\n>  #ifndef CONFIG_USER_ONLY\n>  extern const struct VMStateDescription vmstate_s390_cpu;\n>  #endif\n> \n> \n\nLooks good!","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=208.118.235.17; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [208.118.235.17])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjnNn35Sfz9sD9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 02:08:41 +1000 (AEST)","from localhost ([::1]:56582 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnS1F-0008I4-S7\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 12:08:37 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:44923)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnRz5-0006r3-0m\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:06:29 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnRz1-0003Bm-1x\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:06:23 -0400","from mx1.redhat.com ([209.132.183.28]:53850)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dnRz0-0003Av-Rm\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:06:18 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id AC27E6146F;\n\tThu, 31 Aug 2017 16:06:17 +0000 (UTC)","from gondolin (ovpn-117-247.ams2.redhat.com [10.36.117.247])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id E740793534;\n\tThu, 31 Aug 2017 16:06:12 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com AC27E6146F","Date":"Thu, 31 Aug 2017 18:06:10 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"David Hildenbrand <david@redhat.com>","Message-ID":"<20170831180610.50d089aa.cohuck@redhat.com>","In-Reply-To":"<f8d4feed-9025-534f-9344-baba1204d607@redhat.com>","References":"<20170830170601.15855-1-david@redhat.com>\n\t<20170830170601.15855-9-david@redhat.com>\n\t<20170831164142.607711ec.cohuck@redhat.com>\n\t<9beeb7d0-edb8-2227-3182-9275567b2fb5@redhat.com>\n\t<20170831170733.7fe86dbc.cohuck@redhat.com>\n\t<f8d4feed-9025-534f-9344-baba1204d607@redhat.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tThu, 31 Aug 2017 16:06:17 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"thuth@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,\n\tborntraeger@de.ibm.com, Aurelien Jarno <aurelien@aurel32.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]