In order to find out whether a vcpu is likely to be the target of VLPIs (and to further optimize the way we deal with those), let's track the number of VLPIs a vcpu can receive. This gets implemented with an atomic variable that gets incremented or decremented on map, unmap and move of a VLPI.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -32,6 +32,8 @@ struct its_vm { · 31 unmodified lines | ||
| 32 | 32 | struct its_vpe { |
| 33 | 33 | struct page *vpt_page; |
| 34 | 34 | struct its_vm *its_vm; |
| 35 | + /* per-vPE VLPI tracking */ | |
| 36 | + atomic_t vlpi_count; | |
| 35 | 37 | /* Doorbell interrupt */ |
| 36 | 38 | int irq; |
| 37 | 39 | irq_hw_number_t vpe_db_lpi; |