Patch "iommu/amd: Fix "Guest Virtual APIC Table Root Pointer" configuration in IRTE" has been added to the 5.4-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

    iommu/amd: Fix "Guest Virtual APIC Table Root Pointer" configuration in IRTE

to the 5.4-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:
     iommu-amd-fix-guest-virtual-apic-table-root-pointer-.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 1a9772efcfcc7911fd0d949659d563673d6071ee
Author: Kishon Vijay Abraham I <kvijayab@xxxxxxx>
Date:   Wed Apr 5 13:03:17 2023 +0000

    iommu/amd: Fix "Guest Virtual APIC Table Root Pointer" configuration in IRTE
    
    [ Upstream commit ccc62b827775915a9b82db42a29813d04f92df7a ]
    
    commit b9c6ff94e43a ("iommu/amd: Re-factor guest virtual APIC
    (de-)activation code") while refactoring guest virtual APIC
    activation/de-activation code, stored information for activate/de-activate
    in "struct amd_ir_data". It used 32-bit integer data type for storing the
    "Guest Virtual APIC Table Root Pointer" (ga_root_ptr), though the
    "ga_root_ptr" is actually a 40-bit field in IRTE (Interrupt Remapping
    Table Entry).
    
    This causes interrupts from PCIe devices to not reach the guest in the case
    of PCIe passthrough with SME (Secure Memory Encryption) enabled as _SME_
    bit in the "ga_root_ptr" is lost before writing it to the IRTE.
    
    Fix it by using 64-bit data type for storing the "ga_root_ptr". While at
    that also change the data type of "ga_tag" to u32 in order to match
    the IOMMU spec.
    
    Fixes: b9c6ff94e43a ("iommu/amd: Re-factor guest virtual APIC (de-)activation code")
    Cc: stable@xxxxxxxxxxxxxxx # v5.4+
    Reported-by: Alejandro Jimenez <alejandro.j.jimenez@xxxxxxxxxx>
    Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
    Signed-off-by: Kishon Vijay Abraham I <kvijayab@xxxxxxx>
    Link: https://lore.kernel.org/r/20230405130317.9351-1-kvijayab@xxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index 76e9d3e2f9f20..15eef44efd030 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -886,8 +886,8 @@ struct amd_ir_data {
 	 */
 	struct irq_cfg *cfg;
 	int ga_vector;
-	int ga_root_ptr;
-	int ga_tag;
+	u64 ga_root_ptr;
+	u32 ga_tag;
 };
 
 struct amd_irte_ops {



[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