kernel_samsung_a53x/arch/arm64/kvm/vgic
Marc Zyngier ebebe7cee9 KVM: arm64: vgic-v2: Use cpuid from userspace as vcpu_id
[ Upstream commit 4e7728c81a54b17bd33be402ac140bc11bb0c4f4 ]

When parsing a GICv2 attribute that contains a cpuid, handle this
as the vcpu_id, not a vcpu_idx, as userspace cannot really know
the mapping between the two. For this, use kvm_get_vcpu_by_id()
instead of kvm_get_vcpu().

Take this opportunity to get rid of the pointless check against
online_vcpus, which doesn't make much sense either, and switch
to FIELD_GET as a way to extract the vcpu_id.

Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230927090911.3355209-5-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Stable-dep-of: 6ddb4f372fc6 ("KVM: arm64: vgic-v2: Check for non-NULL vCPU in vgic_v2_parse_attr()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 11:32:43 +01:00
..
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-init.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-irqfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-its.c KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table() 2024-11-18 22:25:37 +01:00
vgic-kvm-device.c KVM: arm64: vgic-v2: Use cpuid from userspace as vcpu_id 2024-11-19 11:32:43 +01:00
vgic-mmio-v2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-mmio-v3.c KVM: arm64: vgic-v4: Restore pending state on host userspace write 2024-11-18 12:12:48 +01:00
vgic-mmio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-mmio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-v2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-v3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-v4.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00