[PATCH v2 02/11] KVM: arm64: vgic-its: Treat the collection target address as a vcpu_id
Zenghui Yu
yuzenghui at huawei.com
Thu Sep 21 02:14:55 PDT 2023
On 2023/9/21 2:17, Marc Zyngier wrote:
> Since our emulated ITS advertises GITS_TYPER.PTA=0, the target
> address associated to a collection is a PE number and not
> an address. So far, so good. However, the PE number is what userspace
> has provided given us (aka the vcpu_id), and not the internal vcpu
> index.
>
> Make sure we consistently retrieve the vcpu by ID rather than
> by index, adding a helper that deals with most of the cases.
>
> Signed-off-by: Marc Zyngier <maz at kernel.org>
Looks good, with 2 more points:
- Like patch#1, we should have a go at all
'target_addr >= kvm->online_vcpus' comparisons in vgic-its.c
- There is still a remaining kvm_get_vcpu() in vgic_its_restore_ite()
which needs to be fixed
Thanks,
Zenghui
More information about the linux-arm-kernel
mailing list