[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 34/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_mov_vlpi()
From: |
Peter Maydell |
Subject: |
[PULL 34/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_mov_vlpi() |
Date: |
Fri, 22 Apr 2022 11:04:05 +0100 |
Implement the gicv3_redist_mov_vlpi() function (previously left as a
stub). This function handles the work of a VMOVI command: it marks
the vLPI not-pending on the source and pending on the destination.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220408141550.1271295-35-peter.maydell@linaro.org
---
hw/intc/arm_gicv3_redist.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c
index 2c4a87318bc..78dcdcc7621 100644
--- a/hw/intc/arm_gicv3_redist.c
+++ b/hw/intc/arm_gicv3_redist.c
@@ -1067,9 +1067,25 @@ void gicv3_redist_mov_vlpi(GICv3CPUState *src, uint64_t
src_vptaddr,
int irq, int doorbell)
{
/*
- * The redistributor handling for moving a VLPI will be added
- * in a subsequent commit.
+ * Move the specified vLPI's pending state from the source redistributor
+ * to the destination.
*/
+ if (!set_pending_table_bit(src, src_vptaddr, irq, 0)) {
+ /* Not pending on source, nothing to do */
+ return;
+ }
+ if (vcpu_resident(src, src_vptaddr) && irq == src->hppvlpi.irq) {
+ /*
+ * Update src's cached highest-priority pending vLPI if we just made
+ * it not-pending
+ */
+ gicv3_redist_update_vlpi(src);
+ }
+ /*
+ * Mark the vLPI pending on the destination (ringing the doorbell
+ * if the vCPU isn't resident)
+ */
+ gicv3_redist_process_vlpi(dest, irq, dest_vptaddr, doorbell, irq);
}
void gicv3_redist_vinvall(GICv3CPUState *cs, uint64_t vptaddr)
--
2.25.1
- [PULL 20/61] hw/intc/arm_gicv3_its: Implement VMOVI, (continued)
- [PULL 20/61] hw/intc/arm_gicv3_its: Implement VMOVI, Peter Maydell, 2022/04/22
- [PULL 26/61] hw/intc/arm_gicv3_cpuif: Don't recalculate maintenance irq unnecessarily, Peter Maydell, 2022/04/22
- [PULL 24/61] hw/intc/arm_gicv3_cpuif: Split "update vIRQ/vFIQ" from gicv3_cpuif_virt_update(), Peter Maydell, 2022/04/22
- [PULL 16/61] hw/intc/arm_gicv3_its: Implement VMOVP, Peter Maydell, 2022/04/22
- [PULL 18/61] hw/intc/arm_gicv3_its: Implement INV command properly, Peter Maydell, 2022/04/22
- [PULL 22/61] hw/intc/arm_gicv3: Implement GICv4's new redistributor frame, Peter Maydell, 2022/04/22
- [PULL 23/61] hw/intc/arm_gicv3: Implement new GICv4 redistributor registers, Peter Maydell, 2022/04/22
- [PULL 25/61] hw/intc/arm_gicv3_cpuif: Support vLPIs, Peter Maydell, 2022/04/22
- [PULL 27/61] hw/intc/arm_gicv3_redist: Factor out "update hpplpi for one LPI" logic, Peter Maydell, 2022/04/22
- [PULL 29/61] hw/intc/arm_gicv3_redist: Recalculate hppvlpi on VPENDBASER writes, Peter Maydell, 2022/04/22
- [PULL 34/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_mov_vlpi(),
Peter Maydell <=
- [PULL 35/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_vinvall(), Peter Maydell, 2022/04/22
- [PULL 32/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_vlpi_pending(), Peter Maydell, 2022/04/22
- [PULL 36/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_inv_vlpi(), Peter Maydell, 2022/04/22
- [PULL 38/61] hw/intc/arm_gicv3: Allow 'revision' property to be set to 4, Peter Maydell, 2022/04/22
- [PULL 39/61] hw/arm/virt: Use VIRT_GIC_VERSION_* enum values in create_gic(), Peter Maydell, 2022/04/22
- [PULL 28/61] hw/intc/arm_gicv3_redist: Factor out "update hpplpi for all LPIs" logic, Peter Maydell, 2022/04/22
- [PULL 31/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_process_vlpi(), Peter Maydell, 2022/04/22
- [PULL 42/61] target/arm: Update ISAR fields for ARMv8.8, Peter Maydell, 2022/04/22
- [PULL 37/61] hw/intc/arm_gicv3: Update ID and feature registers for GICv4, Peter Maydell, 2022/04/22
- [PULL 30/61] hw/intc/arm_gicv3_redist: Factor out "update bit in pending table" code, Peter Maydell, 2022/04/22