diff options
author | Helge Deller <deller@gmx.de> | 2025-01-28 23:36:34 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2025-01-31 10:05:24 +0100 |
commit | 644ce5df2ea7b0fe34c56ab414182dd7ecd009dc (patch) | |
tree | cb7187ed1bf7455778c29ae8de40fe3d9ba1a9b1 /scripts/xml-preprocess.py | |
parent | 75f73d5af1104c25975322a41b4bc4965fdff719 (diff) | |
download | qemu-644ce5df2ea7b0fe34c56ab414182dd7ecd009dc.zip qemu-644ce5df2ea7b0fe34c56ab414182dd7ecd009dc.tar.gz qemu-644ce5df2ea7b0fe34c56ab414182dd7ecd009dc.tar.bz2 |
target/hppa: Implement space register hashing for 64-bit HP-UX
The Linux kernel turns space-register hashing off unconditionally at
bootup. That code was provided by HP at the beginning of the PA-RISC
Linux porting effort, and I don't know why it was decided then why Linux
should not use space register hashing.
32-bit HP-UX versions seem to not use space register hashing either.
But for 64-bit HP-UX versions, Sven Schnelle noticed that space register
hashing needs to be enabled and is required, otherwise the HP-UX kernel
will crash badly.
On 64-bit CPUs space register hashing is controlled by a bit in diagnose
register %dr2. Since we want to support Linux and 32- and 64-bit HP-UX,
we need to fully emulate the diagnose registers and handle specifically
the bit in %dr2.
This patch adds the code to calculate the gva memory mask based on the
space-register hashing bit in %dr2 and the PSW_W (64-bit) flag.
The value is cached in the gva_offset_mask variable in CPUArchState
and recalculated at every modification of the CPU PSW or %dr2.
Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Sven Schnelle <svens@stackframe.org>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'scripts/xml-preprocess.py')
0 files changed, 0 insertions, 0 deletions