]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: arm/arm64: vgic: Fix GICC_PMR uaccess on GICv3 and clarify ABI
authorChristoffer Dall <cdall@linaro.org>
Tue, 21 Mar 2017 21:05:22 +0000 (22:05 +0100)
committerChristoffer Dall <cdall@linaro.org>
Tue, 4 Apr 2017 12:33:59 +0000 (14:33 +0200)
commit6d56111c92d247bb64301029fe88365aa4caf16e
tree0ceec9bfeae39452c020baa35b99f91d9e4bae76
parent5b0d2cc2805897c14257f6dbb949639c499c3c25
KVM: arm/arm64: vgic: Fix GICC_PMR uaccess on GICv3 and clarify ABI

As an oversight, for GICv2, we accidentally export the GICC_PMR register
in the format of the GICH_VMCR.VMPriMask field in the lower 5 bits of a
word, meaning that userspace must always use the lower 5 bits to
communicate with the KVM device and must shift the value left by 3
places to obtain the actual priority mask level.

Since GICv3 supports the full 8 bits of priority masking in the ICH_VMCR,
we have to fix the value we export when emulating a GICv2 on top of a
hardware GICv3 and exporting the emulated GICv2 state to userspace.

Take the chance to clarify this aspect of the ABI.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
Documentation/virtual/kvm/devices/arm-vgic.txt
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.h