summaryrefslogtreecommitdiffstats
path: root/arch/arm/kvm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-12-12 14:37:10 +0000
committerChristoffer Dall <cdall@cs.columbia.edu>2013-03-06 15:48:44 -0800
commitd7bb077737f34ed474a7256e1f368df6373238fa (patch)
treea8c9672f27ee4ab35f02eb58fe89529d41c3fb04 /arch/arm/kvm
parentcfe3950c2a19c1e1ad85b9dd2622617e309d2845 (diff)
downloadop-kernel-dev-d7bb077737f34ed474a7256e1f368df6373238fa.zip
op-kernel-dev-d7bb077737f34ed474a7256e1f368df6373238fa.tar.gz
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.c2
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);
OpenPOWER on IntegriCloud