aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--virt/kvm/arm/vgic.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 56ff9bebb577..476d3bf540a8 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1526,17 +1526,33 @@ int kvm_vgic_hyp_init(void)
1526 goto out_unmap; 1526 goto out_unmap;
1527 } 1527 }
1528 1528
1529 kvm_info("%s@%llx IRQ%d\n", vgic_node->name,
1530 vctrl_res.start, vgic_maint_irq);
1531 on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1);
1532
1533 if (of_address_to_resource(vgic_node, 3, &vcpu_res)) { 1529 if (of_address_to_resource(vgic_node, 3, &vcpu_res)) {
1534 kvm_err("Cannot obtain VCPU resource\n"); 1530 kvm_err("Cannot obtain VCPU resource\n");
1535 ret = -ENXIO; 1531 ret = -ENXIO;
1536 goto out_unmap; 1532 goto out_unmap;
1537 } 1533 }
1534
1535 if (!PAGE_ALIGNED(vcpu_res.start)) {
1536 kvm_err("GICV physical address 0x%llx not page aligned\n",
1537 (unsigned long long)vcpu_res.start);
1538 ret = -ENXIO;
1539 goto out_unmap;
1540 }
1541
1542 if (!PAGE_ALIGNED(resource_size(&vcpu_res))) {
1543 kvm_err("GICV size 0x%llx not a multiple of page size 0x%lx\n",
1544 (unsigned long long)resource_size(&vcpu_res),
1545 PAGE_SIZE);
1546 ret = -ENXIO;
1547 goto out_unmap;
1548 }
1549
1538 vgic_vcpu_base = vcpu_res.start; 1550 vgic_vcpu_base = vcpu_res.start;
1539 1551
1552 kvm_info("%s@%llx IRQ%d\n", vgic_node->name,
1553 vctrl_res.start, vgic_maint_irq);
1554 on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1);
1555
1540 goto out; 1556 goto out;
1541 1557
1542out_unmap: 1558out_unmap: