aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/arm/vgic-v3.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic-v3.c b/virt/kvm/arm/vgic-v3.c
index f01d44685720..1c2c8eef0599 100644
--- a/virt/kvm/arm/vgic-v3.c
+++ b/virt/kvm/arm/vgic-v3.c
@@ -215,6 +215,22 @@ int vgic_v3_probe(struct device_node *vgic_node,
215 ret = -ENXIO; 215 ret = -ENXIO;
216 goto out; 216 goto out;
217 } 217 }
218
219 if (!PAGE_ALIGNED(vcpu_res.start)) {
220 kvm_err("GICV physical address 0x%llx not page aligned\n",
221 (unsigned long long)vcpu_res.start);
222 ret = -ENXIO;
223 goto out;
224 }
225
226 if (!PAGE_ALIGNED(resource_size(&vcpu_res))) {
227 kvm_err("GICV size 0x%llx not a multiple of page size 0x%lx\n",
228 (unsigned long long)resource_size(&vcpu_res),
229 PAGE_SIZE);
230 ret = -ENXIO;
231 goto out;
232 }
233
218 vgic->vcpu_base = vcpu_res.start; 234 vgic->vcpu_base = vcpu_res.start;
219 vgic->vctrl_base = NULL; 235 vgic->vctrl_base = NULL;
220 vgic->type = VGIC_V3; 236 vgic->type = VGIC_V3;