Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -209,6 +209,7 @@ static int intel_iommu_superpage = 1;
static int iommu_identity_mapping;
static int iommu_skip_te_disable;
static int disable_igfx_iommu;
+static int dmar_cmdline_on;

#define IDENTMAP_AZALIA 4

@@ -241,6 +242,7 @@ static int __init intel_iommu_setup(char *str)
while (*str) {
if (!strncmp(str, "on", 2)) {
dmar_disabled = 0;
+ dmar_cmdline_on = 1;
pr_info("IOMMU enabled\n");
} else if (!strncmp(str, "off", 3)) {
dmar_disabled = 1;
@@ -2538,6 +2540,41 @@ static int __init probe_acpi_namespace_devices(void)
return 0;
}

+/*
+ * On these machines the firmware-TPM (Intel PTT) command/response buffers
+ * live in system RAM and are fetched by a hidden ME function (00:16.7) via
+ * DMA, but the DMAR table has no RMRR covering them. With DMA remapping
+ * enabled those reads fault and tpm_crb probe times out, so the TPM is
+ * unusable. Keep the IOMMU off by default there; "intel_iommu=on" still
+ * enables it.
+ */
+static const struct dmi_system_id intel_iommu_ptt_no_rmrr[] __initconst = {
+ {
+ .ident = "Dell XPS 13 9343",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9343"),
+ },
+ },
+ { }
+};
+
+static __init void intel_iommu_apply_dmi_quirks(void)
+{
+ const struct dmi_system_id *id;
+
+ if (dmar_disabled || dmar_cmdline_on)
+ return;
+
+ id = dmi_first_match(intel_iommu_ptt_no_rmrr);
+ if (!id)
+ return;
+
+ pr_info("%s: disabling DMA remapping by default, firmware TPM DMA is not covered by an RMRR (use intel_iommu=on to override)\n",
+ id->ident);
+ dmar_disabled = 1;
+}
+
static __init int tboot_force_iommu(void)
{
if (!tboot_enabled())
@@ -2558,6 +2595,8 @@ int __init intel_iommu_init(void)
struct dmar_drhd_unit *drhd;
struct intel_iommu *iommu;

+ intel_iommu_apply_dmi_quirks();
+
/*
* Intel IOMMU is required for a TXT/tboot launch or platform
* opt in, so enforce that.
5 changes: 4 additions & 1 deletion pkgbuilds/linux-omarchy-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pkgbase=linux-omarchy-bore
pkgver=7.2.5
pkgrel=6
pkgrel=7
pkgdesc='Omarchy Linux (BORE CPU scheduler, ADIOS I/O scheduler)'
url='https://omarchy.org'
arch=(
Expand Down Expand Up @@ -124,6 +124,7 @@ source=(
0661-rtw89-command-offload-source.patch{,.sig}
0662-iwlwifi-mld-skip-tx-when-firmware-dead.patch{,.sig}
0700-pci-target-speed-quirk.patch{,.sig}
0710-iommu-intel-xps13-9343-ptt-no-rmrr.patch
0750-applesmc-cache-race.patch{,.sig}
0751-applesmc-key-backlight-workqueue-leak.patch{,.sig}
0770-acpi-pm-acer-swift3-sf314-56g-power-resource.patch{,.sig}
Expand Down Expand Up @@ -304,6 +305,7 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a
'SKIP'
'4a4af88fc8a8c37ae6d20b35d19e60a17672569d5489be120edbcc62ab3ba4bbc43b78cd0799b9fd73c84b089364320bcbad6fcb7128c2cb06d15ed984d6fc8c'
'SKIP'
'5270f0fb2c643d83d2646a11be81aae80166b9fe955cb67fe3cefffb5261790c7171daa3208643a771df2482cd6eff94371357008cdb6fdcc31bc49ec4714971'
'0959ca78ff31299adf1091f4aa1b32cd2e9066aba5e44f0658c91bcb93fe8714f7b671ffa2cd498ecbb6c6e643ac6571bfb193034af206599122fd7c2a3c23a8'
'SKIP'
'03ca740048e48c5b6948f972f7a826240cf51c9b5c8645d1b1c50366e78cbf45f5b45b7b47f87f231b50aab46ef2f8fd78bc53899ba1c319a19f9f61c7cecb90'
Expand Down Expand Up @@ -499,6 +501,7 @@ sha256sums=('55ddf0df8325d9dad96fcff7bd93977d22e3f50af06527572af59b77c7632b78'
'SKIP'
'4e80f2d05591175d4ed0a1a144509e97260e5593472aae586c07956215d99162'
'SKIP'
'0273ba08c71247b0af83d97347f42e2528a5c6fa16a44b0dc949869bb89d2ec8'
'8ebce8f38e38bd66879d040028c2448e5bc7dcde9df0ccee2b4221015591b162'
'SKIP'
'0b0e05b615ae6eb825bf7d7fa568f551b0dff6c2cee62c9285c1b0d63224ea1c'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -209,6 +209,7 @@ static int intel_iommu_superpage = 1;
static int iommu_identity_mapping;
static int iommu_skip_te_disable;
static int disable_igfx_iommu;
+static int dmar_cmdline_on;

#define IDENTMAP_AZALIA 4

@@ -241,6 +242,7 @@ static int __init intel_iommu_setup(char *str)
while (*str) {
if (!strncmp(str, "on", 2)) {
dmar_disabled = 0;
+ dmar_cmdline_on = 1;
pr_info("IOMMU enabled\n");
} else if (!strncmp(str, "off", 3)) {
dmar_disabled = 1;
@@ -2538,6 +2540,41 @@ static int __init probe_acpi_namespace_devices(void)
return 0;
}

+/*
+ * On these machines the firmware-TPM (Intel PTT) command/response buffers
+ * live in system RAM and are fetched by a hidden ME function (00:16.7) via
+ * DMA, but the DMAR table has no RMRR covering them. With DMA remapping
+ * enabled those reads fault and tpm_crb probe times out, so the TPM is
+ * unusable. Keep the IOMMU off by default there; "intel_iommu=on" still
+ * enables it.
+ */
+static const struct dmi_system_id intel_iommu_ptt_no_rmrr[] __initconst = {
+ {
+ .ident = "Dell XPS 13 9343",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9343"),
+ },
+ },
+ { }
+};
+
+static __init void intel_iommu_apply_dmi_quirks(void)
+{
+ const struct dmi_system_id *id;
+
+ if (dmar_disabled || dmar_cmdline_on)
+ return;
+
+ id = dmi_first_match(intel_iommu_ptt_no_rmrr);
+ if (!id)
+ return;
+
+ pr_info("%s: disabling DMA remapping by default, firmware TPM DMA is not covered by an RMRR (use intel_iommu=on to override)\n",
+ id->ident);
+ dmar_disabled = 1;
+}
+
static __init int tboot_force_iommu(void)
{
if (!tboot_enabled())
@@ -2558,6 +2595,8 @@ int __init intel_iommu_init(void)
struct dmar_drhd_unit *drhd;
struct intel_iommu *iommu;

+ intel_iommu_apply_dmi_quirks();
+
/*
* Intel IOMMU is required for a TXT/tboot launch or platform
* opt in, so enforce that.
5 changes: 4 additions & 1 deletion pkgbuilds/linux-omarchy/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pkgbase=linux-omarchy
pkgver=7.2.5
pkgrel=6
pkgrel=7
pkgdesc='Omarchy Linux'
url='https://omarchy.org'
arch=(
Expand Down Expand Up @@ -123,6 +123,7 @@ source=(
0661-rtw89-command-offload-source.patch{,.sig}
0662-iwlwifi-mld-skip-tx-when-firmware-dead.patch{,.sig}
0700-pci-target-speed-quirk.patch{,.sig}
0710-iommu-intel-xps13-9343-ptt-no-rmrr.patch
0750-applesmc-cache-race.patch{,.sig}
0751-applesmc-key-backlight-workqueue-leak.patch{,.sig}
0770-acpi-pm-acer-swift3-sf314-56g-power-resource.patch{,.sig}
Expand Down Expand Up @@ -301,6 +302,7 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a
'SKIP'
'4a4af88fc8a8c37ae6d20b35d19e60a17672569d5489be120edbcc62ab3ba4bbc43b78cd0799b9fd73c84b089364320bcbad6fcb7128c2cb06d15ed984d6fc8c'
'SKIP'
'5270f0fb2c643d83d2646a11be81aae80166b9fe955cb67fe3cefffb5261790c7171daa3208643a771df2482cd6eff94371357008cdb6fdcc31bc49ec4714971'
'0959ca78ff31299adf1091f4aa1b32cd2e9066aba5e44f0658c91bcb93fe8714f7b671ffa2cd498ecbb6c6e643ac6571bfb193034af206599122fd7c2a3c23a8'
'SKIP'
'03ca740048e48c5b6948f972f7a826240cf51c9b5c8645d1b1c50366e78cbf45f5b45b7b47f87f231b50aab46ef2f8fd78bc53899ba1c319a19f9f61c7cecb90'
Expand Down Expand Up @@ -494,6 +496,7 @@ sha256sums=('55ddf0df8325d9dad96fcff7bd93977d22e3f50af06527572af59b77c7632b78'
'SKIP'
'4e80f2d05591175d4ed0a1a144509e97260e5593472aae586c07956215d99162'
'SKIP'
'0273ba08c71247b0af83d97347f42e2528a5c6fa16a44b0dc949869bb89d2ec8'
'8ebce8f38e38bd66879d040028c2448e5bc7dcde9df0ccee2b4221015591b162'
'SKIP'
'0b0e05b615ae6eb825bf7d7fa568f551b0dff6c2cee62c9285c1b0d63224ea1c'
Expand Down
Loading