mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
softmmu: support up to 12 MMU modes
At 8k per TLB (for 64-bit host or target), 8 or more modes make the TLBs bigger than 64k, and some RISC TCG backends do not like that. On the affected hosts, cut the TLB size in half---there is still a measurable speedup on PPC with the next patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1424436345-37924-3-git-send-email-pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
006f8638c6
commit
1de29aef17
2 changed files with 131 additions and 8 deletions
|
@ -263,12 +263,104 @@ uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
|
|||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 7) */
|
||||
|
||||
#if (NB_MMU_MODES > 7)
|
||||
/* Note that supporting NB_MMU_MODES == 9 would require
|
||||
* changes to at least the ARM TCG backend.
|
||||
*/
|
||||
#error "NB_MMU_MODES > 7 is not supported for now"
|
||||
#endif /* (NB_MMU_MODES > 7) */
|
||||
#if (NB_MMU_MODES >= 8) && defined(MMU_MODE7_SUFFIX)
|
||||
|
||||
#define CPU_MMU_INDEX 7
|
||||
#define MEMSUFFIX MMU_MODE7_SUFFIX
|
||||
#define DATA_SIZE 1
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 2
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 4
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 8
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
#undef CPU_MMU_INDEX
|
||||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 8) */
|
||||
|
||||
#if (NB_MMU_MODES >= 9) && defined(MMU_MODE8_SUFFIX)
|
||||
|
||||
#define CPU_MMU_INDEX 8
|
||||
#define MEMSUFFIX MMU_MODE8_SUFFIX
|
||||
#define DATA_SIZE 1
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 2
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 4
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 8
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
#undef CPU_MMU_INDEX
|
||||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 9) */
|
||||
|
||||
#if (NB_MMU_MODES >= 10) && defined(MMU_MODE9_SUFFIX)
|
||||
|
||||
#define CPU_MMU_INDEX 9
|
||||
#define MEMSUFFIX MMU_MODE9_SUFFIX
|
||||
#define DATA_SIZE 1
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 2
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 4
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 8
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
#undef CPU_MMU_INDEX
|
||||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 10) */
|
||||
|
||||
#if (NB_MMU_MODES >= 11) && defined(MMU_MODE10_SUFFIX)
|
||||
|
||||
#define CPU_MMU_INDEX 10
|
||||
#define MEMSUFFIX MMU_MODE10_SUFFIX
|
||||
#define DATA_SIZE 1
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 2
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 4
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 8
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
#undef CPU_MMU_INDEX
|
||||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 11) */
|
||||
|
||||
#if (NB_MMU_MODES >= 12) && defined(MMU_MODE11_SUFFIX)
|
||||
|
||||
#define CPU_MMU_INDEX 11
|
||||
#define MEMSUFFIX MMU_MODE11_SUFFIX
|
||||
#define DATA_SIZE 1
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 2
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 4
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
|
||||
#define DATA_SIZE 8
|
||||
#include "exec/cpu_ldst_template.h"
|
||||
#undef CPU_MMU_INDEX
|
||||
#undef MEMSUFFIX
|
||||
#endif /* (NB_MMU_MODES >= 12) */
|
||||
|
||||
#if (NB_MMU_MODES > 12)
|
||||
#error "NB_MMU_MODES > 12 is not supported for now"
|
||||
#endif /* (NB_MMU_MODES > 12) */
|
||||
|
||||
/* these access are slower, they must be as rare as possible */
|
||||
#define CPU_MMU_INDEX (cpu_mmu_index(env))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue