mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
arm_gic: Keep track of SGI sources
Right now the arm gic emulation doesn't keep track of the source of an SGI (which apparently Linux guests don't use, or they're fine with assuming CPU 0 always). Add the necessary matrix on the GICState structure and maintain the data when setting and clearing the pending state of an IRQ and make the state visible to the guest. Note that we always choose to present the source as the lowest-numbered CPU in case multiple cores have signalled the same SGI number to a core on the system. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
8d999995e4
commit
40d225009e
3 changed files with 96 additions and 14 deletions
|
@ -55,6 +55,13 @@ typedef struct GICState {
|
|||
uint8_t priority1[GIC_INTERNAL][GIC_NCPU];
|
||||
uint8_t priority2[GIC_MAXIRQ - GIC_INTERNAL];
|
||||
uint16_t last_active[GIC_MAXIRQ][GIC_NCPU];
|
||||
/* For each SGI on the target CPU, we store 8 bits
|
||||
* indicating which source CPUs have made this SGI
|
||||
* pending on the target CPU. These correspond to
|
||||
* the bytes in the GIC_SPENDSGIR* registers as
|
||||
* read by the target CPU.
|
||||
*/
|
||||
uint8_t sgi_pending[GIC_NR_SGIS][GIC_NCPU];
|
||||
|
||||
uint16_t priority_mask[GIC_NCPU];
|
||||
uint16_t running_irq[GIC_NCPU];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue