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@xxxxxxxxxx>
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