[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/14] target-arm: Add ULL suffix to calculation of p
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 03/14] target-arm: Add ULL suffix to calculation of page size |
Date: |
Thu, 19 Jun 2014 18:36:46 +0100 |
The maximum block size for AArch64 address translation is 2GB. This means
that we need a ULL suffix on our shift to avoid shifting into the sign
bit of a signed 32 bit integer.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
Message-id: address@hidden
---
target-arm/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 12285cd..ed4d2bb 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -3952,7 +3952,7 @@ static int get_phys_addr_lpae(CPUARMState *env,
target_ulong address,
* These are basically the same thing, although the number
* of bits we pull in from the vaddr varies.
*/
- page_size = (1 << ((granule_sz * (4 - level)) + 3));
+ page_size = (1ULL << ((granule_sz * (4 - level)) + 3));
descaddr |= (address & (page_size - 1));
/* Extract attributes from the descriptor and merge with table attrs */
attrs = extract64(descriptor, 2, 10)
--
1.9.2
- [Qemu-devel] [PULL 00/14] target-arm queue, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 14/14] armv7m_nvic: fix AIRCR implementation, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 11/14] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 12/14] target-arm: Introduce per-CPU field for PSCI version, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 09/14] target-arm: Common kvm_arm_vcpu_init() for KVM ARM and KVM ARM64, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 08/14] kvm: Handle exit reason KVM_EXIT_SYSTEM_EVENT, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 06/14] hw/arm/vexpress: Forbid specifying flash contents in two ways at once, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 04/14] target-arm/translate-a64.c: Remove dead ?: in disas_simd_3same_int(), Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 07/14] hw/block/pflash_cfi01: Report correct size info for parallel configs, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 03/14] target-arm: Add ULL suffix to calculation of page size,
Peter Maydell <=
- [Qemu-devel] [PULL 10/14] target-arm: Enable KVM_ARM_VCPU_PSCI_0_2 feature when possible, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 02/14] hw/arm/spitz: Avoid clash with Windows header symbol MOD_SHIFT, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 01/14] target-arm: implement PD0/PD1 bits for TTBCR, Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 05/14] target-arm/translate-a64.c: Fix dead ?: in handle_simd_shift_fpint_conv(), Peter Maydell, 2014/06/19
- [Qemu-devel] [PULL 13/14] Use PSCI v0.2 compatible string when KVM or TCG provides it, Peter Maydell, 2014/06/19
- Re: [Qemu-devel] [PULL 00/14] target-arm queue, Peter Maydell, 2014/06/20