|
From: | Bruno Piazera Larsen |
Subject: | Re: [PATCH 09/11] include/exec: added functions to the stubs in exec-all.h |
Date: | Tue, 18 May 2021 15:45:21 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 5/17/21 11:59 AM, Lucas Mateus Martins Araujo e Castro wrote:
I'm not completely sure how this should be handled, there's a get_physical_address in mmu_helper.c but it's a static function and divided by processor families instead of MMU types, so get_physical_address_* should be a new function?
The new get_physical_address_* function would be a mmu-hash(32|64) that do something like ppc_radix64_xlate and add a function to mmu-book3s-v3 that call either the radix64 or the hash64 function and also handle real mode access.
The entry points that we are concerned about are:
ppc_cpu_get_phys_page_debug
ppc_cpu_tlb_fill
Currently there is a hook, pcc->handle_mmu_fault, which is used by ppc_cpu_tlb_fill, but is insufficiently general. We're going to remove that hook.
We're going to add a new hook with the same interface as ppc_radix64_xlate that will be used by both ppc_cpu_get_phys_page_debug and ppc_cpu_tlb_fill.
So, just to make sure we understand, what we want to do is:
* take all the common code from *_handle_mmu_fault and put it in ppc_cpu_tlb_fill
* take whatever is not common and hide it in an equivalent of ppc_radix64_xlate
* make the 2 entry points only use these new functions, so we can
compile ppc_cpu_get_phys_page_debug
* move get_physical_address and all functions called by it somewhere that will compile when we disable tcg (again, to compile get_phys_page_debug)
Is that it? Sorry if this is very obvious, we never dealt with
hardware and mmu stuff before...
[Prev in Thread] | Current Thread | [Next in Thread] |