KVM: arm/arm64: Fix isues with GICv2 on GICv3 migration
authorChristoffer Dall <cdall@linaro.org>
Sat, 20 May 2017 12:12:34 +0000 (14:12 +0200)
committerChristoffer Dall <cdall@linaro.org>
Wed, 24 May 2017 07:44:07 +0000 (09:44 +0200)
commit28232a4317be7ad615f0f1b69dc8583fd580a8e3
tree9a8aa63f28847929321d6c85c0f8913986bfa1dc
parentfa472fa91a5a0b241f5ddae927d2e235d07545df
KVM: arm/arm64: Fix isues with GICv2 on GICv3 migration

We have been a little loose with our intermediate VMCR representation
where we had a 'ctlr' field, but we failed to differentiate between the
GICv2 GICC_CTLR and ICC_CTLR_EL1 layouts, and therefore ended up mapping
the wrong bits into the individual fields of the ICH_VMCR_EL2 when
emulating a GICv2 on a GICv3 system.

Fix this by using explicit fields for the VMCR bits instead.

Cc: Eric Auger <eric.auger@redhat.com>
Reported-by: wanghaibin <wanghaibin.wang@huawei.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/vgic-sys-reg-v3.c
include/linux/irqchip/arm-gic-v3.h
include/linux/irqchip/arm-gic.h
virt/kvm/arm/vgic/vgic-mmio-v2.c
virt/kvm/arm/vgic/vgic-v2.c
virt/kvm/arm/vgic/vgic-v3.c
virt/kvm/arm/vgic/vgic.h