diff options
author | Suraj Jitindar Singh <sjitindarsingh@gmail.com> | 2017-01-13 17:28:23 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-02-02 09:30:07 +1100 |
commit | 6925f12f4f02e55c73e738cb9e91e8cda2f23358 (patch) | |
tree | 826860c546a274eb5a2efa352444a10b8f1cd5ff /target | |
parent | 76134d48b3a526ec5f5dec15630c51559577b2bf (diff) | |
download | qemu-6925f12f4f02e55c73e738cb9e91e8cda2f23358.zip qemu-6925f12f4f02e55c73e738cb9e91e8cda2f23358.tar.gz qemu-6925f12f4f02e55c73e738cb9e91e8cda2f23358.tar.bz2 |
target/ppc/mmu_hash64: Fix incorrect shift value in amr calculation
We are calculating the authority mask register key value wrong.
The pte entry contains the key value with the two upper bits and the three
lower bits stored separately. We should use these two portions to get a 5
bit value, not or them together which will only give us a 3 bit value.
Fix this.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target')
-rw-r--r-- | target/ppc/mmu-hash64.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h index ab5d347..7a0b7fc 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -85,7 +85,7 @@ void ppc_hash64_update_rmls(CPUPPCState *env); #define HPTE64_R_C 0x0000000000000080ULL #define HPTE64_R_R 0x0000000000000100ULL #define HPTE64_R_KEY_LO 0x0000000000000e00ULL -#define HPTE64_R_KEY(x) ((((x) & HPTE64_R_KEY_HI) >> 60) | \ +#define HPTE64_R_KEY(x) ((((x) & HPTE64_R_KEY_HI) >> 57) | \ (((x) & HPTE64_R_KEY_LO) >> 9)) #define HPTE64_V_1TB_SEG 0x4000000000000000ULL |