[{"id":1764609,"web_url":"http://patchwork.ozlabs.org/comment/1764609/","msgid":"<CAFEAcA-s026tJqgfa+kNsLtY2fEKpFs7ZT6zOk8CMg7ZX84CQA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-07T09:30:45","subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 7 September 2017 at 10:20, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:\n> Most devices use at least one address space and every time a new address\n> space is added, flat views and dispatch trees are rebuild for all address\n> spaces. This is not a problem for a relatively small amount of devices but\n> even 50 virtio-pci devices use more than 8GB of RAM.\n>\n> What happens that on every flatview/dispatch rebuild, new arrays are\n> allocated and old ones release but the release is done via RCU so until\n> an entire machine is build, they are not released.\n>\n> This wraps devices creation into memory_region_transaction_begin/commit\n> to massively reduce amount of flat view/dispatch tree (re)allocations.\n>\n> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n> ---\n>  vl.c | 4 ++++\n>  1 file changed, 4 insertions(+)\n>\n> diff --git a/vl.c b/vl.c\n> index 8e247cc2a2..3c39cc8b3a 100644\n> --- a/vl.c\n> +++ b/vl.c\n> @@ -4655,12 +4655,16 @@ int main(int argc, char **argv, char **envp)\n>      igd_gfx_passthru();\n>\n>      /* init generic devices */\n> +    memory_region_transaction_begin();\n> +\n>      rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE);\n>      if (qemu_opts_foreach(qemu_find_opts(\"device\"),\n>                            device_init_func, NULL, NULL)) {\n>          exit(1);\n>      }\n>\n> +    memory_region_transaction_commit();\n\nWhat happens if something in a device realize function tries\nto do a read from an AddressSpace? I can't think of any examples\nthat need to do that and I suspect it's probably a bug if anybody\ntries it, but I'm curious whether this change alters the failure\nmode...\n\nthanks\n-- PMM","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\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"QpPZ8DWJ\"; 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 3xnwGQ5M3Vz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 19:32:30 +1000 (AEST)","from localhost ([::1]:39556 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 1dptAi-00010i-Rz\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 05:32:28 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33537)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpt9Q-0000SF-Kg\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 05:31:13 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpt9P-0004PI-MW\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 05:31:08 -0400","from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:35632)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1dpt9P-0004Oz-F3\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 05:31:07 -0400","by mail-wm0-x22b.google.com with SMTP id f199so92220wme.0\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 02:31:07 -0700 (PDT)","by 10.223.159.68 with HTTP; Thu, 7 Sep 2017 02:30:45 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=TFW2+RixMSPshfr8L9nmEHqbPN7c1GCGrpT4d3tCDXY=;\n\tb=QpPZ8DWJH6e5pSpB/ZbUDuACvObtaftigCryzLd4t2wVQcfvhbyrijN2Fck8pSM71I\n\tN6txXHYe/XY2n/B7HK2tXdv7oKLM10ToKRP9pVHpYzC0/b2Fi9g4URIv4mjTrqpgUVcx\n\te5pR+SNzn6GI9hx2CRmX/5YRhnH3lA5I447uM=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=TFW2+RixMSPshfr8L9nmEHqbPN7c1GCGrpT4d3tCDXY=;\n\tb=Me+R2YGSoQ+MU+WKzTr/OQMD1awa5ErAkPr8WCz1TwpO8oTwlnXsAM63akUKwytBCO\n\tp2zLlUXBq188RL9gGkZEVAIceSOqIHCRJrrO3Y2nLkXIP9PExWt2IS/91zyiH8vNH/Ky\n\t0kTRWYAcHR5rjeGazFph4DIgktVTtPnCWaqN3eYgFirnXVpWoxU8Goy9963YrA49Aoj/\n\t0OCaOdhNWwHqENxFTnrhwE4bM1N5y4iEaZv6gYXpro7kbr/uuDL76Sm2OAaGNE++shMt\n\tBhiagUYirLkSmXu6Q5ba015ZFUjDgfF29InS4Cj4w8U0T9U83sRBJKpb0D1MRBQwrBO/\n\tZzmw==","X-Gm-Message-State":"AHPjjUjyhCnhHGYq5jq6+GOSgPHAhUipmhTsJ/G5E4erkv11uBVbNil4\n\tcg5u3PdlCk693fwVceal7jxebfqT3+xb+Ss=","X-Google-Smtp-Source":"ADKCNb5OpxVv1fAk1gKots6LH2tLP8R0wwMXONjeBK8CYG/gCi3Q+PzQo2ICDjoSBJ70EalUd7u8cbmOU/meHpaMYns=","X-Received":"by 10.28.63.131 with SMTP id m125mr203578wma.19.1504776666427;\n\tThu, 07 Sep 2017 02:31:06 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170907092010.3605-2-aik@ozlabs.ru>","References":"<20170907092010.3605-1-aik@ozlabs.ru>\n\t<20170907092010.3605-2-aik@ozlabs.ru>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Thu, 7 Sep 2017 10:30:45 +0100","Message-ID":"<CAFEAcA-s026tJqgfa+kNsLtY2fEKpFs7ZT6zOk8CMg7ZX84CQA@mail.gmail.com>","To":"Alexey Kardashevskiy <aik@ozlabs.ru>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::22b","Subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","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":"Stefan Hajnoczi <stefanha@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","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":1764760,"web_url":"http://patchwork.ozlabs.org/comment/1764760/","msgid":"<2e429b41-8ffd-8bf7-56c7-32461033776e@ozlabs.ru>","list_archive_url":null,"date":"2017-09-07T14:27:03","subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"content":"On 07/09/17 19:30, Peter Maydell wrote:\n> On 7 September 2017 at 10:20, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:\n>> Most devices use at least one address space and every time a new address\n>> space is added, flat views and dispatch trees are rebuild for all address\n>> spaces. This is not a problem for a relatively small amount of devices but\n>> even 50 virtio-pci devices use more than 8GB of RAM.\n>>\n>> What happens that on every flatview/dispatch rebuild, new arrays are\n>> allocated and old ones release but the release is done via RCU so until\n>> an entire machine is build, they are not released.\n>>\n>> This wraps devices creation into memory_region_transaction_begin/commit\n>> to massively reduce amount of flat view/dispatch tree (re)allocations.\n>>\n>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n>> ---\n>>  vl.c | 4 ++++\n>>  1 file changed, 4 insertions(+)\n>>\n>> diff --git a/vl.c b/vl.c\n>> index 8e247cc2a2..3c39cc8b3a 100644\n>> --- a/vl.c\n>> +++ b/vl.c\n>> @@ -4655,12 +4655,16 @@ int main(int argc, char **argv, char **envp)\n>>      igd_gfx_passthru();\n>>\n>>      /* init generic devices */\n>> +    memory_region_transaction_begin();\n>> +\n>>      rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE);\n>>      if (qemu_opts_foreach(qemu_find_opts(\"device\"),\n>>                            device_init_func, NULL, NULL)) {\n>>          exit(1);\n>>      }\n>>\n>> +    memory_region_transaction_commit();\n> \n> What happens if something in a device realize function tries\n> to do a read from an AddressSpace? \n\n\naddress_space_memory is created before that loop but yes, address spaces\nfor devices are not rendered and QEMU crashes, needs fixing.\n\n> I can't think of any examples\n> that need to do that and I suspect it's probably a bug if anybody\n> tries it, but I'm curious whether this change alters the failure\n> mode...","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=ozlabs-ru.20150623.gappssmtp.com\n\theader.i=@ozlabs-ru.20150623.gappssmtp.com\n\theader.b=\"aB8utvWD\"; 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 3xp2qK6c7lz9t2W\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 00:27:57 +1000 (AEST)","from localhost ([::1]:40726 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 1dpxme-0006sF-24\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 10:27:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:54836)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dpxm0-0006hz-46\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 10:27:20 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dpxlv-0002N5-5Y\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 10:27:16 -0400","from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:33272)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <aik@ozlabs.ru>) id 1dpxlu-0002Lc-RS\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 10:27:11 -0400","by mail-pf0-x243.google.com with SMTP id h4so1200247pfk.0\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 07:27:10 -0700 (PDT)","from [192.168.10.22] (124-171-136-142.dyn.iinet.net.au.\n\t[124.171.136.142]) by smtp.googlemail.com with ESMTPSA id\n\tc65sm4363438pfa.179.2017.09.07.07.27.05\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 07 Sep 2017 07:27:08 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ozlabs-ru.20150623.gappssmtp.com; s=20150623;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=8s6u30xsQ2p2lyA4JljqDlQkLryRJEqpthTRYDSy3Co=;\n\tb=aB8utvWDHO9lqU/3e1RN0P3tqZBdVh5/LcIt/TRsd5Q0/xNM5FPgo1LwfteHcv9CHA\n\tyPxv5/U5PR6xDAhiU8OuIz7IP9FlL0i861IH3meGziyL59K0J0wRx8tTqAXLx6cG4Yxr\n\t5KnbCttCfghaXO1s/8A82b37jiWXAP6E0ROpT8nqdq+a3+m0XQKHuvbuPFjK0M6DCXqy\n\te3yFfhUiFIVWTLjPG2y3x4CWGmiLL6cQN+dOinTpw3DJYo9yKIs6ayLWKmQ7RVs3QngQ\n\t6F+VL4lyTY1IJpre5I+GvgQYJU/yd5FF7VH+SSMt+pt4vQZYNrp5G440wbsEYClZH8jT\n\tSFtw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=8s6u30xsQ2p2lyA4JljqDlQkLryRJEqpthTRYDSy3Co=;\n\tb=dIaH46qbrsFAxffAM/v03q7ww9uPZ9GXhn482dImqg+xAqHZXWT989uk3An71GT1o5\n\t1YPcwAkY1Kn3IoNOh+SKk8Om083CWV/yS3t21+yWzswYazspuajhShY6fSysjqGHYG2g\n\tyl+uqZXzP7dDBAjfuFURDs1ASACPOVl3zGzyI2yT17s1rgtq1aOyYtIuL2XkwBTSGUNa\n\toVAUktIFySoXCB8lZ0jQPGdBySh7YanoTwCWw/4cO6utA90JTndOmGZWjyJZlN3inPLA\n\tzkn8OLomFGzPgs4SrXnGR9aBqjy1z5+p6OjHNFr4PhR1FkuSqmRsMamdRHk02x2AW506\n\t6+pg==","X-Gm-Message-State":"AHPjjUicW8LNq8DXCL9uzDTds5Y5qVxgPygsgVsHBdGArO10BKEmQ6GE\n\t4v4Icsm/M69WYAmw","X-Google-Smtp-Source":"ADKCNb5EgJodiogfscQF0ElCEj7yPJSNWTjqe0Gg0OZxyXcfyKW9RBs81AtPZ0JXUObuziu6iQ5h0A==","X-Received":"by 10.98.25.71 with SMTP id 68mr2862645pfz.65.1504794429722;\n\tThu, 07 Sep 2017 07:27:09 -0700 (PDT)","To":"Peter Maydell <peter.maydell@linaro.org>","References":"<20170907092010.3605-1-aik@ozlabs.ru>\n\t<20170907092010.3605-2-aik@ozlabs.ru>\n\t<CAFEAcA-s026tJqgfa+kNsLtY2fEKpFs7ZT6zOk8CMg7ZX84CQA@mail.gmail.com>","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","Message-ID":"<2e429b41-8ffd-8bf7-56c7-32461033776e@ozlabs.ru>","Date":"Fri, 8 Sep 2017 00:27:03 +1000","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":"<CAFEAcA-s026tJqgfa+kNsLtY2fEKpFs7ZT6zOk8CMg7ZX84CQA@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-AU","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c00::243","Subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","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":"Stefan Hajnoczi <stefanha@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","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":1764762,"web_url":"http://patchwork.ozlabs.org/comment/1764762/","msgid":"<CAFEAcA-Px28x1KcyRgQ6P68RUstWuOhHO17Z3wdG_6QL76+9xQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-07T14:30:07","subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 7 September 2017 at 15:27, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:\n> On 07/09/17 19:30, Peter Maydell wrote:\n>> What happens if something in a device realize function tries\n>> to do a read from an AddressSpace?\n>\n>\n> address_space_memory is created before that loop but yes, address spaces\n> for devices are not rendered and QEMU crashes, needs fixing.\n\nI'd be OK if we defined this to be not permitted, as long as\nwe're reasonably happy that we don't currently do it anywhere\nand the error if it does happen is fairly clear about what's\ngone wrong.\n\nthanks\n-- PMM","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\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Fm3UCRmJ\"; 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 3xp2tw3gXpz9t2M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 00:31:04 +1000 (AEST)","from localhost ([::1]:40734 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 1dpxpe-0000E7-CI\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 10:31:02 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56217)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpxpG-0000De-Gq\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 10:30:43 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpxp7-0004F0-7l\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 10:30:38 -0400","from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:36229)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1dpxp7-0004EI-12\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 10:30:29 -0400","by mail-wm0-x231.google.com with SMTP id r10so70870wmf.1\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 07:30:28 -0700 (PDT)","by 10.223.159.68 with HTTP; Thu, 7 Sep 2017 07:30:07 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=vVqvNsN7RvJLKne1ksRbsjCfhFX20i2u7rtJttEDuTE=;\n\tb=Fm3UCRmJAGIu+2490x9h6Pp4juUxgIY/WW8c2vtmMryjRBrrnCD3y+G+cItZLG0VHT\n\t8gwOvIladlNQOyFS4+/Ay5fWz29ewrUjGsQpXagjk46UX80Sp/S/sk5wF2tuXFLHSgUe\n\trhXvXSmZpWlzD5qIe9pnADUv1SrTvOZh/SS2c=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=vVqvNsN7RvJLKne1ksRbsjCfhFX20i2u7rtJttEDuTE=;\n\tb=U0UW307xvIdtNjCRvWoYlxheeTRxsrRFnEDDAC7VywLHUz0uuJYIhIWwGAuNhMNh6x\n\tTPAlasFEkM5vexy+mPqUkE6OzGXYLWtTO+rrNuupNToPYRLcfTWYYBpc3t36QLuOr6+u\n\tieOAQMEigp7sKeIhu/KZm9Pb7IAUa/iTCE7YFYSWU9MAUL1b40Nw8uk3+OmNQWdTmpgN\n\twIxR/wxYJp3Rmc4NnYmQ7d+0P8yc+lDl6zic6NwCIa6j9S77XJgaeR09DSuUz8D9c3uj\n\tk//xbR0QkjuTkjG9i0JfJObl7TW+a7vjqBp0Twtf5e1pHhTJdaKS8++nmpgnyIRXA1i3\n\t7Bsw==","X-Gm-Message-State":"AHPjjUjSOILYNrUtcbb++0+/6flKEB28KzbBnHBMQVcTsVgEsy84rWg0\n\tGctFmCtbuVfl6tojUH4vir9fLQFE369B","X-Google-Smtp-Source":"ADKCNb6xpXbGH5oeVeWt7PK2ScMnKXlu7R5mpSWEcA5Q52UXv2YKD55A6Wh4ZVqz8vYZ7wt38+SCopKTQ0LdzUE1h+8=","X-Received":"by 10.28.54.3 with SMTP id d3mr927289wma.56.1504794627706;\n\tThu, 07 Sep 2017 07:30:27 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<2e429b41-8ffd-8bf7-56c7-32461033776e@ozlabs.ru>","References":"<20170907092010.3605-1-aik@ozlabs.ru>\n\t<20170907092010.3605-2-aik@ozlabs.ru>\n\t<CAFEAcA-s026tJqgfa+kNsLtY2fEKpFs7ZT6zOk8CMg7ZX84CQA@mail.gmail.com>\n\t<2e429b41-8ffd-8bf7-56c7-32461033776e@ozlabs.ru>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Thu, 7 Sep 2017 15:30:07 +0100","Message-ID":"<CAFEAcA-Px28x1KcyRgQ6P68RUstWuOhHO17Z3wdG_6QL76+9xQ@mail.gmail.com>","To":"Alexey Kardashevskiy <aik@ozlabs.ru>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::231","Subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","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":"Stefan Hajnoczi <stefanha@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","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":1765103,"web_url":"http://patchwork.ozlabs.org/comment/1765103/","msgid":"<f445168a-10fc-2139-4bed-ceec1f1039a8@ozlabs.ru>","list_archive_url":null,"date":"2017-09-08T06:21:48","subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"content":"On 08/09/17 00:30, Peter Maydell wrote:\n> On 7 September 2017 at 15:27, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:\n>> On 07/09/17 19:30, Peter Maydell wrote:\n>>> What happens if something in a device realize function tries\n>>> to do a read from an AddressSpace?\n>>\n>>\n>> address_space_memory is created before that loop but yes, address spaces\n>> for devices are not rendered and QEMU crashes, needs fixing.\n> \n> I'd be OK if we defined this to be not permitted, as long as\n> we're reasonably happy that we don't currently do it anywhere\n> and the error if it does happen is fairly clear about what's\n> gone wrong.\n\n\nQEMU actually only crashes with 2/4 + 3/4, with just 1/4 QEMU gets to\nunassigned_mem_accepts() silently. Not sure how to convert this to a clear\nerror message.","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=ozlabs-ru.20150623.gappssmtp.com\n\theader.i=@ozlabs-ru.20150623.gappssmtp.com\n\theader.b=\"Xus4SFmQ\"; 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 3xpS0b5Fdyz9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 16:22:23 +1000 (AEST)","from localhost ([::1]:43484 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 1dqCgH-0006sR-Sm\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 02:22:21 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36665)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dqCfw-0006rv-Gy\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 02:22:05 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dqCfr-00057p-Of\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 02:22:00 -0400","from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c]:38900)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <aik@ozlabs.ru>) id 1dqCfr-00057P-IL\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 02:21:55 -0400","by mail-io0-x22c.google.com with SMTP id n69so2512562ioi.5\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 23:21:55 -0700 (PDT)","from [10.61.2.175] ([122.99.82.10])\n\tby smtp.googlemail.com with ESMTPSA id\n\to99sm601290ioi.22.2017.09.07.23.21.52\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 07 Sep 2017 23:21:54 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ozlabs-ru.20150623.gappssmtp.com; s=20150623;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=q/ix2IzFoIePGwPMlLWDvrQMTef/Q7t7BqKnWocogOQ=;\n\tb=Xus4SFmQ4+6/LC3GLR3mUUzlz4B8aSjGeNn2Yxy6+a3D0U6/jI1cZF/6rJT93Ea7E0\n\tKdTtzNHupqrNB/R1Xmqz7SciKpukQP+hHThZXfiwBlWggYUwIl1m6FGKzCgmAKU5cSD7\n\tGh7NMx4AizdlVj6WqZdqLtXYrzUXs2PnvG97FRQnlJUbNnzTSqJmYqMIZOUgHrdgcl6q\n\tYzudud/J4itU8kQi7XK/ftvqjOQw8LbO/vM4a+Pf6XrwMIKyGpGwLJR1xnG0Z8XGx1gL\n\twLrEP++gzb6tGW+4eKEP64qItnkfBpy2SLDBDrnXjV2xwxQKnRT9eOoAz+tYzBFWfyN2\n\thmWQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=q/ix2IzFoIePGwPMlLWDvrQMTef/Q7t7BqKnWocogOQ=;\n\tb=pOdpt8MEmvQHAsmqJQGZOSSwJEKK+yjuJASk2Y319DMFoy0rIzueupiX/tei+33Wy5\n\ti3KMFXz+fAwOHPDlIAYZDeXFvKsH9qfQtSF8GJ3YyclAXS5zXBOzDFf/Q2uZJ2aWkQNn\n\tI/95EbKQvSTbbx/crb0Xx7KEnJyL+i2tr0UYXKPz5Hmb5UBsHUKRg5DbQkltKiSa2uJl\n\tiwA9lpElARqqekBHxUjkF/pmheSGdtAZwDanwZ0ocKmyo4b9vkGdHeXsneEVZUyAU31j\n\tYIx3XLBC32EUcO1KSFhPg8oaDWhMJgLDptXzaU4WFZO7m9WdbhakyZRnnehhDzeNz0Dv\n\tQ0lw==","X-Gm-Message-State":"AHPjjUi3T3/T9U0hLlIeISXHnp9GWdblu8uCzltBNymaW0QFCtWHeqdr\n\tKPQcMkRlmQ++M0PY","X-Google-Smtp-Source":"AOwi7QCGaHkQhcEY1SD/OzMJTSpU4LgUQMHrbmxlvfh+5LTF1rUqzV6o6tgWZo7cxRzuRHGuoMBXuQ==","X-Received":"by 10.107.104.25 with SMTP id d25mr1893709ioc.90.1504851714841; \n\tThu, 07 Sep 2017 23:21:54 -0700 (PDT)","To":"Peter Maydell <peter.maydell@linaro.org>","References":"<20170907092010.3605-1-aik@ozlabs.ru>\n\t<20170907092010.3605-2-aik@ozlabs.ru>\n\t<CAFEAcA-s026tJqgfa+kNsLtY2fEKpFs7ZT6zOk8CMg7ZX84CQA@mail.gmail.com>\n\t<2e429b41-8ffd-8bf7-56c7-32461033776e@ozlabs.ru>\n\t<CAFEAcA-Px28x1KcyRgQ6P68RUstWuOhHO17Z3wdG_6QL76+9xQ@mail.gmail.com>","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","Message-ID":"<f445168a-10fc-2139-4bed-ceec1f1039a8@ozlabs.ru>","Date":"Fri, 8 Sep 2017 16:21:48 +1000","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":"<CAFEAcA-Px28x1KcyRgQ6P68RUstWuOhHO17Z3wdG_6QL76+9xQ@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-AU","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:4001:c06::22c","Subject":"Re: [Qemu-devel] [RFC PATCH qemu 1/4] memory: Postpone flatview and\n\tdispatch tree building till all devices are added","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":"Stefan Hajnoczi <stefanha@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","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>"}}]