From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Wed, 22 Mar 2017 09:58:36 +0000 Subject: [PATCH] KVM: arm/arm64: vgic: Fix GICC_PMR uaccess on GICv3 and clarify ABI In-Reply-To: <20170321210522.8362-1-cdall@linaro.org> References: <20170321210522.8362-1-cdall@linaro.org> Message-ID: <15b51bbf-aeb9-fe7c-1c64-66a4c40faa91@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 21/03/17 21:05, Christoffer Dall wrote: > 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. > > Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...