OSDN Git Service

KVM: arm/arm64: vgic: Permit uaccess writes to return errors
authorChristoffer Dall <christoffer.dall@arm.com>
Mon, 16 Jul 2018 13:06:23 +0000 (15:06 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Sat, 21 Jul 2018 15:02:27 +0000 (16:02 +0100)
commitc6e0917b67fc006f3785b79bfdacdf9eef2f4816
treed00b4ec8db728140be5284e0096f1c882259ba49
parent87322099052b6a534cecd3d303fc097d4560b7d0
KVM: arm/arm64: vgic: Permit uaccess writes to return errors

Currently we do not allow any vgic mmio write operations to fail, which
makes sense from mmio traps from the guest.  However, we should be able
to report failures to userspace, if userspace writes incompatible values
to read-only registers.  Rework the internal interface to allow errors
to be returned on the write side for userspace writes.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-mmio-v3.c
virt/kvm/arm/vgic/vgic-mmio.c
virt/kvm/arm/vgic/vgic-mmio.h