From: Marc Zyngier Date: Wed, 12 Dec 2012 14:37:10 +0000 (+0000) Subject: ARM: KVM: vgic: decouple alignment restriction from page size X-Git-Tag: v3.10-rc1~87^2~17^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7bb077737f34ed474a7256e1f368df6373238fa;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 --- 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);