diff options
author | graysky | 2021-11-19 12:55:50 -0500 |
---|---|---|
committer | graysky | 2021-11-19 12:55:50 -0500 |
commit | bd5e82fa3c7120e1e0f3cee6d0e12bdeb3c43870 (patch) | |
tree | 480866551b0e5311a6a16a9809547d47f9cbc46c | |
parent | 1fa01b6084e2bf43f98ce00a5557079222f50c1f (diff) | |
download | aur-bd5e82fa3c7120e1e0f3cee6d0e12bdeb3c43870.tar.gz |
Update to 5.15.3-1
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch | 10 | ||||
-rw-r--r-- | 0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch | 47 | ||||
-rw-r--r-- | 0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch | 56 | ||||
-rw-r--r-- | 0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch | 40 | ||||
-rw-r--r-- | 0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch | 24 | ||||
-rw-r--r-- | 0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch | 108 | ||||
-rw-r--r-- | 0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch | 88 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | config | 9 |
10 files changed, 407 insertions, 19 deletions
@@ -1,5 +1,5 @@ pkgbase = linux-ck - pkgver = 5.15.2 + pkgver = 5.15.3 pkgrel = 1 url = https://wiki.archlinux.org/index.php/Linux-ck arch = x86_64 @@ -12,20 +12,32 @@ pkgbase = linux-ck makedepends = tar makedepends = xz options = !strip - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.2.tar.xz - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.2.tar.sign + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.3.tar.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.3.tar.sign source = config source = more-uarches-20211114.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20211114.tar.gz source = xanmod-patches-from-ck-8ba6612318090567422d49ccc79bc7bbe5484cfc.tar.gz::https://github.com/xanmod/linux-patches/archive/8ba6612318090567422d49ccc79bc7bbe5484cfc.tar.gz source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + source = 0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch + source = 0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch + source = 0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch + source = 0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch + source = 0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch + source = 0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E - b2sums = e1247057fc57e2f071ff150b5e0651db054a1e15a258ebd198921f7ef0c1e441f0a36c46024298175a8a9a0bb7cc0b6d505d7a77a053c1ce88a720ebea424d89 + b2sums = 93379b68cfe85a979a7a39179e2bf622702d5e4f7a1d5a5bace1e8d11583d77966bce5b0e61f047fcb40c6c2be401e7725b3aa01e602c6ef4ac045a24ebcc2cd b2sums = SKIP - b2sums = 13e22007dfd81dcfcd9a159881ddc5f92a600d6ed5f581c0826c5e2b2823b6a7ba0628e09960b8146d3a9bb669ee5ba7b119bd7ecb6cad06a76e6511bf533a44 + b2sums = 1154722c5d8a33dedbd18679724ef34ac3aa96900c53aa8ebbba10ea87b0aaa0363d278b0aa4e5e5fed7e85c05e9b7892ba6bdd72f87117f584fef785d6f91d0 b2sums = 534091fb5034226d48f18da2114305860e67ee49a1d726b049a240ce61df83e840a9a255e5b8fa9279ec07dd69fb0aea6e2e48962792c2b5367db577a4423d8d b2sums = cf589ec357a96b9e573bce298bb1d64fa50339ea047767f2a730a8dc9808e2316b3e7c885d730233ba50d570725d4c72632d1b74a371ef02ac471d4c944fe63e - b2sums = c9d2fb487b12040f17a9a8eaefca776c2a2a1c37fb0fb6337630ff896f82f25c0303e1f26f0fa98e4f3e6eb143947d84a48a286678aa2977163711e291a90115 + b2sums = 90e2c56062fc6ab9f914d82ed3b5ff3cc9fef2293ffdedb51ab2776441b1d2ff46b69af8e6c97c80346449123f309fe4bcdeac2fe95a5f8e201f41b9d29943f3 + b2sums = 812f8ff0b7cdd21e6b1b9337b789619a992bd3053d3c47533d76ec4e84d5ca4c340252415cf4cc616ac4cf9887849c541d1e8e370fddcb7c5705532a6c8b1e78 + b2sums = fbf9d53f53ef32aff185a28f0dfdf9d8953452d7a25f138bfafef78fd9129b89c1d7498576bb357be896684757040fc287c637d0d2e74ab87761212aceedb5ac + b2sums = 1e2344e669268216a9b6097f199e8ba2301c37e5b9db16fb8310e35674a6fcec72b7211717d1fe864a85d7e898e21b3402310018ab5ee9d97d3512599bff3b3b + b2sums = 60699efcb88f8643dda1dad5a104c7b2780f8233c82d89bc1916c14fd808febdff4536b84e32d790137455d922d18d86d8d56c7671955b26c068a8f0272ed1a6 + b2sums = 47fe5e2eb9e2ceeabad141d2c631d22527f7068d81d673e0bdee2a7070986b3d1d75001a953a0e3501eb9b623c66700464af73153ad6f998f20587e58fc7820b + b2sums = 7ac6e6886d578a46d22c089ccd4b99eca3515263c4f1aa92a2f85a1836c72b096560145ad4ee1c94c2c1c2b747afd299fc6b9c73d9076c364401d80413f69fe4 pkgname = linux-ck pkgdesc = The Linux-ck kernel and modules with ck's hrtimer patches diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index 70a8fcb4af8b..98f1ffb4128c 100644 --- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,7 +1,7 @@ -From 04928c1ea9d5a6711cd192d0ae8a23c196c8fdc5 Mon Sep 17 00:00:00 2001 +From 47d2645e7e3964621caea15feae6b806bd63ad92 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 1/2] ZEN: Add sysctl and CONFIG to disallow unprivileged +Subject: [PATCH 1/8] ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER Our default behavior continues to match the vanilla kernel. @@ -63,7 +63,7 @@ index 11f8a845f259..02b7a0e455a5 100644 bool "PID Namespaces" default y diff --git a/kernel/fork.c b/kernel/fork.c -index 38681ad44c76..d4b40f72018f 100644 +index 10885c649ca4..e0fe98e1afbd 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -98,6 +98,10 @@ @@ -88,7 +88,7 @@ index 38681ad44c76..d4b40f72018f 100644 /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -3055,6 +3063,12 @@ int ksys_unshare(unsigned long unshare_flags) +@@ -3056,6 +3064,12 @@ int ksys_unshare(unsigned long unshare_flags) if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; @@ -150,5 +150,5 @@ index 6b2e3ca7ee99..0253002184f1 100644 static DEFINE_MUTEX(userns_state_mutex); -- -2.33.1 +2.34.0 diff --git a/0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch b/0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch new file mode 100644 index 000000000000..17c0787f7956 --- /dev/null +++ b/0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch @@ -0,0 +1,47 @@ +From 150424b14ca70f807b083aaae52db9eb072ba2e4 Mon Sep 17 00:00:00 2001 +From: Larry Finger <Larry.Finger@lwfinger.net> +Date: Sun, 7 Nov 2021 11:35:43 -0600 +Subject: [PATCH 2/8] staging: r8188eu: Fix breakage introduced when 5G code + was removed + +In commit 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions +and code"), two entries were removed from RTW_ChannelPlanMap[], but not replaced +with zeros. The position within this table is important, thus the patch broke +systems operating in regulatory domains osted later than entry 0x13 in the table. +Unfortunately, the FCC entry comes before that point and most testers did not see +this problem. + +Reported-and-tested-by: Zameer Manji <zmanji@gmail.com> +Reported-by: kernel test robot <lkp@intel.com> +Fixes: 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions and code") +Cc: Stable <stable@vger.kernel.org> # v5.5+ +Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> +For: https://bugs.archlinux.org/task/72659 +For: https://bugs.archlinux.org/task/72760 +--- + drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c +index 5a472a4954b0..e5c907ac10fc 100644 +--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c ++++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c +@@ -104,6 +104,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { + {0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */ + {0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */ + {0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */ ++ {0x00}, /* 0x13 */ + {0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */ + {0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */ + {0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */ +@@ -115,6 +116,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { + {0x00}, /* 0x1C, */ + {0x00}, /* 0x1D, */ + {0x00}, /* 0x1E, */ ++ {0x00}, /* 0x1F, */ + /* 0x20 ~ 0x7F , New Define ===== */ + {0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */ + {0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */ +-- +2.34.0 + diff --git a/0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch b/0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch new file mode 100644 index 000000000000..62f9281bcf9a --- /dev/null +++ b/0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch @@ -0,0 +1,56 @@ +From 946e7362fca464b136ec89171e565e33153ccdcf Mon Sep 17 00:00:00 2001 +From: Marc Zyngier <maz@kernel.org> +Date: Thu, 4 Nov 2021 18:01:29 +0000 +Subject: [PATCH 3/8] PCI/MSI: Deal with devices lying about their MSI mask + capability + +It appears that some devices are lying about their mask capability, +pretending that they don't have it, while they actually do. +The net result is that now that we don't enable MSIs on such +endpoint. + +Add a new per-device flag to deal with this. Further patches will +make use of it, sadly. + +Signed-off-by: Marc Zyngier <maz@kernel.org> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Reviewed-by: Thomas Gleixner <tglx@linutronix.de> +Link: https://lore.kernel.org/r/20211104180130.3825416-2-maz@kernel.org +Cc: Bjorn Helgaas <helgaas@kernel.org> +For: https://bugs.archlinux.org/task/72734 +For: https://bugs.archlinux.org/task/72777 +--- + drivers/pci/msi.c | 3 +++ + include/linux/pci.h | 2 ++ + 2 files changed, 5 insertions(+) + +diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c +index ea6371eb9b25..e2dedfa9072d 100644 +--- a/drivers/pci/msi.c ++++ b/drivers/pci/msi.c +@@ -477,6 +477,9 @@ msi_setup_entry(struct pci_dev *dev, int nvec, struct irq_affinity *affd) + goto out; + + pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &control); ++ /* Lies, damned lies, and MSIs */ ++ if (dev->dev_flags & PCI_DEV_FLAGS_HAS_MSI_MASKING) ++ control |= PCI_MSI_FLAGS_MASKBIT; + + entry->msi_attrib.is_msix = 0; + entry->msi_attrib.is_64 = !!(control & PCI_MSI_FLAGS_64BIT); +diff --git a/include/linux/pci.h b/include/linux/pci.h +index cd8aa6fce204..152a4d74f87f 100644 +--- a/include/linux/pci.h ++++ b/include/linux/pci.h +@@ -233,6 +233,8 @@ enum pci_dev_flags { + PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 << 10), + /* Don't use Relaxed Ordering for TLPs directed at this device */ + PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 11), ++ /* Device does honor MSI masking despite saying otherwise */ ++ PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12), + }; + + enum pci_irq_reroute_variant { +-- +2.34.0 + diff --git a/0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch b/0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch new file mode 100644 index 000000000000..2f6174d06e70 --- /dev/null +++ b/0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch @@ -0,0 +1,40 @@ +From d791f46784859b98205808be0e08fc70eeb91d45 Mon Sep 17 00:00:00 2001 +From: Marc Zyngier <maz@kernel.org> +Date: Thu, 4 Nov 2021 18:01:30 +0000 +Subject: [PATCH 4/8] PCI: Add MSI masking quirk for Nvidia ION AHCI + +The ION AHCI device pretends that MSI masking isn't a thing, while it +actually implements it and needs MSIs to be unmasked to work. Add a quirk +to that effect. + +Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> +Signed-off-by: Marc Zyngier <maz@kernel.org> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Tested-by: Rui Salvaterra <rsalvaterra@gmail.com> +Reviewed-by: Thomas Gleixner <tglx@linutronix.de> +Cc: Bjorn Helgaas <helgaas@kernel.org> +Link: https://lore.kernel.org/r/CALjTZvbzYfBuLB+H=fj2J+9=DxjQ2Uqcy0if_PvmJ-nU-qEgkg@mail.gmail.com +Link: https://lore.kernel.org/r/20211104180130.3825416-3-maz@kernel.org +For: https://bugs.archlinux.org/task/72734 +For: https://bugs.archlinux.org/task/72777 +--- + drivers/pci/quirks.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 6c957124f84d..208fa03acdda 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -5796,3 +5796,9 @@ static void apex_pci_fixup_class(struct pci_dev *pdev) + } + DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, + PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class); ++ ++static void nvidia_ion_ahci_fixup(struct pci_dev *pdev) ++{ ++ pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING; ++} ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup); +-- +2.34.0 + diff --git a/0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch b/0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch new file mode 100644 index 000000000000..c4bbb9b06bd8 --- /dev/null +++ b/0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch @@ -0,0 +1,24 @@ +From 6edac03ec96354bac75a0240ee1f848836a2fb19 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org> +Date: Thu, 18 Nov 2021 22:53:31 +0100 +Subject: [PATCH 5/8] PCI: Add more NVIDIA controllers to the MSI masking quirk + +For: https://bugs.archlinux.org/task/72734 +For: https://bugs.archlinux.org/task/72777 +--- + drivers/pci/quirks.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 208fa03acdda..7fdb7e9c2e12 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -5802,3 +5802,5 @@ static void nvidia_ion_ahci_fixup(struct pci_dev *pdev) + pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING; + } + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab9, nvidia_ion_ahci_fixup); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0d88, nvidia_ion_ahci_fixup); +-- +2.34.0 + diff --git a/0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch b/0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch new file mode 100644 index 000000000000..70425bc58677 --- /dev/null +++ b/0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch @@ -0,0 +1,108 @@ +From 8414110f6b3801058a55b505539da7f7d7acd1fb Mon Sep 17 00:00:00 2001 +From: Evan Quan <evan.quan@amd.com> +Date: Mon, 15 Nov 2021 10:51:37 +0800 +Subject: [PATCH 6/8] drm/amd/pm: avoid duplicate powergate/ungate setting + +Just bail out if the target IP block is already in the desired +powergate/ungate state. This can avoid some duplicate settings +which sometimes may cause unexpected issues. + +Link: https://lore.kernel.org/all/YV81vidWQLWvATMM@zn.tnic/ + +Change-Id: I66346c69f121df0f5ee20182451313ae4fda2d04 +Signed-off-by: Evan Quan <evan.quan@amd.com> +Tested-by: Borislav Petkov <bp@suse.de> +Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> +For: https://bugs.archlinux.org/task/72753 +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ + drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- + drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 10 ++++++++++ + drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 8 ++++++++ + 4 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index c1e34aa5925b..96ca42bcfdbf 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -3532,6 +3532,9 @@ int amdgpu_device_init(struct amdgpu_device *adev, + adev->rmmio_size = pci_resource_len(adev->pdev, 2); + } + ++ for (i = 0; i < AMD_IP_BLOCK_TYPE_NUM; i++) ++ atomic_set(&adev->pm.pwr_state[i], POWER_STATE_UNKNOWN); ++ + adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size); + if (adev->rmmio == NULL) { + return -ENOMEM; +diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h +index 257f280d3d53..bd077ea224a4 100644 +--- a/drivers/gpu/drm/amd/include/amd_shared.h ++++ b/drivers/gpu/drm/amd/include/amd_shared.h +@@ -98,7 +98,8 @@ enum amd_ip_block_type { + AMD_IP_BLOCK_TYPE_ACP, + AMD_IP_BLOCK_TYPE_VCN, + AMD_IP_BLOCK_TYPE_MES, +- AMD_IP_BLOCK_TYPE_JPEG ++ AMD_IP_BLOCK_TYPE_JPEG, ++ AMD_IP_BLOCK_TYPE_NUM, + }; + + enum amd_clockgating_state { +diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c +index 03581d5b1836..08362d506534 100644 +--- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c ++++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c +@@ -927,6 +927,13 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t block + { + int ret = 0; + const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; ++ enum ip_power_state pwr_state = gate ? POWER_STATE_OFF : POWER_STATE_ON; ++ ++ if (atomic_read(&adev->pm.pwr_state[block_type]) == pwr_state) { ++ dev_dbg(adev->dev, "IP block%d already in the target %s state!", ++ block_type, gate ? "gate" : "ungate"); ++ return 0; ++ } + + switch (block_type) { + case AMD_IP_BLOCK_TYPE_UVD: +@@ -979,6 +986,9 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t block + break; + } + ++ if (!ret) ++ atomic_set(&adev->pm.pwr_state[block_type], pwr_state); ++ + return ret; + } + +diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +index 98f1b3d8c1d5..16e3f72d31b9 100644 +--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h ++++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +@@ -417,6 +417,12 @@ struct amdgpu_dpm { + enum amd_dpm_forced_level forced_level; + }; + ++enum ip_power_state { ++ POWER_STATE_UNKNOWN, ++ POWER_STATE_ON, ++ POWER_STATE_OFF, ++}; ++ + struct amdgpu_pm { + struct mutex mutex; + u32 current_sclk; +@@ -452,6 +458,8 @@ struct amdgpu_pm { + struct i2c_adapter smu_i2c; + struct mutex smu_i2c_mutex; + struct list_head pm_attr_list; ++ ++ atomic_t pwr_state[AMD_IP_BLOCK_TYPE_NUM]; + }; + + #define R600_SSTU_DFLT 0 +-- +2.34.0 + diff --git a/0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch b/0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch new file mode 100644 index 000000000000..8d667bb92604 --- /dev/null +++ b/0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch @@ -0,0 +1,88 @@ +From aba4d743dacede0c1a7f4ed56a9f949e3349c833 Mon Sep 17 00:00:00 2001 +From: Ajay Garg <ajaygargnsit@gmail.com> +Date: Tue, 12 Oct 2021 19:26:53 +0530 +Subject: [PATCH 7/8] iommu: intel: do deep dma-unmapping, to avoid + kernel-flooding. + +Origins at : +https://lists.linuxfoundation.org/pipermail/iommu/2021-October/thread.html + +=== Changes from v1 => v2 === + +a) +Improved patch-description. + +b) +A more root-level fix, as suggested by + + 1. + Alex Williamson <alex.williamson@redhat.com> + + 2. + Lu Baolu <baolu.lu@linux.intel.com> + +=== Issue === + +Kernel-flooding is seen, when an x86_64 L1 guest (Ubuntu-21) is booted in qemu/kvm +on a x86_64 host (Ubuntu-21), with a host-pci-device attached. + +Following kind of logs, along with the stacktraces, cause the flood : + +...... + DMAR: ERROR: DMA PTE for vPFN 0x428ec already set (to 3f6ec003 not 3f6ec003) + DMAR: ERROR: DMA PTE for vPFN 0x428ed already set (to 3f6ed003 not 3f6ed003) + DMAR: ERROR: DMA PTE for vPFN 0x428ee already set (to 3f6ee003 not 3f6ee003) + DMAR: ERROR: DMA PTE for vPFN 0x428ef already set (to 3f6ef003 not 3f6ef003) + DMAR: ERROR: DMA PTE for vPFN 0x428f0 already set (to 3f6f0003 not 3f6f0003) +...... + +=== Current Behaviour, leading to the issue === + +Currently, when we do a dma-unmapping, we unmap/unlink the mappings, but +the pte-entries are not cleared. + +Thus, following sequencing would flood the kernel-logs : + +i) +A dma-unmapping makes the real/leaf-level pte-slot invalid, but the +pte-content itself is not cleared. + +ii) +Now, during some later dma-mapping procedure, as the pte-slot is about +to hold a new pte-value, the intel-iommu checks if a prior +pte-entry exists in the pte-slot. If it exists, it logs a kernel-error, +along with a corresponding stacktrace. + +iii) +Step ii) runs in abundance, and the kernel-logs run insane. + +=== Fix === + +We ensure that as part of a dma-unmapping, each (unmapped) pte-slot +is also cleared of its value/content (at the leaf-level, where the +real mapping from a iova => pfn mapping is stored). + +This completes a "deep" dma-unmapping. + +Signed-off-by: Ajay Garg <ajaygargnsit@gmail.com> +Link: https://lore.kernel.org/linux-iommu/20211012135653.3852-1-ajaygargnsit@gmail.com/ +--- + drivers/iommu/intel/iommu.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c +index d75f59ae28e6..485a8ea71394 100644 +--- a/drivers/iommu/intel/iommu.c ++++ b/drivers/iommu/intel/iommu.c +@@ -5090,6 +5090,8 @@ static size_t intel_iommu_unmap(struct iommu_domain *domain, + gather->freelist = domain_unmap(dmar_domain, start_pfn, + last_pfn, gather->freelist); + ++ dma_pte_clear_range(dmar_domain, start_pfn, last_pfn); ++ + if (dmar_domain->max_addr == iova + size) + dmar_domain->max_addr = iova; + +-- +2.34.0 + @@ -64,7 +64,7 @@ _subarch= ### IMPORTANT: Do no edit below this line unless you know what you're doing pkgbase=linux-ck -pkgver=5.15.2 +pkgver=5.15.3 pkgrel=1 arch=(x86_64) url="https://wiki.archlinux.org/index.php/Linux-ck" @@ -86,17 +86,29 @@ source=( "more-uarches-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/$_gcc_more_v.tar.gz" "xanmod-patches-from-ck-$_commit.tar.gz::https://github.com/xanmod/linux-patches/archive/$_commit.tar.gz" 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + 0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch + 0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch + 0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch + 0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch + 0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch + 0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) -b2sums=('e1247057fc57e2f071ff150b5e0651db054a1e15a258ebd198921f7ef0c1e441f0a36c46024298175a8a9a0bb7cc0b6d505d7a77a053c1ce88a720ebea424d89' +b2sums=('93379b68cfe85a979a7a39179e2bf622702d5e4f7a1d5a5bace1e8d11583d77966bce5b0e61f047fcb40c6c2be401e7725b3aa01e602c6ef4ac045a24ebcc2cd' 'SKIP' - '13e22007dfd81dcfcd9a159881ddc5f92a600d6ed5f581c0826c5e2b2823b6a7ba0628e09960b8146d3a9bb669ee5ba7b119bd7ecb6cad06a76e6511bf533a44' + '1154722c5d8a33dedbd18679724ef34ac3aa96900c53aa8ebbba10ea87b0aaa0363d278b0aa4e5e5fed7e85c05e9b7892ba6bdd72f87117f584fef785d6f91d0' '534091fb5034226d48f18da2114305860e67ee49a1d726b049a240ce61df83e840a9a255e5b8fa9279ec07dd69fb0aea6e2e48962792c2b5367db577a4423d8d' 'cf589ec357a96b9e573bce298bb1d64fa50339ea047767f2a730a8dc9808e2316b3e7c885d730233ba50d570725d4c72632d1b74a371ef02ac471d4c944fe63e' - 'c9d2fb487b12040f17a9a8eaefca776c2a2a1c37fb0fb6337630ff896f82f25c0303e1f26f0fa98e4f3e6eb143947d84a48a286678aa2977163711e291a90115') + '90e2c56062fc6ab9f914d82ed3b5ff3cc9fef2293ffdedb51ab2776441b1d2ff46b69af8e6c97c80346449123f309fe4bcdeac2fe95a5f8e201f41b9d29943f3' + '812f8ff0b7cdd21e6b1b9337b789619a992bd3053d3c47533d76ec4e84d5ca4c340252415cf4cc616ac4cf9887849c541d1e8e370fddcb7c5705532a6c8b1e78' + 'fbf9d53f53ef32aff185a28f0dfdf9d8953452d7a25f138bfafef78fd9129b89c1d7498576bb357be896684757040fc287c637d0d2e74ab87761212aceedb5ac' + '1e2344e669268216a9b6097f199e8ba2301c37e5b9db16fb8310e35674a6fcec72b7211717d1fe864a85d7e898e21b3402310018ab5ee9d97d3512599bff3b3b' + '60699efcb88f8643dda1dad5a104c7b2780f8233c82d89bc1916c14fd808febdff4536b84e32d790137455d922d18d86d8d56c7671955b26c068a8f0272ed1a6' + '47fe5e2eb9e2ceeabad141d2c631d22527f7068d81d673e0bdee2a7070986b3d1d75001a953a0e3501eb9b623c66700464af73153ad6f998f20587e58fc7820b' + '7ac6e6886d578a46d22c089ccd4b99eca3515263c4f1aa92a2f85a1836c72b096560145ad4ee1c94c2c1c2b747afd299fc6b9c73d9076c364401d80413f69fe4') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.15.2-arch1 Kernel Configuration +# Linux/x86 5.15.3-arch1 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.1.0" CONFIG_CC_IS_GCC=y @@ -828,6 +828,7 @@ CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y CONFIG_ARCH_USE_MEMREMAP_PROT=y CONFIG_LOCK_EVENT_COUNTS=y CONFIG_ARCH_HAS_MEM_ENCRYPT=y +CONFIG_ARCH_HAS_CC_PLATFORM=y CONFIG_HAVE_STATIC_CALL=y CONFIG_HAVE_STATIC_CALL_INLINE=y CONFIG_HAVE_PREEMPT_DYNAMIC=y @@ -9918,7 +9919,7 @@ CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=m +CONFIG_CRYPTO_RNG_DEFAULT=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_KPP2=y @@ -10071,11 +10072,11 @@ CONFIG_CRYPTO_ZSTD=y # Random Number Generation # CONFIG_CRYPTO_ANSI_CPRNG=m -CONFIG_CRYPTO_DRBG_MENU=m +CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_HASH=y CONFIG_CRYPTO_DRBG_CTR=y -CONFIG_CRYPTO_DRBG=m +CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_USER_API=m CONFIG_CRYPTO_USER_API_HASH=m |