~vicamo/+git/ubuntu-kernel:bug-1996620/vmd-enable-pcie-aspm-ltr/jammy

Last commit made on 2022-11-16
Get this branch:
git clone -b bug-1996620/vmd-enable-pcie-aspm-ltr/jammy https://git.launchpad.net/~vicamo/+git/ubuntu-kernel
Only You-Sheng Yang can upload to this branch. If you are You-Sheng Yang please log in for upload directions.

Branch merges

Branch information

Name:
bug-1996620/vmd-enable-pcie-aspm-ltr/jammy
Repository:
lp:~vicamo/+git/ubuntu-kernel

Recent commits

8710a46... by You-Sheng Yang

Bug 1996620: vmd: Enable PCIe ASPM and LTR on select hardware

5902b01... by David Box

UBUNTU: SAUCE: PCI: vmd: Add quirk to configure PCIe ASPM and LTR

BugLink: https://bugs.launchpad.net/somerville/+bug/1996620

PCIe ports reserved for VMD use are not visible to BIOS and therefore not
configured to enable PCIe ASPM or LTR values (which BIOS will configure if
they are not set). Lack of this programming results in high power
consumption on laptops as reported in bugzilla. For affected products use
pci_enable_link_state to set the allowed link states for devices on the
root ports. Also set the LTR value to the maximum value needed for the SoC.

This is a workaround for products from Rocket Lake through Alder Lake.
Raptor Lake, the latest product at this time, has already implemented LTR
configuring in BIOS. Future products will move ASPM configuration back to
BIOS as well. As this solution is intended for laptops, support is not
added for hotplug or for devices downstream of a switch on the root port.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=212355
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215063
Link: https://bugzilla.kernel.org/show_bug.cgi?id=213717

Signed-off-by: Michael Bottini <email address hidden>
Signed-off-by: David E. Box <email address hidden>
Reviewed-by: Jon Derrick <email address hidden>
Reviewed-by: Nirmal Patel <email address hidden>
(backported from https://<email address hidden>/)
[vicamo: fix missed entries in vmd_ids]
Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>

68f2b23... by David Box

UBUNTU: SAUCE: PCI: vmd: Create feature grouping for client products

BugLink: https://bugs.launchpad.net/somerville/+bug/1996620

Simplify the device ID list by creating a grouping of features shared by
client products.

Suggested-by: Jon Derrick <email address hidden>
Signed-off-by: David E. Box <email address hidden>
(backported from https://<email address hidden>/)
[vicamo: fix missed entries in vmd_ids]
Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>

4a9da51... by David Box

UBUNTU: SAUCE: PCI: vmd: Use PCI_VDEVICE in device list

BugLink: https://bugs.launchpad.net/somerville/+bug/1996620

Refactor the PCI ID list to use PCI_VDEVICE.

Signed-off-by: David E. Box <email address hidden>
Reviewed-by: Jon Derrick <email address hidden>
Reviewed-by: Nirmal Patel <email address hidden>
(backported from https://<email address hidden>/)
[vicamo: fix missed entries in vmd_ids]
Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>

8315e28... by Michael Bottini <email address hidden>

UBUNTU: SAUCE: PCI/ASPM: Add pci_enable_link_state()

BugLink: https://bugs.launchpad.net/somerville/+bug/1996620

Add pci_enable_link_state() to allow devices to change the default BIOS
configured states. Clears the BIOS default settings then sets the new
states and reconfigures the link under the semaphore. Also add
PCIE_LINK_STATE_ALL macro for convenience for callers that want to enable
all link states.

Signed-off-by: Michael Bottini <email address hidden>
Signed-off-by: David E. Box <email address hidden>
Acked-by: Bjorn Helgaas <email address hidden>
(cherry picked from https://<email address hidden>/)
Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>

08fcd52... by You-Sheng Yang

Revert "UBUNTU: SAUCE: PCI/ASPM: Enable ASPM for links under VMD domain"

BugLink: https://bugs.launchpad.net/somerville/+bug/1996620

This reverts commit 31d18745614a3882c805aa4657f4599fb014c19b.

Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>

96909d6... by You-Sheng Yang

Revert "UBUNTU: SAUCE: PCI/ASPM: Enable LTR for endpoints behind VMD"

BugLink: https://bugs.launchpad.net/somerville/+bug/1996620

This reverts commit 34a0b524933d973d1c5ef092ed50b2cb89abbc9f.

Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>

87340a0... by You-Sheng Yang

Revert "UBUNTU: SAUCE: vmd: fixup bridge ASPM by driver name instead"

BugLink: https://bugs.launchpad.net/somerville/+bug/1996620

This reverts commit 2d1def11d4689967a2f27aa7ac39ba9cf03b523d.

Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>

3d81db7... by You-Sheng Yang

Experimental linux/jammy changes

500d44c... by Mario Limonciello via iommu <email address hidden>

UBUNTU: SAUCE: dma-iommu: Check that swiotlb is active before trying to use it

BugLink: https://bugs.launchpad.net/bugs/1969086

If the IOMMU is in use and an untrusted device is connected to an external
facing port but the address requested isn't page aligned will cause the
kernel to attempt to use bounce buffers.

If for some reason the bounce buffers have not been allocated this is a
problem that should be made apparent to the user.

Signed-off-by: Mario Limonciello <email address hidden>
(cherry picked from https://lore<email address hidden>)
Signed-off-by: You-Sheng Yang (vicamo) <email address hidden>