On 5/23/21 10:28 PM, David Gibson wrote:
On Tue, May 18, 2021 at 03:11:38PM -0500, Richard Henderson wrote:
Instead, use a switch on env->mmu_model. This avoids some
replicated information in cpu setup.
I have mixed feelings about this, since I introduced
pcc->handle_mmu_fault specifically to get rid of the nasty
mega-switch, with the hope of eventually getting rid of env->mmu_model
entirely.
But.. it does simplify your patch series, which makes a good change
overall.
Having browsed the mmu code for a while, I would imagine a good change would be
to have several hooks, and the mmu_model enum, all in the same const struct.
But the current situation is untennable.
r~