From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcaJO-0003Nj-T5 for qemu-devel@nongnu.org; Mon, 09 Jul 2018 13:50:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcaJL-0001W6-P8 for qemu-devel@nongnu.org; Mon, 09 Jul 2018 13:50:58 -0400 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:39431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcaJL-0001Vp-IU for qemu-devel@nongnu.org; Mon, 09 Jul 2018 13:50:55 -0400 Received: by mail-pl0-x241.google.com with SMTP id s24-v6so6367817plq.6 for ; Mon, 09 Jul 2018 10:50:55 -0700 (PDT) Sender: Richard Henderson References: <20180709155826.18993-1-peter.maydell@linaro.org> From: Richard Henderson Message-ID: Date: Mon, 9 Jul 2018 10:50:51 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] exec.c: Replace memory_region_is_unassigned() with memory_region_is_ram_backed() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Richard Henderson Cc: QEMU Developers , Paolo Bonzini , "patches@linaro.org" On 07/09/2018 10:33 AM, Peter Maydell wrote: >> Well... ok. We should document that this, surprisingly, does not include >> actual ram. Just things that are ram with caveats. > > I think it must include actual RAM, or we would not be able to > execute from actual RAM ? The only way to get to get_page_addr_code()'s > "here's the ram_addr_t for this" exit path is if memory_region_is_unassigned() > returns false. > >>> - return mr != &io_mem_rom && mr != &io_mem_notdirty && !mr->rom_device >>> - && mr != &io_mem_watch; Huh. I don't follow how this old expression excludes ram, and so assumed that must be checked separately earlier. There's clearly still something here I don't understand. r~