From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu2bU-0006b2-1K for qemu-devel@nongnu.org; Tue, 11 Oct 2016 15:20:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bu2bP-0004Ti-HT for qemu-devel@nongnu.org; Tue, 11 Oct 2016 15:20:42 -0400 Sender: Richard Henderson References: <1476205699-28857-1-git-send-email-peter.maydell@linaro.org> From: Richard Henderson Message-ID: <20039503-ebed-fe18-be17-78d39643c9af@twiddle.net> Date: Tue, 11 Oct 2016 14:20:34 -0500 MIME-Version: 1.0 In-Reply-To: <1476205699-28857-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/7] Runtime pagesize computation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org, paolo@archaic.org.uk, Vijaya Kumar K , "Dr . David Alan Gilbert" , Laurent Desnogues On 10/11/2016 12:08 PM, Peter Maydell wrote: > The basic idea here is that: > * the target CPU implementation has to opt into variable page size > by defining TARGET_PAGE_BITS_VARY, and then calling > set_preferred_target_page_bits() in its realize function > with whatever the CPU as instantiated actually requires > * the machine also has to opt in, by specifying a new MachineClass > field which states the value they guarantee will be no greater > than the preferred page size for any CPU they create > * we finalize the decision about page size in cpu_exec_init_all() > (and then later attempts to create CPUs which can't cope with > that decision are failed) > > I would ideally have liked to finalize things much later, but > this is in practice hugely difficult because so many things > (in particular all the address space/memory system code) > assume the target page size is known. Unfortunate. I suppose that 4k is still better than 1k, but I was hoping to get 16k or 64k (or higher) when the OS is configured to use such. I.e. totally dynamically configurable upon write to the appropriate cpu register. Given how the memory subsystem already dynamically reconfigures itself for changes in address_space topology, I assumed page size changes would be trivial and fall out naturally. Anyway, patches 4-7 get my Reviewed-by: Richard Henderson r~