qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] How expensive is an extra QEMU TLB MMU index ?


From: Richard Henderson
Subject: Re: [Qemu-devel] How expensive is an extra QEMU TLB MMU index ?
Date: Fri, 21 Apr 2017 10:59:12 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 04/21/2017 10:23 AM, Peter Maydell wrote:
Hi; I have a feature for the ARM M profile emulation which I think
needs to be implemented by giving it a separate mmu index value.
[The HFNMIENA control bit allows "privileged and execution priority
is higher than 0" to run with the MPU effectively off even if normal
privileged execution has enabled the MPU.]

I could implement this by just bumping ARM's NB_MMU_MODES to 8
and using the extra value for this. On the other hand, several
of the current 7 index values are not needed for M profile CPUs,
so in theory I could reuse one of those (so it would have different
meanings if the CPU was M profile or not). But that feels like it would
be pretty accident-prone, since so much of the code is shared.

So, just how expensive is having an extra MMU mode which isn't
actually used? Is it bad enough to be worth the reduced
maintainability?

Once you get above 7 indicies, we will start to reduce the size of the TLB for various hosts. See CPU_TLB_BITS in include/exec/cpu-defs.h.

That said, the size reduction doesn't happen for x86_64 host, and ought not actively fail for any host, so maybe you don't care.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]