From: Barret Rhoden <brho@google.com> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>, David Woodhouse <dwmw2@infradead.org>, Joerg Roedel <joro@8bytes.org>, Yian Chen <yian.chen@intel.com>, Sohil Mehta <sohil.mehta@intel.com> Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, x86@kernel.org Subject: [PATCH 2/3] iommu/vt-d: treat unmapped RMRR entries as sane Date: Wed, 11 Dec 2019 14:46:05 -0500 [thread overview] Message-ID: <20191211194606.87940-3-brho@google.com> (raw) In-Reply-To: <20191211194606.87940-1-brho@google.com> The RMRR sanity check is to confirm that the memory pointed to by the RMRR entry is not used by the kernel. e820 RESERVED memory will not be used. However, there are ranges of physical memory that are not covered by the e820 table at all. The kernel will not use this memory, either. This commit expands the sanity check to treat memory that is not in any e820 entry as safe. Signed-off-by: Barret Rhoden <brho@google.com> --- arch/x86/include/asm/iommu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h index bf1ed2ddc74b..7e9f0c2f975f 100644 --- a/arch/x86/include/asm/iommu.h +++ b/arch/x86/include/asm/iommu.h @@ -20,6 +20,8 @@ arch_rmrr_sanity_check(struct acpi_dmar_reserved_memory *rmrr) if (e820__mapped_all(start, end, E820_TYPE_RESERVED)) return 0; + if (!e820__mapped_any(start, end, 0)) + return 0; pr_err(FW_BUG "No firmware reserved region can cover this RMRR [%#018Lx-%#018Lx], contact BIOS vendor for fixes\n", start, end - 1); -- 2.24.0.525.g8f36a354ae-goog
WARNING: multiple messages have this Message-ID (diff)
From: Barret Rhoden via iommu <iommu@lists.linux-foundation.org> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>, David Woodhouse <dwmw2@infradead.org>, Joerg Roedel <joro@8bytes.org>, Yian Chen <yian.chen@intel.com>, Sohil Mehta <sohil.mehta@intel.com> Cc: iommu@lists.linux-foundation.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] iommu/vt-d: treat unmapped RMRR entries as sane Date: Wed, 11 Dec 2019 14:46:05 -0500 [thread overview] Message-ID: <20191211194606.87940-3-brho@google.com> (raw) In-Reply-To: <20191211194606.87940-1-brho@google.com> The RMRR sanity check is to confirm that the memory pointed to by the RMRR entry is not used by the kernel. e820 RESERVED memory will not be used. However, there are ranges of physical memory that are not covered by the e820 table at all. The kernel will not use this memory, either. This commit expands the sanity check to treat memory that is not in any e820 entry as safe. Signed-off-by: Barret Rhoden <brho@google.com> --- arch/x86/include/asm/iommu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h index bf1ed2ddc74b..7e9f0c2f975f 100644 --- a/arch/x86/include/asm/iommu.h +++ b/arch/x86/include/asm/iommu.h @@ -20,6 +20,8 @@ arch_rmrr_sanity_check(struct acpi_dmar_reserved_memory *rmrr) if (e820__mapped_all(start, end, E820_TYPE_RESERVED)) return 0; + if (!e820__mapped_any(start, end, 0)) + return 0; pr_err(FW_BUG "No firmware reserved region can cover this RMRR [%#018Lx-%#018Lx], contact BIOS vendor for fixes\n", start, end - 1); -- 2.24.0.525.g8f36a354ae-goog _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2019-12-11 19:46 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-11 19:46 [PATCH 0/3] iommu/vt-d bad RMRR workarounds Barret Rhoden 2019-12-11 19:46 ` Barret Rhoden via iommu 2019-12-11 19:46 ` [PATCH 1/3] iommu/vt-d: skip RMRR entries that fail the sanity check Barret Rhoden 2019-12-11 19:46 ` Barret Rhoden via iommu 2019-12-16 19:07 ` Chen, Yian 2019-12-16 19:07 ` Chen, Yian 2019-12-16 19:35 ` Barret Rhoden 2019-12-16 19:35 ` Barret Rhoden via iommu 2019-12-17 19:19 ` Chen, Yian 2019-12-17 19:19 ` Chen, Yian 2019-12-23 20:27 ` Barret Rhoden 2019-12-23 20:27 ` Barret Rhoden via iommu 2019-12-11 19:46 ` Barret Rhoden [this message] 2019-12-11 19:46 ` [PATCH 2/3] iommu/vt-d: treat unmapped RMRR entries as sane Barret Rhoden via iommu 2019-12-11 19:46 ` [PATCH 3/3] iommu/vt-d: skip invalid RMRR entries Barret Rhoden 2019-12-11 19:46 ` Barret Rhoden via iommu 2019-12-12 2:43 ` [PATCH 0/3] iommu/vt-d bad RMRR workarounds Lu Baolu 2019-12-12 2:43 ` Lu Baolu 2019-12-13 14:31 ` Barret Rhoden 2019-12-13 14:31 ` Barret Rhoden via iommu 2019-12-14 1:52 ` Lu Baolu 2019-12-14 1:52 ` Lu Baolu 2019-12-16 19:11 ` Chen, Yian 2019-12-16 19:11 ` Chen, Yian
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191211194606.87940-3-brho@google.com \ --to=brho@google.com \ --cc=bp@alien8.de \ --cc=dwmw2@infradead.org \ --cc=hpa@zytor.com \ --cc=iommu@lists.linux-foundation.org \ --cc=joro@8bytes.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=sohil.mehta@intel.com \ --cc=tglx@linutronix.de \ --cc=x86@kernel.org \ --cc=yian.chen@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.