OSDN Git Service

target/riscv: Reorg sum check in get_physical_address
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 12 Apr 2023 11:43:33 +0000 (13:43 +0200)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 5 May 2023 00:49:50 +0000 (10:49 +1000)
commit38303e8a2cfca62e9073014138a5e10f711459ee
tree91de94d6bbe095bc3e4a0b4cfd5d65a7b59d542e
parente1dd15076bd8b38ed93cd8fc421f3ba8527af40d
target/riscv: Reorg sum check in get_physical_address

Implement this by adjusting prot, which reduces the set of
checks required.  This prevents exec to be set for U pages
in MMUIdx_S_SUM.  While it had been technically incorrect,
it did not manifest as a bug, because we will never attempt
to execute from MMUIdx_S_SUM.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
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-26-richard.henderson@linaro.org>
Message-Id: <20230412114333.118895-26-richard.henderson@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu_helper.c