提交 d7bb0777 编写于 作者: M Marc Zyngier 提交者: Christoffer Dall

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: NMarc Zyngier <marc.zyngier@arm.com>
上级 cfe3950c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册