[{"id":1770191,"web_url":"http://patchwork.ozlabs.org/comment/1770191/","msgid":"<cdc396c4-f09e-baf3-6da8-8a30122bac4e@ozlabs.ru>","list_archive_url":null,"date":"2017-09-18T14:06:21","subject":"Re: [Qemu-devel] [PATCH qemu v3 07/13] memory: Switch memory from\n\tusing AddressSpace to FlatView","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"content":"On 18/09/17 20:17, Alexey Kardashevskiy wrote:\n> FlatView's will be shared between AddressSpace's and subpage_t\n> and MemoryRegionSection cannot store AS anymore, hence this change.\n> \n> In particular, for:\n> \n>  typedef struct subpage_t {\n>      MemoryRegion iomem;\n> -    AddressSpace *as;\n> +    FlatView *fv;\n>      hwaddr base;\n>      uint16_t sub_section[];\n>  } subpage_t;\n> \n>   struct MemoryRegionSection {\n>      MemoryRegion *mr;\n> -    AddressSpace *address_space;\n> +    FlatView *fv;\n>      hwaddr offset_within_region;\n>      Int128 size;\n>      hwaddr offset_within_address_space;\n>      bool readonly;\n>  };\n> \n> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n> ---\n>  include/exec/memory-internal.h |   2 +-\n>  include/exec/memory.h          |  51 ++++++++----\n>  exec.c                         | 180 ++++++++++++++++++++++++-----------------\n>  hw/intc/openpic_kvm.c          |   2 +-\n>  memory.c                       |  28 ++++---\n>  5 files changed, 157 insertions(+), 106 deletions(-)\n> \n> diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h\n> index 6e08eda256..1cf8ad9869 100644\n> --- a/include/exec/memory-internal.h\n> +++ b/include/exec/memory-internal.h\n> @@ -27,7 +27,7 @@ extern const MemoryRegionOps unassigned_mem_ops;\n>  bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr,\n>                                  unsigned size, bool is_write);\n>  \n> -void mem_add(AddressSpace *as, FlatView *fv, MemoryRegionSection *section);\n> +void mem_add(FlatView *fv, MemoryRegionSection *section);\n>  AddressSpaceDispatch *mem_begin(AddressSpace *as);\n>  void mem_commit(AddressSpaceDispatch *d);\n>  \n> diff --git a/include/exec/memory.h b/include/exec/memory.h\n> index 2346f8b863..7816e5d655 100644\n> --- a/include/exec/memory.h\n> +++ b/include/exec/memory.h\n> @@ -48,6 +48,7 @@\n>  \n>  typedef struct MemoryRegionOps MemoryRegionOps;\n>  typedef struct MemoryRegionMmio MemoryRegionMmio;\n> +typedef struct FlatView FlatView;\n>  \n\nThis is missing, apparently. My gcc did not catch it :-/\n\n\ndiff --git a/memory.c b/memory.c\nindex 69f3334c9b..21e1a6f38f 100644\n--- a/memory.c\n+++ b/memory.c\n@@ -209,7 +209,6 @@ static bool\nmemory_region_ioeventfd_equal(MemoryRegionIoeventfd a,\n }\n\n typedef struct FlatRange FlatRange;\n-typedef struct FlatView FlatView;","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=\"xBXxQZG6\"; 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 3xwny160zsz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 00:12:09 +1000 (AEST)","from localhost ([::1]:36861 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 1dtwmN-0003h6-SD\n\tfor incoming@patchwork.ozlabs.org; Mon, 18 Sep 2017 10:12:07 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:42124)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dtwh1-0007nE-4b\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 10:06:36 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dtwgx-0005bU-Tl\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 10:06:35 -0400","from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:34282)\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 1dtwgx-0005ar-Jd\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 10:06:31 -0400","by mail-pf0-x241.google.com with SMTP id g65so234497pfe.1\n\tfor <qemu-devel@nongnu.org>; Mon, 18 Sep 2017 07:06:31 -0700 (PDT)","from [192.168.10.22] (124-171-134-202.dyn.iinet.net.au.\n\t[124.171.134.202]) by smtp.googlemail.com with ESMTPSA id\n\tc65sm13821154pfa.179.2017.09.18.07.06.24\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 18 Sep 2017 07:06:26 -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=lHkbLOrMKNqquOXCZExS0/5WGgYwLUmAEnV6pX/f8/c=;\n\tb=xBXxQZG6N1IuwLIEYssbMv8rlZiSwKPRGIBlRNFdwCQWFHjOXj+3CjfpF9hpWwojyU\n\tymJUMakxlZ45kDIyRE5ZWvwNobOGSsKLUFjLJyyRBFm2iu8UNqF/3xrLZN0GUYsGUzxo\n\te9nr1kdxilcuS69SeowmYCftTVbyk77sM5CUVxxb2ysx2uSRHT/IUMsI7khFkANthcJI\n\tdjo0l2iawBZx3uOcMogDSCzSdkrOX5ddDd7oGS9clSSKXzqkdXYmfSyIyyeAPeZSGNUF\n\tACSg/jUAvcO8AOWM1xWItCyPNE8v5pl4fAosbZ3JUIaSqJo+KWAucz9G2pgxho9G40jg\n\t1f/w==","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=lHkbLOrMKNqquOXCZExS0/5WGgYwLUmAEnV6pX/f8/c=;\n\tb=Wo5Fs+QO9BcCcUQuiOkgaCFl49a4G6cg/jKMyXLAaTYivyAipL9VAsxiV+zEM5huU1\n\tcw2VmuO5PppqH15viDDeYhcJpCefOS8XYB44E5ur1PX6NbUGmVBinvAcNInUffwtEGIE\n\tZDqLKArbzkwuFkKnV1f0AnF3r7uJFKJ2cQhE4rvkCkpSZ+mahBGVtHTK+L3dX4el9ZDC\n\ts76s3ma0SQtT+BLg2twr/TOx2UCbLGg2GRmqFdE0q/czl9V5pn+B11XMyt+kGVBXxdEj\n\tcij+l+HoerxmgVs0FpNzSHKddCC4jy1MVrUN3VZ2NvJ9hlJ2d8dndKP+hwAjsnAsUSSl\n\trMfw==","X-Gm-Message-State":"AHPjjUgajNrLecEqpisox1ErRzK4YSjDkyj0qTD1J1yWjypxMxOyfEhO\n\tMIbCgxHe5M6UWaYTvpw=","X-Google-Smtp-Source":"ADKCNb4aVU6bjYpY54D7MG3Qjmnvs4cevDOUS+Sv/rsTEbwWfg1ks+kVh7qA6WcQ23QS8PRQnvUZxQ==","X-Received":"by 10.159.218.8 with SMTP id v8mr36502028plp.46.1505743590724;\n\tMon, 18 Sep 2017 07:06:30 -0700 (PDT)","To":"qemu-devel@nongnu.org","References":"<20170918101709.30421-1-aik@ozlabs.ru>\n\t<20170918101709.30421-8-aik@ozlabs.ru>","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","Message-ID":"<cdc396c4-f09e-baf3-6da8-8a30122bac4e@ozlabs.ru>","Date":"Tue, 19 Sep 2017 00:06:21 +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":"<20170918101709.30421-8-aik@ozlabs.ru>","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::241","Subject":"Re: [Qemu-devel] [PATCH qemu v3 07/13] memory: Switch memory from\n\tusing AddressSpace to FlatView","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":"Paolo Bonzini <pbonzini@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]