Implementing GICv3 ITS support for TCG emulation
Hi,
I've been asked what the state of ITS support is for emulation. The documentation explicitly states that there is currently no ITS support under TCG.
Looking at the code it looks like there was a deliberate attempt to separate common and KVM related code. Currently the only realizable device (via its_class_name) is the TYPE_KVM_ARM_ITS device with a comment saying emulation is "not implemented yet". My question is what is left to do?
- do we just need a wrapper akin to arm_gicv3_its_kvm.c?
- do we need to implement more logic normally carried out in KVM?
Thanks,
Signature · 1 line
Alex Bennée
Hi Alex,
Quoted 6 lines · Alex Bennée
Hi,
I've been asked what the state of ITS support is for emulation. The documentation explicitly states that there is currently no ITS support under TCG.
effectively it is not supported.
Quoted 9 lines
Looking at the code it looks like there was a deliberate attempt to separate common and KVM related code. Currently the only realizable device (via
its_class_name) is theTYPE_KVM_ARM_ITSdevice with a comment saying emulation is "not implemented yet". My question is what is left to do?- do we just need a wrapper akin to
arm_gicv3_its_kvm.c?
- do we need to implement more logic normally carried out in KVM?
You definitively need plenty of logic implemented in KVM:arch/arm64/kvm/vgic/vgic-its.c. implement all the ITS commands sent through the command queue. implement all the translation logic that takes as input an eventid/deviceid into an lpi id. This translation logic uses several tables populated by the commands: the device table, the collection table and interrupt translation table. Configuration and status of LPIs are stored in other tables. So yes that's a huge work and amount of code I think. There are KVM unit tests usable for incremental testing.
Thanks
Eric
Quoted 3 lines
Thanks,