diff options
author | Ard Biesheuvel | 2022-11-21 12:45:13 +0100 |
---|---|---|
committer | Peter Maydell | 2022-11-21 12:46:46 +0100 |
commit | 312b71abce3005ca7294dc0db7d548dc7cc41fbf (patch) | |
tree | f834b444869786f0c44dcf9626c607152f3d56f9 /util/bitmap.c | |
parent | tests/avocado/boot_linux.py: Bump aarch64 virt test timeout to 720s (diff) | |
download | qemu-312b71abce3005ca7294dc0db7d548dc7cc41fbf.tar.gz qemu-312b71abce3005ca7294dc0db7d548dc7cc41fbf.tar.xz qemu-312b71abce3005ca7294dc0db7d548dc7cc41fbf.zip |
target/arm: Limit LPA2 effective output address when TCR.DS == 0
With LPA2, the effective output address size is at most 48 bits when
TCR.DS == 0. This case is currently unhandled in the page table walker,
where we happily assume LVA/64k granule when outputsize > 48 and
param.ds == 0, resulting in the wrong conversion to be used from a
page table descriptor to a physical address.
if (outputsize > 48) {
if (param.ds) {
descaddr |= extract64(descriptor, 8, 2) << 50;
} else {
descaddr |= extract64(descriptor, 12, 4) << 48;
}
So cap the outputsize to 48 when TCR.DS is cleared, as per the
architecture.
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221116170316.259695-1-ardb@kernel.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/bitmap.c')
0 files changed, 0 insertions, 0 deletions