diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-12-12 14:37:10 (GMT) |
---|---|---|
committer | Christoffer Dall <cdall@cs.columbia.edu> | 2013-03-06 23:48:44 (GMT) |
commit | d7bb077737f34ed474a7256e1f368df6373238fa (patch) | |
tree | a8c9672f27ee4ab35f02eb58fe89529d41c3fb04 /arch/arm/kvm | |
parent | cfe3950c2a19c1e1ad85b9dd2622617e309d2845 (diff) | |
download | linux-d7bb077737f34ed474a7256e1f368df6373238fa.tar.xz |
ARM: KVM: vgic: decouple alignment restriction from page size
The virtual GIC is supposed to be 4kB aligned. On a 64kB page
system, comparing the alignment to PAGE_SIZE is wrong.
Use SZ_4K instead.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm')
-rw-r--r-- | arch/arm/kvm/vgic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kvm/vgic.c b/arch/arm/kvm/vgic.c index c9a1731..161d5c1 100644 --- a/arch/arm/kvm/vgic.c +++ b/arch/arm/kvm/vgic.c @@ -1484,7 +1484,7 @@ int kvm_vgic_set_addr(struct kvm *kvm, unsigned long type, u64 addr) if (addr & ~KVM_PHYS_MASK) return -E2BIG; - if (addr & ~PAGE_MASK) + if (addr & (SZ_4K - 1)) return -EINVAL; mutex_lock(&kvm->lock); |