diff options
author | Peter Maydell | 2022-04-08 16:15:43 +0200 |
---|---|---|
committer | Peter Maydell | 2022-04-22 15:44:53 +0200 |
commit | c6f797d519aa1c4dd2736b3ffc1f7722f2d3c3c3 (patch) | |
tree | 7b6f2a1e7ca6b1c45391a2ef9f566787bd95c2cc /hw/intc | |
parent | hw/intc/arm_gicv3_redist: Use set_pending_table_bit() in mov handling (diff) | |
download | qemu-c6f797d519aa1c4dd2736b3ffc1f7722f2d3c3c3.tar.gz qemu-c6f797d519aa1c4dd2736b3ffc1f7722f2d3c3c3.tar.xz qemu-c6f797d519aa1c4dd2736b3ffc1f7722f2d3c3c3.zip |
hw/intc/arm_gicv3_redist: Implement gicv3_redist_mov_vlpi()
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
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/arm_gicv3_redist.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c index 2c4a87318b..78dcdcc762 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) |