Skip to content

Commit f9f57da

Browse files
jgross1bp3tk0v
authored andcommitted
x86/mtrr: Revert 90b926e ("x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case")
Commit 90b926e ("x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case") broke the use case of running Xen dom0 kernels on machines with an external disk enclosure attached via USB, see Link tag. What this commit was originally fixing - SEV-SNP guests on Hyper-V - is a more specialized situation which has other issues at the moment anyway so reverting this now and addressing the issue properly later is the prudent thing to do. So revert it in time for the 6.2 proper release. [ bp: Rewrite commit message. ] Reported-by: Christian Kujau <lists@nerdbynature.de> Tested-by: Christian Kujau <lists@nerdbynature.de> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/4fe9541e-4d4c-2b2a-f8c8-2d34a7284930@nerdbynature.de
1 parent ceaa837 commit f9f57da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/x86/mm/pat/memtype.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,7 @@ static unsigned long pat_x_mtrr_type(u64 start, u64 end,
387387
u8 mtrr_type, uniform;
388388

389389
mtrr_type = mtrr_type_lookup(start, end, &uniform);
390-
if (mtrr_type != MTRR_TYPE_WRBACK &&
391-
mtrr_type != MTRR_TYPE_INVALID)
390+
if (mtrr_type != MTRR_TYPE_WRBACK)
392391
return _PAGE_CACHE_MODE_UC_MINUS;
393392

394393
return _PAGE_CACHE_MODE_WB;

0 commit comments

Comments
 (0)