summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/vgic/vgic-its.c
diff options
context:
space:
mode:
authorShenming Lu <lushenming@huawei.com>2021-03-22 14:01:58 +0800
committerMarc Zyngier <maz@kernel.org>2021-03-24 18:12:21 +0000
commit8082d50f4817ff6a7e08f4b7e9b18e5f8bfa290d (patch)
tree64e6c248e66806893054251eb754a2e75e4e0558 /arch/arm64/kvm/vgic/vgic-its.c
parent12df7429213abbfa9632ab7db94f629ec309a58b (diff)
downloadlinux-8082d50f4817ff6a7e08f4b7e9b18e5f8bfa290d.tar.gz
linux-8082d50f4817ff6a7e08f4b7e9b18e5f8bfa290d.tar.bz2
linux-8082d50f4817ff6a7e08f4b7e9b18e5f8bfa290d.zip
KVM: arm64: GICv4.1: Give a chance to save VLPI state
Before GICv4.1, we don't have direct access to the VLPI state. So we simply let it fail early when encountering any VLPI in saving. But now we don't have to return -EACCES directly if on GICv4.1. Let’s change the hard code and give a chance to save the VLPI state (and preserve the UAPI). Signed-off-by: Shenming Lu <lushenming@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210322060158.1584-7-lushenming@huawei.com
Diffstat (limited to 'arch/arm64/kvm/vgic/vgic-its.c')
-rw-r--r--arch/arm64/kvm/vgic/vgic-its.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 40cbaca81333..ec7543a9617c 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -2218,10 +2218,10 @@ static int vgic_its_save_itt(struct vgic_its *its, struct its_device *device)
/*
* If an LPI carries the HW bit, this means that this
* interrupt is controlled by GICv4, and we do not
- * have direct access to that state. Let's simply fail
- * the save operation...
+ * have direct access to that state without GICv4.1.
+ * Let's simply fail the save operation...
*/
- if (ite->irq->hw)
+ if (ite->irq->hw && !kvm_vgic_global_state.has_gicv4_1)
return -EACCES;
ret = vgic_its_save_ite(its, device, ite, gpa, ite_esz);