[{"id":1764487,"web_url":"http://patchwork.ozlabs.org/comment/1764487/","msgid":"<87f49e42-13fd-e884-ff73-9516e2c09455@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-07T03:16:52","subject":"Re: [Qemu-devel] [PATCH v2 16/19] s390x: allow cpu hotplug via\n\tdevice_add","submitter":{"id":26065,"url":"http://patchwork.ozlabs.org/api/people/26065/","name":"Matthew Rosato","email":"mjrosato@linux.vnet.ibm.com"},"content":"On 09/04/2017 11:43 AM, David Hildenbrand wrote:\n> E.g. the following now works:\n>     device_add host-s390-cpu,id=cpu1,core-id=1\n> \n> The system will perform the same checks as when using cpu_add:\n> - If the core_id is already in use\n> - If the next sequential core_id isn't used\n> - If core-id >= max_cpu is specified\n> \n> In addition, mixed CPU models are checked. E.g. if starting with\n> -cpu host and trying to hotplug \"qemu-s390-cpu\":\n>     \"Mixed CPU models are not supported on s390x.\"\n> \n> Signed-off-by: David Hildenbrand <david@redhat.com>\n\nAs easy as flipping a switch, right?\n\nTested the new device_add path, the old cpu-add path and mixed cases\nwhere I alternated adding cpus via both methods -- looking good.\n\nReviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>\n\n> ---\n>  target/s390x/cpu.c | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c\n> index 105ff13034..be20c2fb0f 100644\n> --- a/target/s390x/cpu.c\n> +++ b/target/s390x/cpu.c\n> @@ -466,6 +466,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)\n>      scc->parent_realize = dc->realize;\n>      dc->realize = s390_cpu_realizefn;\n>      dc->props = s390x_cpu_properties;\n> +    dc->user_creatable = true;\n> \n>      scc->parent_reset = cc->reset;\n>  #if !defined(CONFIG_USER_ONLY)\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>)","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 3xnlxz3X7Xz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 13:17:43 +1000 (AEST)","from localhost ([::1]:38665 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 1dpnK1-0006zs-J4\n\tfor incoming@patchwork.ozlabs.org; Wed, 06 Sep 2017 23:17:41 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:52926)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mjrosato@linux.vnet.ibm.com>) id 1dpnJP-0006y3-Ea\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 23:17:04 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mjrosato@linux.vnet.ibm.com>) id 1dpnJL-0005pV-Dx\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 23:17:03 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34112\n\thelo=mx0a-001b2d01.pphosted.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mjrosato@linux.vnet.ibm.com>)\n\tid 1dpnJL-0005pJ-7y\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 23:16:59 -0400","from pps.filterd (m0098419.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv873DmO4134871\n\tfor <qemu-devel@nongnu.org>; Wed, 6 Sep 2017 23:16:58 -0400","from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2ctq9sj52k-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Wed, 06 Sep 2017 23:16:58 -0400","from localhost\n\tby e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <mjrosato@linux.vnet.ibm.com>;\n\tWed, 6 Sep 2017 23:16:57 -0400","from b01cxnp22035.gho.pok.ibm.com (9.57.198.25)\n\tby e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tWed, 6 Sep 2017 23:16:53 -0400","from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com\n\t[9.57.199.106])\n\tby b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v873GrSM33292504; Thu, 7 Sep 2017 03:16:53 GMT","from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id C12CB2803A;\n\tWed,  6 Sep 2017 23:16:46 -0400 (EDT)","from [9.85.195.170] (unknown [9.85.195.170])\n\tby b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id 43E332803E;\n\tWed,  6 Sep 2017 23:16:46 -0400 (EDT)"],"To":"David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org","References":"<20170904154316.4148-1-david@redhat.com>\n\t<20170904154316.4148-17-david@redhat.com>","From":"Matthew Rosato <mjrosato@linux.vnet.ibm.com>","Date":"Wed, 6 Sep 2017 23:16:52 -0400","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":"<20170904154316.4148-17-david@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","x-cbid":"17090703-0044-0000-0000-0000038A63E0","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007680; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00913363; UDB=6.00458407;\n\tIPR=6.00693625; \n\tBA=6.00005574; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017043;\n\tXFM=3.00000015; UTC=2017-09-07 03:16:56","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17090703-0045-0000-0000-000007B963D7","Message-Id":"<87f49e42-13fd-e884-ff73-9516e2c09455@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-07_03:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709070046","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.158.5","Subject":"Re: [Qemu-devel] [PATCH v2 16/19] s390x: allow cpu hotplug via\n\tdevice_add","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, Eduardo Habkost <ehabkost@redhat.com>,\n\tcohuck@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tAlexander Graf <agraf@suse.de>, borntraeger@de.ibm.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":1764711,"web_url":"http://patchwork.ozlabs.org/comment/1764711/","msgid":"<08a508ea-b813-49d3-7fe6-dd6dfa271007@redhat.com>","list_archive_url":null,"date":"2017-09-07T13:04:29","subject":"Re: [Qemu-devel] [PATCH v2 16/19] s390x: allow cpu hotplug via\n\tdevice_add","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"On 07.09.2017 05:16, Matthew Rosato wrote:\n> On 09/04/2017 11:43 AM, David Hildenbrand wrote:\n>> E.g. the following now works:\n>>     device_add host-s390-cpu,id=cpu1,core-id=1\n>>\n>> The system will perform the same checks as when using cpu_add:\n>> - If the core_id is already in use\n>> - If the next sequential core_id isn't used\n>> - If core-id >= max_cpu is specified\n>>\n>> In addition, mixed CPU models are checked. E.g. if starting with\n>> -cpu host and trying to hotplug \"qemu-s390-cpu\":\n>>     \"Mixed CPU models are not supported on s390x.\"\n>>\n>> Signed-off-by: David Hildenbrand <david@redhat.com>\n> \n> As easy as flipping a switch, right?\n\nYes, luckily all that hotplug handling already was in place, just\ncore-id vs. id had to be fixed.\n\n> \n> Tested the new device_add path, the old cpu-add path and mixed cases\n> where I alternated adding cpus via both methods -- looking good.\n> \n> Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>\n> \n\nThanks!","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=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 3xp0zs2R2Lz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 23:05:13 +1000 (AEST)","from localhost ([::1]:40424 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 1dpwUZ-0001Hb-Ga\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 09:05:11 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48912)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dpwU5-0001H4-Tk\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 09:04:51 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dpwU1-0008Cj-Cb\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 09:04:41 -0400","from mx1.redhat.com ([209.132.183.28]:48150)\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 1dpwU1-0008CE-66\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 09:04:37 -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 28C8C821C1;\n\tThu,  7 Sep 2017 13:04:36 +0000 (UTC)","from [10.36.116.130] (ovpn-116-130.ams2.redhat.com [10.36.116.130])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8058D5C542;\n\tThu,  7 Sep 2017 13:04:30 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 28C8C821C1","To":"Matthew Rosato <mjrosato@linux.vnet.ibm.com>, qemu-devel@nongnu.org","References":"<20170904154316.4148-1-david@redhat.com>\n\t<20170904154316.4148-17-david@redhat.com>\n\t<87f49e42-13fd-e884-ff73-9516e2c09455@linux.vnet.ibm.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<08a508ea-b813-49d3-7fe6-dd6dfa271007@redhat.com>","Date":"Thu, 7 Sep 2017 15:04:29 +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":"<87f49e42-13fd-e884-ff73-9516e2c09455@linux.vnet.ibm.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.28]);\n\tThu, 07 Sep 2017 13:04:36 +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 v2 16/19] s390x: allow cpu hotplug via\n\tdevice_add","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, Eduardo Habkost <ehabkost@redhat.com>,\n\tcohuck@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tAlexander Graf <agraf@suse.de>, borntraeger@de.ibm.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>"}}]