Patch "irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     irqchip-gic-v4-disable-redistributors-view-of-the-vp.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c17f4b1551df40d7481058c79e08ae6b7e8c6c5d
Author: Marc Zyngier <maz@xxxxxxxxxx>
Date:   Thu Dec 16 14:32:27 2021 +0000

    irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time
    
    [ Upstream commit 79a7f77b9b154d572bd9d2f1eecf58c4d018d8e2 ]
    
    Jay Chen reported that using a kdump kernel on a GICv4.1 system
    results in a RAS error being delivered when the secondary kernel
    configures the ITS's view of the new VPE table.
    
    As it turns out, that's because each RD still has a pointer to
    the previous instance of the VPE table, and that particular
    implementation is very upset by seeing two bits of the HW that
    should point to the same table with different values.
    
    To solve this, let's invalidate any reference that any RD has to
    the VPE table when discovering the RDs. The ITS can then be
    programmed as expected.
    
    Reported-by: Jay Chen <jkchen@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
    Cc: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
    Link: https://lore.kernel.org/r/20211214064716.21407-1-jkchen@xxxxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20211216144804.1578566-1-maz@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index fd4e9a37fea67..7bbccb13b896b 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -920,6 +920,22 @@ static int __gic_update_rdist_properties(struct redist_region *region,
 {
 	u64 typer = gic_read_typer(ptr + GICR_TYPER);
 
+	/* Boot-time cleanip */
+	if ((typer & GICR_TYPER_VLPIS) && (typer & GICR_TYPER_RVPEID)) {
+		u64 val;
+
+		/* Deactivate any present vPE */
+		val = gicr_read_vpendbaser(ptr + SZ_128K + GICR_VPENDBASER);
+		if (val & GICR_VPENDBASER_Valid)
+			gicr_write_vpendbaser(GICR_VPENDBASER_PendingLast,
+					      ptr + SZ_128K + GICR_VPENDBASER);
+
+		/* Mark the VPE table as invalid */
+		val = gicr_read_vpropbaser(ptr + SZ_128K + GICR_VPROPBASER);
+		val &= ~GICR_VPROPBASER_4_1_VALID;
+		gicr_write_vpropbaser(val, ptr + SZ_128K + GICR_VPROPBASER);
+	}
+
 	gic_data.rdists.has_vlpis &= !!(typer & GICR_TYPER_VLPIS);
 
 	/* RVPEID implies some form of DirectLPI, no matter what the doc says... :-/ */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux