linux-uconsole/arch
Charlotte Tan ef11e8ec00 iommu/vt-d: Allow NVS regions in arch_rmrr_sanity_check()
[ Upstream commit 5566e68d82 ]

arch_rmrr_sanity_check() warns if the RMRR is not covered by an ACPI
Reserved region, but it seems like it should accept an NVS region as
well. The ACPI spec
https://uefi.org/specs/ACPI/6.5/15_System_Address_Map_Interfaces.html
uses similar wording for "Reserved" and "NVS" region types; for NVS
regions it says "This range of addresses is in use or reserved by the
system and must not be used by the operating system."

There is an old comment on this mailing list that also suggests NVS
regions should pass the arch_rmrr_sanity_check() test:

 The warnings come from arch_rmrr_sanity_check() since it checks whether
 the region is E820_TYPE_RESERVED. However, if the purpose of the check
 is to detect RMRR has regions that may be used by OS as free memory,
 isn't  E820_TYPE_NVS safe, too?

This patch overlaps with another proposed patch that would add the region
type to the log since sometimes the bug reporter sees this log on the
console but doesn't know to include the kernel log:

https://lore.kernel.org/lkml/20220611204859.234975-3-atomlin@redhat.com/

Here's an example of the "Firmware Bug" apparent false positive (wrapped
for line length):

 DMAR: [Firmware Bug]: No firmware reserved region can cover this RMRR
       [0x000000006f760000-0x000000006f762fff], contact BIOS vendor for
       fixes
 DMAR: [Firmware Bug]: Your BIOS is broken; bad RMRR
       [0x000000006f760000-0x000000006f762fff]

This is the snippet from the e820 table:

 BIOS-e820: [mem 0x0000000068bff000-0x000000006ebfefff] reserved
 BIOS-e820: [mem 0x000000006ebff000-0x000000006f9fefff] ACPI NVS
 BIOS-e820: [mem 0x000000006f9ff000-0x000000006fffefff] ACPI data

Fixes: f036c7fa0a ("iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved")
Cc: Will Mortensen <will@extrahop.com>
Link: https://lore.kernel.org/linux-iommu/64a5843d-850d-e58c-4fc2-0a0eeeb656dc@nec.com/
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216443
Signed-off-by: Charlotte Tan <charlotte@extrahop.com>
Reviewed-by: Aaron Tomlin <atomlin@redhat.com>
Link: https://lore.kernel.org/r/20220929044449.32515-1-charlotte@extrahop.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-30 09:41:17 +01:00
..
alpha tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:19:28 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:53:55 +02:00
arm ARM: dts: imx6sx: add missing properties for sram 2022-10-26 13:25:51 +02:00
arm64 arm64: errata: Remove AES hwcap for COMPAT tasks 2022-10-30 09:41:16 +01:00
c6x
csky csky/kprobe: reclaim insn_slot on kprobe unregistration 2022-08-25 11:38:16 +02:00
h8300
hexagon hexagon: select ARCH_WANT_LD_ORPHAN_WARN 2022-08-21 15:15:33 +02:00
ia64 ia64: export memory_add_physaddr_to_nid to fix cxl build error 2022-10-26 13:25:29 +02:00
m68k Revert "m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch" 2022-07-29 17:19:09 +02:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-08 14:40:08 +02:00
mips MIPS: BCM47XX: Cast memcmp() of function to (void *) 2022-10-26 13:25:44 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 09:57:10 +02:00
nios2 nios2: add force_successful_syscall_return() 2022-08-25 11:38:04 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-09 10:20:55 +02:00
parisc parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page 2022-09-23 14:16:56 +02:00
powerpc powerpc: Fix SPE Power ISA properties for e500v1 platforms 2022-10-26 13:25:41 +02:00
riscv riscv: Pass -mno-relax only on lld < 15.0.0 2022-10-26 13:25:10 +02:00
s390 s390: fix nospec table alignments 2022-09-08 11:11:40 +02:00
sh sh: machvec: Use char[] for section boundaries 2022-10-26 13:25:17 +02:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-05-30 09:33:42 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 13:25:10 +02:00
x86 iommu/vt-d: Allow NVS regions in arch_rmrr_sanity_check() 2022-10-30 09:41:17 +01:00
xtensa xtensa: iss: fix handling error cases in iss_net_configure() 2022-08-21 15:15:59 +02:00
.gitignore
Kconfig arch/cc: Introduce a function to check for confidential computing features 2021-11-18 14:04:32 +01:00