c8f8a9957e
Kernel needs to access user mode memory e.g. during syscalls, the window is usually opened up for a very limited time through MSTATUS.SUM, the overhead is too much if tlb_flush() gets called for every SUM change. This patch creates a separate MMU index for S+SUM, so that it's not necessary to flush tlb anymore when SUM changes. This is similar to how ARM handles Privileged Access Never (PAN). Result of 'pipe 10' from unixbench boosts from 223656 to 1705006. Many other syscalls benefit a lot from this too. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fei Wu <fei2.wu@intel.com> Message-Id: <20230324054154.414846-3-fei2.wu@intel.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Tested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-Id: <20230325105429.1142530-8-richard.henderson@linaro.org> Message-Id: <20230412114333.118895-8-richard.henderson@linaro.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> |
||
---|---|---|
.. | ||
insn_trans | ||
arch_dump.c | ||
bitmanip_helper.c | ||
common-semi-target.h | ||
cpu_bits.h | ||
cpu_helper.c | ||
cpu_user.h | ||
cpu_vendorid.h | ||
cpu-param.h | ||
cpu.c | ||
cpu.h | ||
crypto_helper.c | ||
csr.c | ||
debug.c | ||
debug.h | ||
fpu_helper.c | ||
gdbstub.c | ||
helper.h | ||
insn16.decode | ||
insn32.decode | ||
instmap.h | ||
internals.h | ||
Kconfig | ||
kvm_riscv.h | ||
kvm-stub.c | ||
kvm.c | ||
m128_helper.c | ||
machine.c | ||
meson.build | ||
monitor.c | ||
op_helper.c | ||
pmp.c | ||
pmp.h | ||
pmu.c | ||
pmu.h | ||
sbi_ecall_interface.h | ||
time_helper.c | ||
time_helper.h | ||
trace-events | ||
trace.h | ||
translate.c | ||
vector_helper.c | ||
xthead.decode | ||
XVentanaCondOps.decode | ||
zce_helper.c |