lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2/3] iommu/vt-d: treat unmapped RMRR entries as sane
From
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
\
 
 \ /
  Last update: 2019-12-11 20:47    [W:0.063 / U:2.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site