[{"id":1759210,"web_url":"http://patchwork.ozlabs.org/comment/1759210/","msgid":"<20170829104726.GB8146@lemon>","list_archive_url":null,"date":"2017-08-29T10:47:26","subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Tue, 08/29 11:15, Seeteena Thoufeek wrote:\n> ---Steps to Reproduce---\n> \n> When passed a negative number to 'maxcpus' parameter, Qemu aborts\n> with a core dump.\n> \n> Run the following command with maxcpus argument as negative number\n> \n> ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine\n> pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,\n> drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,\n> if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet\n> :127.0.0.1:1234,server,nowait -net nic,model=virtio -net\n> user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,\n> threads=1,maxcpus=-12\n> \n> (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate\n>  18446744073709550568 bytes\n> \n> Trace/breakpoint trap\n> \n> Reported-by: R.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>\n> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>\n> ---\n> v1 -> v2:\n>   - Fix the error check in vl.c to make it generic.\n> v2 -> v3:\n>   - Fix coding style pointed out by patchew.\n>   - Fix check for \"<= 0\" instead of just \"< 0\".\n> v3 -> v4:\n>   - Fix subject line.\n>   - Removed space before \":\" from vl.c:1248\n>   - Removed Reviewed-by: flag.\n> ---\n>  vl.c | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/vl.c b/vl.c\n> index 8e247cc..2d9e73d 100644\n> --- a/vl.c\n> +++ b/vl.c\n> @@ -1244,7 +1244,10 @@ static void smp_parse(QemuOpts *opts)\n>          }\n>  \n>          max_cpus = qemu_opt_get_number(opts, \"maxcpus\", cpus);\n> -\n> +        if (max_cpus <= 0) {\n> +            error_report(\"Invalid max_cpus: %d\", max_cpus);\n> +            exit(1);\n> +        }\n>          if (max_cpus < cpus) {\n>              error_report(\"maxcpus must be equal to or greater than smp\");\n>              exit(1);\n> -- \n> 1.8.3.1\n> \n> \n\nReviewed-by: Fam Zheng <famz@redhat.com>","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=famz@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 3xhQMr2tSrz9t79\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 20:48:08 +1000 (AEST)","from localhost ([::1]:43971 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 1dme3y-0001u3-5j\n\tfor incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 06:48:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:45309)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dme3P-0001pv-4O\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 06:47:35 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dme3O-0002UE-8s\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 06:47:31 -0400","from mx1.redhat.com ([209.132.183.28]:47668)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>)\n\tid 1dme3O-0002Ta-2O; Tue, 29 Aug 2017 06:47:30 -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 DB4B07E424;\n\tTue, 29 Aug 2017 10:47:28 +0000 (UTC)","from localhost (ovpn-12-24.pek2.redhat.com [10.72.12.24])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 429B05E26A;\n\tTue, 29 Aug 2017 10:47:27 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com DB4B07E424","Date":"Tue, 29 Aug 2017 18:47:26 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>","Message-ID":"<20170829104726.GB8146@lemon>","References":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","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.27]);\n\tTue, 29 Aug 2017 10:47:29 +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 v4] vl: exit if maxcpus is negative","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":"pbonzini@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org","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":1759350,"web_url":"http://patchwork.ozlabs.org/comment/1759350/","msgid":"<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>","list_archive_url":null,"date":"2017-08-29T13:45:01","subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"content":"Hi Seeteena,\n\nOn 08/29/2017 02:45 AM, Seeteena Thoufeek wrote:\n> ---Steps to Reproduce---\n> \n> When passed a negative number to 'maxcpus' parameter, Qemu aborts\n> with a core dump.\n> \n> Run the following command with maxcpus argument as negative number\n> \n> ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine\n> pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,\n> drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,\n> if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet\n> :127.0.0.1:1234,server,nowait -net nic,model=virtio -net\n> user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,\n> threads=1,maxcpus=-12\n> \n> (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate\n>   18446744073709550568 bytes\n> \n> Trace/breakpoint trap\n> \n> Reported-by: R.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>\n> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>\n> ---\n> v1 -> v2:\n>    - Fix the error check in vl.c to make it generic.\n> v2 -> v3:\n>    - Fix coding style pointed out by patchew.\n>    - Fix check for \"<= 0\" instead of just \"< 0\".\n> v3 -> v4:\n>    - Fix subject line.\n>    - Removed space before \":\" from vl.c:1248\n>    - Removed Reviewed-by: flag.\n> ---\n>   vl.c | 5 ++++-\n>   1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/vl.c b/vl.c\n> index 8e247cc..2d9e73d 100644\n> --- a/vl.c\n> +++ b/vl.c\n> @@ -1244,7 +1244,10 @@ static void smp_parse(QemuOpts *opts)\n>           }\n>   \n>           max_cpus = qemu_opt_get_number(opts, \"maxcpus\", cpus);\n> -\n> +        if (max_cpus <= 0) {\n> +            error_report(\"Invalid max_cpus: %d\", max_cpus);\n\nI disagree with this patch, I think the correct fix is to declare \nmax_cpus as unsigned.\nLooking at the codebase I can't find any signed use of it.\n\n> +            exit(1);\n> +        }\n>           if (max_cpus < cpus) {\n>               error_report(\"maxcpus must be equal to or greater than smp\");\n>               exit(1);\n> \n\nRegards,\n\nPhil.","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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Le4m7Dk8\"; dkim-atps=neutral"],"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 3xhVK24zhPz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 23:45:58 +1000 (AEST)","from localhost ([::1]:45052 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 1dmgq4-0003oi-Jn\n\tfor incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 09:45:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36790)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmgpT-0003gC-Tb\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 09:45:25 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmgpN-0000uA-V3\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 09:45:19 -0400","from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:33369)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmgpG-0000nQ-QI; Tue, 29 Aug 2017 09:45:06 -0400","by mail-qk0-x242.google.com with SMTP id i69so2885796qkh.0;\n\tTue, 29 Aug 2017 06:45:06 -0700 (PDT)","from [192.168.1.10] ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tn196sm1900273qkn.83.2017.08.29.06.45.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 06:45:05 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=bfCYv89W8YlxaEATAG6fmeOSuM1lKnjqKeYN0hdh3rs=;\n\tb=Le4m7Dk8Pqn0onFU39XMSvHQxIRylIX+8a2rg6HCnL9W1mWjggT6XPCTICGXRokP5s\n\tbmHtnO0XdSS7Zos+hLhjPDH5NUjJVs1oQ7yIiZg1cMADeMJQfqhth3Sz2sC6bgEprqkl\n\tZh1f5V8zBMgTmJ83T6vIPQGgJ1Xtr1pIjwNXzgtXFUOXuN60WsmKGoPnGXD1Zwyd2DGo\n\tt14N6p5AxwBs6bo7qq2PPDdKH/JNQLjgq9i1z22P5ztGw7rwy7TlZTWvjLfMIDDrrEPC\n\tVIlJz3BE1YIC47mSY6094sGYob6eTwWeIjnIiOyBY3NeWwjqZHCBIjlU/IQchTTe4fGy\n\tZzsA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:references:cc:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=bfCYv89W8YlxaEATAG6fmeOSuM1lKnjqKeYN0hdh3rs=;\n\tb=bYDPC7cVt/93s6ukSPvhoHJp/nX/t0pK0UjfhozX36gHgG8xPXLh7Rgu6ZiKfryS/Y\n\tD+62Sha6PhgherRxDqD2RFM5QZMBl+NAJv9+1Xp1bPbXGF5g59ufpOmJ8IDEONA8bXFa\n\taNq38f3s36sl00NisEI1IcDxa35F/5uuZqGXXOji9Tpk0z6eJXJ77CUbOsnv28R8tQ7C\n\t/1exQGQ/rAQpl6L98NNhwfEsFgeSJDyFHbfP4IzlBvLhCmhIycqkJsjS5rCE30QxYpCL\n\tFiqspmjkPe5Ay9uPV+CIKPbMU3J/AAy3rvSFD6KPI6SiZ+bTPKok51cKOZwE5FUXRCoC\n\tfhow==","X-Gm-Message-State":"AHYfb5j4cMH9E2EDuFKHNCYWyIfYNtSZtVbEVK1NcpRMXiO2eY2+zSU6\n\t0xIoaLof9SGPUQ==","X-Received":"by 10.55.76.130 with SMTP id z124mr5593573qka.0.1504014306181;\n\tTue, 29 Aug 2017 06:45:06 -0700 (PDT)","To":"Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>, qemu-devel@nongnu.org, \n\tqemu-ppc@nongnu.org, famz@redhat.com, pbonzini@redhat.com,\n\tEric Blake <eblake@redhat.com>","References":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","Message-ID":"<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>","Date":"Tue, 29 Aug 2017 10:45:01 -0300","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":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c09::242","Subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","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":"Peter Maydell <peter.maydell@linaro.org>","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":1759949,"web_url":"http://patchwork.ozlabs.org/comment/1759949/","msgid":"<e70b2b00-e471-7d9b-c754-6245b723ea94@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-08-30T08:07:38","subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","submitter":{"id":72241,"url":"http://patchwork.ozlabs.org/api/people/72241/","name":"seeteena","email":"s1seetee@linux.vnet.ibm.com"},"content":"On 08/29/2017 07:15 PM, Philippe Mathieu-Daudé wrote:\n> Hi Seeteena,\n>\n> On 08/29/2017 02:45 AM, Seeteena Thoufeek wrote:\n>> ---Steps to Reproduce---\n>>\n>> When passed a negative number to 'maxcpus' parameter, Qemu aborts\n>> with a core dump.\n>>\n>> Run the following command with maxcpus argument as negative number\n>>\n>> ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine\n>> pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,\n>> drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,\n>> if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet\n>> :127.0.0.1:1234,server,nowait -net nic,model=virtio -net\n>> user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,\n>> threads=1,maxcpus=-12\n>>\n>> (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate\n>>   18446744073709550568 bytes\n>>\n>> Trace/breakpoint trap\n>>\n>> Reported-by: R.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>\n>> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>\n>> ---\n>> v1 -> v2:\n>>    - Fix the error check in vl.c to make it generic.\n>> v2 -> v3:\n>>    - Fix coding style pointed out by patchew.\n>>    - Fix check for \"<= 0\" instead of just \"< 0\".\n>> v3 -> v4:\n>>    - Fix subject line.\n>>    - Removed space before \":\" from vl.c:1248\n>>    - Removed Reviewed-by: flag.\n>> ---\n>>   vl.c | 5 ++++-\n>>   1 file changed, 4 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/vl.c b/vl.c\n>> index 8e247cc..2d9e73d 100644\n>> --- a/vl.c\n>> +++ b/vl.c\n>> @@ -1244,7 +1244,10 @@ static void smp_parse(QemuOpts *opts)\n>>           }\n>>             max_cpus = qemu_opt_get_number(opts, \"maxcpus\", cpus);\n>> -\n>> +        if (max_cpus <= 0) {\n>> +            error_report(\"Invalid max_cpus: %d\", max_cpus);\n>\n> I disagree with this patch, I think the correct fix is to declare \n> max_cpus as unsigned.\n> Looking at the codebase I can't find any signed use of it.\n    if I declare max_cpus as unsigned, the error check is no more valid \nas the value max_cpus fetches is of unsigned type and hence we cannot do \nthis below check.\n                                                     if (max_cpus <= 0) {\nerror_report(\"Invalid max_cpus: %d\", max_cpus);\n\nWhen I remove the error check with max_cpus defined as unsigned, the \ncode behaves as follows when negetive value is passed for maxcpus\n    ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine \npseries,accel=kvm,kvm-type=HV -m size=20g -device \nvirtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-12\n\n\nSLOF **********************************************************************\nQEMU Starting\n  Build Date = Jan  4 2017 05:15:48\n  FW Version = buildd@ release 20161019\n  Press \"s\" to enter Open Firmware.\n\n>\n>> +            exit(1);\n>> +        }\n>>           if (max_cpus < cpus) {\n>>               error_report(\"maxcpus must be equal to or greater than \n>> smp\");\n>>               exit(1);\n>>\n>\n> Regards,\n>\n> Phil.\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 3xhyn31ybsz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 18:08:20 +1000 (AEST)","from localhost ([::1]:48926 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 1dmy2s-0006Ut-4z\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 04:08:18 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56397)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1dmy2T-0006UY-Fs\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 04:07:54 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1dmy2Q-0001Az-98\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 04:07:53 -0400","from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60641)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <s1seetee@linux.vnet.ibm.com>)\n\tid 1dmy2P-0001Al-Ve\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 04:07:50 -0400","from pps.filterd (m0098393.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7U87YjB071423\n\tfor <qemu-devel@nongnu.org>; Wed, 30 Aug 2017 04:07:48 -0400","from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cnqu36guk-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Wed, 30 Aug 2017 04:07:48 -0400","from localhost\n\tby e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <s1seetee@linux.vnet.ibm.com>;\n\tWed, 30 Aug 2017 02:07:47 -0600","from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19)\n\tby e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tWed, 30 Aug 2017 02:07:43 -0600","from b03ledav002.gho.boulder.ibm.com\n\t(b03ledav002.gho.boulder.ibm.com [9.17.130.233])\n\tby b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7U87hAG62128348; Wed, 30 Aug 2017 01:07:43 -0700","from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 2DA68136046;\n\tWed, 30 Aug 2017 02:07:43 -0600 (MDT)","from oc1548405160.ibm.com (unknown [9.109.223.140])\n\tby b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id\n\t5DD3013603A; Wed, 30 Aug 2017 02:07:40 -0600 (MDT)"],"To":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tqemu-devel@nongnu.org, qemu-ppc@nongnu.org, famz@redhat.com, \n\tpbonzini@redhat.com, Eric Blake <eblake@redhat.com>","References":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>\n\t<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>","From":"seeteena <s1seetee@linux.vnet.ibm.com>","Date":"Wed, 30 Aug 2017 13:37:38 +0530","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":"<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17083008-0028-0000-0000-00000848A12B","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007635; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00909632; UDB=6.00456231;\n\tIPR=6.00689916; \n\tBA=6.00005560; 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.00016927;\n\tXFM=3.00000015; UTC=2017-08-30 08:07:46","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17083008-0029-0000-0000-00003759C659","Message-Id":"<e70b2b00-e471-7d9b-c754-6245b723ea94@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-30_04:, , 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-1708300119","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0a-001b2d01.pphosted.com id v7U87YjB071423","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.156.1","Subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","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":"Peter Maydell <peter.maydell@linaro.org>","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":1760155,"web_url":"http://patchwork.ozlabs.org/comment/1760155/","msgid":"<59193a65-f1d1-4383-b776-053dce6e9746@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-08-30T13:27:46","subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","submitter":{"id":72241,"url":"http://patchwork.ozlabs.org/api/people/72241/","name":"seeteena","email":"s1seetee@linux.vnet.ibm.com"},"content":"On 08/30/2017 01:37 PM, seeteena wrote:\n>\n>\n> On 08/29/2017 07:15 PM, Philippe Mathieu-Daudé wrote:\n>> Hi Seeteena,\n>>\n>> On 08/29/2017 02:45 AM, Seeteena Thoufeek wrote:\n>>> ---Steps to Reproduce---\n>>>\n>>> When passed a negative number to 'maxcpus' parameter, Qemu aborts\n>>> with a core dump.\n>>>\n>>> Run the following command with maxcpus argument as negative number\n>>>\n>>> ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine\n>>> pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,\n>>> drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,\n>>> if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet\n>>> :127.0.0.1:1234,server,nowait -net nic,model=virtio -net\n>>> user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,\n>>> threads=1,maxcpus=-12\n>>>\n>>> (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate\n>>>   18446744073709550568 bytes\n>>>\n>>> Trace/breakpoint trap\n>>>\n>>> Reported-by: R.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>\n>>> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>\n>>> ---\n>>> v1 -> v2:\n>>>    - Fix the error check in vl.c to make it generic.\n>>> v2 -> v3:\n>>>    - Fix coding style pointed out by patchew.\n>>>    - Fix check for \"<= 0\" instead of just \"< 0\".\n>>> v3 -> v4:\n>>>    - Fix subject line.\n>>>    - Removed space before \":\" from vl.c:1248\n>>>    - Removed Reviewed-by: flag.\n>>> ---\n>>>   vl.c | 5 ++++-\n>>>   1 file changed, 4 insertions(+), 1 deletion(-)\n>>>\n>>> diff --git a/vl.c b/vl.c\n>>> index 8e247cc..2d9e73d 100644\n>>> --- a/vl.c\n>>> +++ b/vl.c\n>>> @@ -1244,7 +1244,10 @@ static void smp_parse(QemuOpts *opts)\n>>>           }\n>>>             max_cpus = qemu_opt_get_number(opts, \"maxcpus\", cpus);\n>>> -\n>>> +        if (max_cpus <= 0) {\n>>> +            error_report(\"Invalid max_cpus: %d\", max_cpus);\n>>\n>> I disagree with this patch, I think the correct fix is to declare \n>> max_cpus as unsigned.\n>> Looking at the codebase I can't find any signed use of it.\n>    if I declare max_cpus as unsigned, the error check is no more valid \n> as the value max_cpus fetches is of unsigned type and hence we cannot \n> do this below check.\n>                                                     if (max_cpus <= 0) {\n> error_report(\"Invalid max_cpus: %d\", max_cpus);\n>\n> When I remove the error check with max_cpus defined as unsigned, the \n> code behaves as follows when negetive value is passed for maxcpus\n>    ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine \n> pseries,accel=kvm,kvm-type=HV -m size=20g -device \n> virtio-blk-pci,drive=rootdisk -drive \n> file=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n> -monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio \n> -net user -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-12\n>\n>\n> SLOF \n> **********************************************************************\n> QEMU Starting\n>  Build Date = Jan  4 2017 05:15:48\n>  FW Version = buildd@ release 20161019\n>  Press \"s\" to enter Open Firmware.\n>\n\nAdding .. between we have max_cpus declared as extern int max_cpus; in \nsysemu.h file.\n>>\n>>> +            exit(1);\n>>> +        }\n>>>           if (max_cpus < cpus) {\n>>>               error_report(\"maxcpus must be equal to or greater than \n>>> smp\");\n>>>               exit(1);\n>>>\n>>\n>> Regards,\n>>\n>> Phil.\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>)","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 3xj5yT4fzKz9sN7\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 23:32:01 +1000 (AEST)","from localhost ([::1]:50604 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 1dn367-0007bE-DC\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 09:31:59 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:52099)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1dn32J-0004f4-FB\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 09:28:08 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1dn32F-0007LK-Ci\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 09:28:03 -0400","from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60252)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <s1seetee@linux.vnet.ibm.com>)\n\tid 1dn32F-0007Jh-3I\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 09:27:59 -0400","from pps.filterd (m0098409.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7UDPDHd027199\n\tfor <qemu-devel@nongnu.org>; Wed, 30 Aug 2017 09:27:57 -0400","from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cntm0h78r-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Wed, 30 Aug 2017 09:27:57 -0400","from localhost\n\tby e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <s1seetee@linux.vnet.ibm.com>;\n\tWed, 30 Aug 2017 07:27:56 -0600","from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17)\n\tby e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tWed, 30 Aug 2017 07:27:53 -0600","from b03ledav005.gho.boulder.ibm.com\n\t(b03ledav005.gho.boulder.ibm.com [9.17.130.236])\n\tby b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7UDRqYY60293170; Wed, 30 Aug 2017 06:27:52 -0700","from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id B951DBE03A;\n\tWed, 30 Aug 2017 07:27:52 -0600 (MDT)","from oc1548405160.ibm.com (unknown [9.79.178.104])\n\tby b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id 17F2DBE03B;\n\tWed, 30 Aug 2017 07:27:48 -0600 (MDT)"],"From":"seeteena <s1seetee@linux.vnet.ibm.com>","To":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tqemu-devel@nongnu.org, qemu-ppc@nongnu.org, famz@redhat.com, \n\tpbonzini@redhat.com, Eric Blake <eblake@redhat.com>","References":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>\n\t<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>\n\t<e70b2b00-e471-7d9b-c754-6245b723ea94@linux.vnet.ibm.com>","Date":"Wed, 30 Aug 2017 18:57:46 +0530","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":"<e70b2b00-e471-7d9b-c754-6245b723ea94@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17083013-0008-0000-0000-0000087F52C6","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007636; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00909738; UDB=6.00456295;\n\tIPR=6.00690023; \n\tBA=6.00005561; 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.00016930;\n\tXFM=3.00000015; UTC=2017-08-30 13:27:55","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17083013-0009-0000-0000-000043C5C4C0","Message-Id":"<59193a65-f1d1-4383-b776-053dce6e9746@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-30_06:, , 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-1708300202","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0a-001b2d01.pphosted.com id v7UDPDHd027199","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.156.1","Subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","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":"Peter Maydell <peter.maydell@linaro.org>","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":1760375,"web_url":"http://patchwork.ozlabs.org/comment/1760375/","msgid":"<8947138e-fbe5-5e86-f42e-b79c2d6fb33a@amsat.org>","list_archive_url":null,"date":"2017-08-30T17:10:18","subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"content":"Hi Seeteena,\n\n>>> On 08/29/2017 02:45 AM, Seeteena Thoufeek wrote:\n>>>> ---Steps to Reproduce---\n>>>>\n>>>> When passed a negative number to 'maxcpus' parameter, Qemu aborts\n>>>> with a core dump.\n>>>>\n>>>> Run the following command with maxcpus argument as negative number\n>>>>\n>>>> ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine\n>>>> pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,\n>>>> drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,\n>>>> if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet\n>>>> :127.0.0.1:1234,server,nowait -net nic,model=virtio -net\n>>>> user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,\n>>>> threads=1,maxcpus=-12\n\nUsing 'extern unsigned int max_cpus;' I get:\n\nqemu-system-ppc64: Number of SMP CPUs requested (-12) exceeds max CPUs \nsupported by machine 'pseries-2.10' (1024)\n\nWhich looks weird but sane :)\n\n>>>>\n>>>> (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate\n>>>>   18446744073709550568 bytes\n>>>>\n>>>> Trace/breakpoint trap\n>>>>\n>>>> Reported-by: R.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>\n>>>> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>\n>>>> ---\n>>>> v1 -> v2:\n>>>>    - Fix the error check in vl.c to make it generic.\n>>>> v2 -> v3:\n>>>>    - Fix coding style pointed out by patchew.\n>>>>    - Fix check for \"<= 0\" instead of just \"< 0\".\n>>>> v3 -> v4:\n>>>>    - Fix subject line.\n>>>>    - Removed space before \":\" from vl.c:1248\n>>>>    - Removed Reviewed-by: flag.\n>>>> ---\n>>>>   vl.c | 5 ++++-\n>>>>   1 file changed, 4 insertions(+), 1 deletion(-)\n>>>>\n>>>> diff --git a/vl.c b/vl.c\n>>>> index 8e247cc..2d9e73d 100644\n>>>> --- a/vl.c\n>>>> +++ b/vl.c\n>>>> @@ -1244,7 +1244,10 @@ static void smp_parse(QemuOpts *opts)\n>>>>           }\n>>>>             max_cpus = qemu_opt_get_number(opts, \"maxcpus\", cpus);\n>>>> -\n>>>> +        if (max_cpus <= 0) {\n>>>> +            error_report(\"Invalid max_cpus: %d\", max_cpus);\n>>>\n>>> I disagree with this patch, I think the correct fix is to declare \n>>> max_cpus as unsigned.\n>>> Looking at the codebase I can't find any signed use of it.\n>>    if I declare max_cpus as unsigned, the error check is no more valid \n>> as the value max_cpus fetches is of unsigned type and hence we cannot \n>> do this below check.\n>>                                                     if (max_cpus <= 0) {\n>> error_report(\"Invalid max_cpus: %d\", max_cpus);\n>>\n>> When I remove the error check with max_cpus defined as unsigned, the \n>> code behaves as follows when negetive value is passed for maxcpus\n>>    ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine \n>> pseries,accel=kvm,kvm-type=HV -m size=20g -device \n>> virtio-blk-pci,drive=rootdisk -drive \n>> file=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n>> -monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio \n>> -net user -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-12\n>>\n>>\n>> SLOF \n>> **********************************************************************\n>> QEMU Starting\n>>  Build Date = Jan  4 2017 05:15:48\n>>  FW Version = buildd@ release 20161019\n>>  Press \"s\" to enter Open Firmware.\n>>\n> \n> Adding .. between we have max_cpus declared as extern int max_cpus; in \n> sysemu.h file.\n>>>\n>>>> +            exit(1);\n>>>> +        }\n>>>>           if (max_cpus < cpus) {\n>>>>               error_report(\"maxcpus must be equal to or greater than \n>>>> smp\");\n>>>>               exit(1);\n>>>>\n>>>\n>>> Regards,\n>>>\n>>> Phil.\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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"O8GfyX6h\"; dkim-atps=neutral"],"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 3xjCb76zdQz9sN5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 03:45:39 +1000 (AEST)","from localhost ([::1]:51891 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 1dn73Z-0007rL-Mz\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 13:45:37 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34761)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dn6Vb-0000zQ-HL\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 13:10:35 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dn6Va-0003j2-Am\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 13:10:31 -0400","from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:38283)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dn6VV-0003hB-Nq; Wed, 30 Aug 2017 13:10:25 -0400","by mail-qt0-x234.google.com with SMTP id w42so29800265qtg.5;\n\tWed, 30 Aug 2017 10:10:25 -0700 (PDT)","from [192.168.43.33] ([170.51.34.109])\n\tby smtp.gmail.com with ESMTPSA id\n\tk126sm1858082qke.79.2017.08.30.10.10.21\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 30 Aug 2017 10:10:24 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=VF4Nar/ARI1bvE9GW8iHrIf9f8LarViUc2XzVKtwmxY=;\n\tb=O8GfyX6h9E+bMbxAZDeHPaS45AcZ3ArlLq/8p2IXCC3aH1Ute0+Ay+q/PumFmwKz1g\n\tKeUD1ULkhEqBEQT9yIwDhF/mjo7e9GVd5YZNLw1PxjimYXnf/PFDCtQ3PRhCYuEzqA8H\n\t9YSBzFwnQdqbPB3DrIaXue/vNR8G4qA8yb436OEI/5v1GLDH2umT7dqJ98dtrMtDrZdy\n\tAu01nGAt08ISJDoN+BEnwUbVRJUW2bW6cLiSHzy9A5jswzyz4lNCU2+Usq2jTmpjAUtV\n\tKluYUigS4fxcjWdpNfLmops7tjQwt2PBC48LdyNy86h/rXFgXnh8ZuqCtt5aKRUvB4dn\n\tx8qA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=VF4Nar/ARI1bvE9GW8iHrIf9f8LarViUc2XzVKtwmxY=;\n\tb=CqQZPiP4wgctvyO0P6f1y3NVWaGLGNrNB5C7TZYUX4F71op/FmEoLwCv1OFCHSg6Nw\n\tW60Mymx5gyCOeZVkST+iekpJYuNm3h72ecxQqsR53R5BgTO2DdFf7fE/kDS8shoIgLad\n\t9t1x4eo+JqK8de9SW+s1BTd41zQ8HdmYEP7BGEJpIsNmcA6AhlKRnV7+vN4SlkPnC0wi\n\tvFpInsrLptfVWMuz7z1FhuHIeYKHT1MKfzhE8QIVVUPEM+OGt9Uv/PucTx+2sV5K4m2+\n\tj5xfjlE1fnczGkHXmp3iBLtlFBJv7tGQ+Wm1mXMvrrgN7pnixWSpF7aXVKKM3MkXkSZs\n\tOuLA==","X-Gm-Message-State":"AHYfb5g3rVvkuAw8R7USzQLUHz4HB21DszdjmH6m4J+TYGCCQ4vQfmOp\n\tCFq3hriTNipCyA==","X-Received":"by 10.200.51.148 with SMTP id c20mr3232340qtb.268.1504113025079; \n\tWed, 30 Aug 2017 10:10:25 -0700 (PDT)","To":"seeteena <s1seetee@linux.vnet.ibm.com>, qemu-devel@nongnu.org,\n\tqemu-ppc@nongnu.org, famz@redhat.com, pbonzini@redhat.com,\n\tEric Blake <eblake@redhat.com>","References":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>\n\t<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>\n\t<e70b2b00-e471-7d9b-c754-6245b723ea94@linux.vnet.ibm.com>\n\t<59193a65-f1d1-4383-b776-053dce6e9746@linux.vnet.ibm.com>","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","Message-ID":"<8947138e-fbe5-5e86-f42e-b79c2d6fb33a@amsat.org>","Date":"Wed, 30 Aug 2017 14:10:18 -0300","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":"<59193a65-f1d1-4383-b776-053dce6e9746@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c0d::234","Subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","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":"Peter Maydell <peter.maydell@linaro.org>","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":1761567,"web_url":"http://patchwork.ozlabs.org/comment/1761567/","msgid":"<7625a61a-ed72-a23b-149d-7a95a90a8487@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-01T10:16:06","subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","submitter":{"id":72241,"url":"http://patchwork.ozlabs.org/api/people/72241/","name":"seeteena","email":"s1seetee@linux.vnet.ibm.com"},"content":"On 08/30/2017 10:40 PM, Philippe Mathieu-Daudé wrote:\n> Hi Seeteena,\n>\n>>>> On 08/29/2017 02:45 AM, Seeteena Thoufeek wrote:\n>>>>> ---Steps to Reproduce---\n>>>>>\n>>>>> When passed a negative number to 'maxcpus' parameter, Qemu aborts\n>>>>> with a core dump.\n>>>>>\n>>>>> Run the following command with maxcpus argument as negative number\n>>>>>\n>>>>> ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine\n>>>>> pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,\n>>>>> drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,\n>>>>> if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet\n>>>>> :127.0.0.1:1234,server,nowait -net nic,model=virtio -net\n>>>>> user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,\n>>>>> threads=1,maxcpus=-12\n>\n> Using 'extern unsigned int max_cpus;' I get:\n>\n> qemu-system-ppc64: Number of SMP CPUs requested (-12) exceeds max CPUs \n> supported by machine 'pseries-2.10' (1024)\n>\n> Which looks weird but sane :)\n:). With ''extern unsigned int max_cpus;\" How about changing the message \nto print as follows so it is more meaningful..\n\nqemu-system-ppc64: Invalid SMP CPUs (-12) max CPUs supported by machine \n'pseries-artful' (1024)\n\nTried this with various combinations - Here is the results -\n\n/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-12\n\nqemu-system-ppc64: Invalid SMP CPUs (-12) max CPUs supported by machine \n'pseries-artful' (1024)\n\n/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=1026\n\nqemu-system-ppc64: Invalid SMP CPUs (1026) max CPUs supported by machine \n'pseries-artful' (1024)\n\n/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=10\n\n\nSLOF **********************************************************************\nQEMU Starting\n  Build Date = Jan  4 2017 05:15:48\n  FW Version = buildd@ release 20161019\n  Press \"s\" to enter Open Firmware.\n\n/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=-1,threads=-1,maxcpus=0\nqemu-system-ppc64: maxcpus must be equal to or greater than smp\n\n~/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=-1,threads=-1,maxcpus=-1256\n\nqemu-system-ppc64: Invalid SMP CPUs (-1256) max CPUs supported by \nmachine 'pseries-artful' (1024)\n\n\n>\n>>>>>\n>>>>> (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate\n>>>>>   18446744073709550568 bytes\n>>>>>\n>>>>> Trace/breakpoint trap\n>>>>>\n>>>>> Reported-by: R.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>\n>>>>> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>\n>>>>> ---\n>>>>> v1 -> v2:\n>>>>>    - Fix the error check in vl.c to make it generic.\n>>>>> v2 -> v3:\n>>>>>    - Fix coding style pointed out by patchew.\n>>>>>    - Fix check for \"<= 0\" instead of just \"< 0\".\n>>>>> v3 -> v4:\n>>>>>    - Fix subject line.\n>>>>>    - Removed space before \":\" from vl.c:1248\n>>>>>    - Removed Reviewed-by: flag.\n>>>>> ---\n>>>>>   vl.c | 5 ++++-\n>>>>>   1 file changed, 4 insertions(+), 1 deletion(-)\n>>>>>\n>>>>> diff --git a/vl.c b/vl.c\n>>>>> index 8e247cc..2d9e73d 100644\n>>>>> --- a/vl.c\n>>>>> +++ b/vl.c\n>>>>> @@ -1244,7 +1244,10 @@ static void smp_parse(QemuOpts *opts)\n>>>>>           }\n>>>>>             max_cpus = qemu_opt_get_number(opts, \"maxcpus\", cpus);\n>>>>> -\n>>>>> +        if (max_cpus <= 0) {\n>>>>> +            error_report(\"Invalid max_cpus: %d\", max_cpus);\n>>>>\n>>>> I disagree with this patch, I think the correct fix is to declare \n>>>> max_cpus as unsigned.\n>>>> Looking at the codebase I can't find any signed use of it.\n>>>    if I declare max_cpus as unsigned, the error check is no more \n>>> valid as the value max_cpus fetches is of unsigned type and hence we \n>>> cannot do this below check.\n>>>                                                     if (max_cpus <= \n>>> 0) {\n>>> error_report(\"Invalid max_cpus: %d\", max_cpus);\n>>>\n>>> When I remove the error check with max_cpus defined as unsigned, the \n>>> code behaves as follows when negetive value is passed for maxcpus\n>>>    ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine \n>>> pseries,accel=kvm,kvm-type=HV -m size=20g -device \n>>> virtio-blk-pci,drive=rootdisk -drive \n>>> file=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n>>> -monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio \n>>> -net user -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-12\n>>>\n>>>\n>>> SLOF \n>>> **********************************************************************\n>>> QEMU Starting\n>>>  Build Date = Jan  4 2017 05:15:48\n>>>  FW Version = buildd@ release 20161019\n>>>  Press \"s\" to enter Open Firmware.\n>>>\n>>\n>> Adding .. between we have max_cpus declared as extern int max_cpus; \n>> in sysemu.h file.\n>>>>\n>>>>> +            exit(1);\n>>>>> +        }\n>>>>>           if (max_cpus < cpus) {\n>>>>>               error_report(\"maxcpus must be equal to or greater \n>>>>> than smp\");\n>>>>>               exit(1);\n>>>>>\n>>>>\n>>>> Regards,\n>>>>\n>>>> Phil.\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>)","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 3xkFXQ4jv4z9t2d\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 20:16:54 +1000 (AEST)","from localhost ([::1]:33672 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 1dnj0O-0007qA-NS\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 06:16:52 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:41172)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1dnizx-0007pf-MC\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:16:27 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1dnizs-0005OV-D1\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:16:25 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60548\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 <s1seetee@linux.vnet.ibm.com>)\n\tid 1dnizs-0005No-7i\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:16:20 -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\tv81ADpZ5101885\n\tfor <qemu-devel@nongnu.org>; Fri, 1 Sep 2017 06:16:18 -0400","from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2cq5eu0w3k-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Fri, 01 Sep 2017 06:16:17 -0400","from localhost\n\tby e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <s1seetee@linux.vnet.ibm.com>;\n\tFri, 1 Sep 2017 04:16:16 -0600","from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16)\n\tby e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 1 Sep 2017 04:16:14 -0600","from b03ledav004.gho.boulder.ibm.com\n\t(b03ledav004.gho.boulder.ibm.com [9.17.130.235])\n\tby b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v81AGDMC7143734; Fri, 1 Sep 2017 03:16:13 -0700","from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id AF9DA78038;\n\tFri,  1 Sep 2017 04:16:13 -0600 (MDT)","from oc1548405160.ibm.com (unknown [9.195.39.52])\n\tby b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id DB35278037;\n\tFri,  1 Sep 2017 04:16:08 -0600 (MDT)"],"To":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tqemu-devel@nongnu.org, qemu-ppc@nongnu.org, famz@redhat.com, \n\tpbonzini@redhat.com, Eric Blake <eblake@redhat.com>","References":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>\n\t<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>\n\t<e70b2b00-e471-7d9b-c754-6245b723ea94@linux.vnet.ibm.com>\n\t<59193a65-f1d1-4383-b776-053dce6e9746@linux.vnet.ibm.com>\n\t<8947138e-fbe5-5e86-f42e-b79c2d6fb33a@amsat.org>","From":"seeteena <s1seetee@linux.vnet.ibm.com>","Date":"Fri, 1 Sep 2017 15:46:06 +0530","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":"<8947138e-fbe5-5e86-f42e-b79c2d6fb33a@amsat.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17090110-0024-0000-0000-00001721A761","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007646; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00910635; UDB=6.00456831;\n\tIPR=6.00690915; \n\tBA=6.00005563; 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.00016957;\n\tXFM=3.00000015; UTC=2017-09-01 10:16:16","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17090110-0025-0000-0000-00004C8B1D8F","Message-Id":"<7625a61a-ed72-a23b-149d-7a95a90a8487@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-01_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-1709010148","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0b-001b2d01.pphosted.com id v81ADpZ5101885","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 v4] vl: exit if maxcpus is negative","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":"Peter Maydell <peter.maydell@linaro.org>","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":1762490,"web_url":"http://patchwork.ozlabs.org/comment/1762490/","msgid":"<bbb41312-8f52-05ac-00df-bf738b3fe75c@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-04T07:51:21","subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","submitter":{"id":72241,"url":"http://patchwork.ozlabs.org/api/people/72241/","name":"seeteena","email":"s1seetee@linux.vnet.ibm.com"},"content":"On 08/30/2017 10:40 PM, Philippe Mathieu-Daudé wrote:\n> Hi Seeteena,\n>\n>>>> On 08/29/2017 02:45 AM, Seeteena Thoufeek wrote:\n>>>>> ---Steps to Reproduce---\n>>>>>\n>>>>> When passed a negative number to 'maxcpus' parameter, Qemu aborts\n>>>>> with a core dump.\n>>>>>\n>>>>> Run the following command with maxcpus argument as negative number\n>>>>>\n>>>>> ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine\n>>>>> pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,\n>>>>> drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,\n>>>>> if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet\n>>>>> :127.0.0.1:1234,server,nowait -net nic,model=virtio -net\n>>>>> user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,\n>>>>> threads=1,maxcpus=-12\n>\n> Using 'extern unsigned int max_cpus;' I get:\n>\n> qemu-system-ppc64: Number of SMP CPUs requested (-12) exceeds max CPUs \n> supported by machine 'pseries-2.10' (1024)\n>\n> Which looks weird but sane :)\n\nWith ''extern unsigned int max_cpus;\" How about changing the message to \nprint as follows\n\n/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-12\n\nqemu-system-ppc64: Invalid SMP CPUs -12. The max CPUs supported by \nmachine 'pseries-artful' is 1024\n\n/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=12\n\n\nSLOF **********************************************************************\nQEMU Starting\n  Build Date = Jan  4 2017 05:15:48\n  FW Version = buildd@ release 20161019\n  Press \"s\" to enter Open Firmware.\n\n\n~/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-1024\n\nqemu-system-ppc64: Invalid SMP CPUs -1024. The max CPUs supported by \nmachine 'pseries-artful' is 1024\n\n~/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=1026\nqemu-system-ppc64: Invalid SMP CPUs 1026. The max CPUs supported by \nmachine 'pseries-artful' is 1024\n\n/qemu_ubuntu1710/qemu-2.10~rc3+dfsg# ppc64-softmmu/qemu-system-ppc64 \n--nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m size=20g \n-device virtio-blk-pci,drive=rootdisk -drive \nfile=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n-monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net \nuser -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=0\nqemu-system-ppc64: maxcpus must be equal to or greater than smp\n\n>\n>>>>>\n>>>>> (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate\n>>>>>   18446744073709550568 bytes\n>>>>>\n>>>>> Trace/breakpoint trap\n>>>>>\n>>>>> Reported-by: R.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>\n>>>>> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>\n>>>>> ---\n>>>>> v1 -> v2:\n>>>>>    - Fix the error check in vl.c to make it generic.\n>>>>> v2 -> v3:\n>>>>>    - Fix coding style pointed out by patchew.\n>>>>>    - Fix check for \"<= 0\" instead of just \"< 0\".\n>>>>> v3 -> v4:\n>>>>>    - Fix subject line.\n>>>>>    - Removed space before \":\" from vl.c:1248\n>>>>>    - Removed Reviewed-by: flag.\n>>>>> ---\n>>>>>   vl.c | 5 ++++-\n>>>>>   1 file changed, 4 insertions(+), 1 deletion(-)\n>>>>>\n>>>>> diff --git a/vl.c b/vl.c\n>>>>> index 8e247cc..2d9e73d 100644\n>>>>> --- a/vl.c\n>>>>> +++ b/vl.c\n>>>>> @@ -1244,7 +1244,10 @@ static void smp_parse(QemuOpts *opts)\n>>>>>           }\n>>>>>             max_cpus = qemu_opt_get_number(opts, \"maxcpus\", cpus);\n>>>>> -\n>>>>> +        if (max_cpus <= 0) {\n>>>>> +            error_report(\"Invalid max_cpus: %d\", max_cpus);\n>>>>\n>>>> I disagree with this patch, I think the correct fix is to declare \n>>>> max_cpus as unsigned.\n>>>> Looking at the codebase I can't find any signed use of it.\n>>>    if I declare max_cpus as unsigned, the error check is no more \n>>> valid as the value max_cpus fetches is of unsigned type and hence we \n>>> cannot do this below check.\n>>>                                                     if (max_cpus <= \n>>> 0) {\n>>> error_report(\"Invalid max_cpus: %d\", max_cpus);\n>>>\n>>> When I remove the error check with max_cpus defined as unsigned, the \n>>> code behaves as follows when negetive value is passed for maxcpus\n>>>    ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine \n>>> pseries,accel=kvm,kvm-type=HV -m size=20g -device \n>>> virtio-blk-pci,drive=rootdisk -drive \n>>> file=/var/lib/libvirt/images/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-17.10-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 \n>>> -monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio \n>>> -net user -device nec-usb-xhci -smp 8,cores=1,threads=1,maxcpus=-12\n>>>\n>>>\n>>> SLOF \n>>> **********************************************************************\n>>> QEMU Starting\n>>>  Build Date = Jan  4 2017 05:15:48\n>>>  FW Version = buildd@ release 20161019\n>>>  Press \"s\" to enter Open Firmware.\n>>>\n>>\n>> Adding .. between we have max_cpus declared as extern int max_cpus; \n>> in sysemu.h file.\n>>>>\n>>>>> +            exit(1);\n>>>>> +        }\n>>>>>           if (max_cpus < cpus) {\n>>>>>               error_report(\"maxcpus must be equal to or greater \n>>>>> than smp\");\n>>>>>               exit(1);\n>>>>>\n>>>>\n>>>> Regards,\n>>>>\n>>>> Phil.\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>)","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 3xm29x2wb4z9s06\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  4 Sep 2017 17:52:05 +1000 (AEST)","from localhost ([::1]:40843 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 1domAt-0001eL-DD\n\tfor incoming@patchwork.ozlabs.org; Mon, 04 Sep 2017 03:52:03 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:38635)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1domAQ-0001do-4E\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 03:51:35 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <s1seetee@linux.vnet.ibm.com>) id 1domAN-0007wI-1I\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 03:51:34 -0400","from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52044)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <s1seetee@linux.vnet.ibm.com>)\n\tid 1domAM-0007vY-Ol\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 03:51:30 -0400","from pps.filterd (m0098409.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv847moUn048831\n\tfor <qemu-devel@nongnu.org>; Mon, 4 Sep 2017 03:51:29 -0400","from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cs15bm89f-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Mon, 04 Sep 2017 03:51:29 -0400","from localhost\n\tby e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <s1seetee@linux.vnet.ibm.com>;\n\tMon, 4 Sep 2017 01:51:28 -0600","from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19)\n\tby e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tMon, 4 Sep 2017 01:51:26 -0600","from b03ledav004.gho.boulder.ibm.com\n\t(b03ledav004.gho.boulder.ibm.com [9.17.130.235])\n\tby b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v847pPE862455960; Mon, 4 Sep 2017 00:51:25 -0700","from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id CE7F27803F;\n\tMon,  4 Sep 2017 01:51:25 -0600 (MDT)","from oc1548405160.ibm.com (unknown [9.109.223.151])\n\tby b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id 342C978059;\n\tMon,  4 Sep 2017 01:51:22 -0600 (MDT)"],"To":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tqemu-devel@nongnu.org, qemu-ppc@nongnu.org, famz@redhat.com, \n\tpbonzini@redhat.com, Eric Blake <eblake@redhat.com>","References":"<1503985539-7205-1-git-send-email-s1seetee@linux.vnet.ibm.com>\n\t<c61ae7e6-a117-a9c1-6a73-73beaede08a8@amsat.org>\n\t<e70b2b00-e471-7d9b-c754-6245b723ea94@linux.vnet.ibm.com>\n\t<59193a65-f1d1-4383-b776-053dce6e9746@linux.vnet.ibm.com>\n\t<8947138e-fbe5-5e86-f42e-b79c2d6fb33a@amsat.org>","From":"seeteena <s1seetee@linux.vnet.ibm.com>","Date":"Mon, 4 Sep 2017 13:21:21 +0530","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":"<8947138e-fbe5-5e86-f42e-b79c2d6fb33a@amsat.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17090407-0020-0000-0000-00000CA8712E","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007663; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00912015; UDB=6.00457600;\n\tIPR=6.00692278; \n\tBA=6.00005568; 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.00016994;\n\tXFM=3.00000015; UTC=2017-09-04 07:51:28","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17090407-0021-0000-0000-00005DFD0F50","Message-Id":"<bbb41312-8f52-05ac-00df-bf738b3fe75c@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-04_05:, , 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-1709040124","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0a-001b2d01.pphosted.com id v847moUn048831","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.156.1","Subject":"Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative","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":"Peter Maydell <peter.maydell@linaro.org>","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>"}}]