On Fri, Jan 12, 2018 at 11:33:55AM +0100, David Hildenbrand wrote: > On 12.01.2018 11:10, Paolo Bonzini wrote: > > On 10/01/2018 22:53, David Hildenbrand wrote: > >> @@ -26,6 +26,7 @@ static uint64_t ram_size; > >> static void mem_init(phys_addr_t freemem_start, phys_addr_t mem_end) > >> { > >> phys_alloc_init(freemem_start, ram_size - freemem_start); > >> + setup_vm(); > >> } > >> > >> void sclp_memory_setup(void) > > > > I'd leave setup_vm() to tests if not strictly necessary. > > > > Paolo > > > > Makes handling of program exceptions unnecessary complicated. (which > functions we're allowed to call etc.) And DAT can be easily disabled in > tests that require it instead. > > So as long as there is no good reason for it, I prefer to keep it simple > and always set it up. > I've been considering some changes for ARM that allow setup_vm() to be conditionally skipped for unit tests that require that. I kicked around several ideas as to what the condition should use. Currently I have an auxinfo flag (added to a newly introduced flags field) which is set at build time with a Makefile rule prototyped for it. Long story, short; I think the way David is doing it now, which is like ARM, is a fine start, and then if necessary we can extend the framework to allow this auxinfo flag, or whatever, to give some flexibility to unit tests that need it. Thanks, drew