Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7bb0777 authored by Marc Zyngier's avatar Marc Zyngier Committed by Christoffer Dall
Browse files

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: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent cfe3950c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);