diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2016-04-06 14:48:53 +0200 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-05-20 15:39:41 +0200 |
commit | 2db4c104fa2a9af12c07433642e2e4fee37fe2fd (patch) | |
tree | f88a91300e23db229a76cff3394b41724970bb14 /virt/kvm/arm/vgic-v2.c | |
parent | KVM: arm/arm64: Move timer IRQ map to latest possible time (diff) | |
download | linux-2db4c104fa2a9af12c07433642e2e4fee37fe2fd.tar.xz linux-2db4c104fa2a9af12c07433642e2e4fee37fe2fd.zip |
KVM: arm/arm64: Get rid of vgic_cpu->nr_lr
The number of list registers is a property of the underlying system, not
of emulated VGIC CPU interface.
As we are about to move this variable to global state in the new vgic
for clarity, move it from the legacy implementation as well to make the
merge of the new code easier.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'virt/kvm/arm/vgic-v2.c')
-rw-r--r-- | virt/kvm/arm/vgic-v2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c index 7e826c9b2b0a..334cd7a89106 100644 --- a/virt/kvm/arm/vgic-v2.c +++ b/virt/kvm/arm/vgic-v2.c @@ -171,7 +171,7 @@ static const struct vgic_ops vgic_v2_ops = { .enable = vgic_v2_enable, }; -static struct vgic_params vgic_v2_params; +struct vgic_params __section(.hyp.text) vgic_v2_params; static void vgic_cpu_init_lrs(void *params) { @@ -201,6 +201,8 @@ int vgic_v2_probe(const struct gic_kvm_info *gic_kvm_info, const struct resource *vctrl_res = &gic_kvm_info->vctrl; const struct resource *vcpu_res = &gic_kvm_info->vcpu; + memset(vgic, 0, sizeof(*vgic)); + if (!gic_kvm_info->maint_irq) { kvm_err("error getting vgic maintenance irq\n"); ret = -ENXIO; |