diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-12-12 09:37:10 -0500 |
---|---|---|
committer | Christoffer Dall <cdall@cs.columbia.edu> | 2013-03-06 18:48:44 -0500 |
commit | d7bb077737f34ed474a7256e1f368df6373238fa (patch) | |
tree | a8c9672f27ee4ab35f02eb58fe89529d41c3fb04 /arch/arm/kvm | |
parent | cfe3950c2a19c1e1ad85b9dd2622617e309d2845 (diff) |
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 c9a17316e9fe..161d5c15f0f0 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) | |||
1484 | if (addr & ~KVM_PHYS_MASK) | 1484 | if (addr & ~KVM_PHYS_MASK) |
1485 | return -E2BIG; | 1485 | return -E2BIG; |
1486 | 1486 | ||
1487 | if (addr & ~PAGE_MASK) | 1487 | if (addr & (SZ_4K - 1)) |
1488 | return -EINVAL; | 1488 | return -EINVAL; |
1489 | 1489 | ||
1490 | mutex_lock(&kvm->lock); | 1490 | mutex_lock(&kvm->lock); |