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...@twiddle.net>
r~