mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
hw/intc/arm_gicv3_its: Handle virtual interrupts in process_its_cmd()
For GICv4, interrupt table entries read by process_its_cmd() may indicate virtual LPIs which are to be directly injected into a VM. Implement the ITS side of the code for handling this. This is similar to the existing handling of physical LPIs, but instead of looking up a collection ID in a collection table, we look up a vPEID in a vPE table. As with the physical LPIs, we leave the rest of the work to code in the redistributor device. The redistributor half will be implemented in a later commit; for now we just provide a stub function which does nothing. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220408141550.1271295-15-peter.maydell@linaro.org
This commit is contained in:
parent
2d692e2b31
commit
469cf23bf8
4 changed files with 125 additions and 2 deletions
|
@ -527,6 +527,23 @@ MemTxResult gicv3_redist_write(void *opaque, hwaddr offset, uint64_t data,
|
|||
void gicv3_dist_set_irq(GICv3State *s, int irq, int level);
|
||||
void gicv3_redist_set_irq(GICv3CPUState *cs, int irq, int level);
|
||||
void gicv3_redist_process_lpi(GICv3CPUState *cs, int irq, int level);
|
||||
/**
|
||||
* gicv3_redist_process_vlpi:
|
||||
* @cs: GICv3CPUState
|
||||
* @irq: (virtual) interrupt number
|
||||
* @vptaddr: (guest) address of VLPI table
|
||||
* @doorbell: doorbell (physical) interrupt number (1023 for "no doorbell")
|
||||
* @level: level to set @irq to
|
||||
*
|
||||
* Process a virtual LPI being directly injected by the ITS. This function
|
||||
* will update the VLPI table specified by @vptaddr and @vptsize. If the
|
||||
* vCPU corresponding to that VLPI table is currently running on
|
||||
* the CPU associated with this redistributor, directly inject the VLPI
|
||||
* @irq. If the vCPU is not running on this CPU, raise the doorbell
|
||||
* interrupt instead.
|
||||
*/
|
||||
void gicv3_redist_process_vlpi(GICv3CPUState *cs, int irq, uint64_t vptaddr,
|
||||
int doorbell, int level);
|
||||
void gicv3_redist_lpi_pending(GICv3CPUState *cs, int irq, int level);
|
||||
/**
|
||||
* gicv3_redist_update_lpi:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue