Commit 8e690b8
x86/kvm: Override default caching mode for SEV-SNP and TDX
AMD SEV-SNP and Intel TDX have limited access to MTRR: either it is not
advertised in CPUID or it cannot be programmed (on TDX, due to #VE on
CR0.CD clear).
This results in guests using uncached mappings where it shouldn't and
pmd/pud_set_huge() failures due to non-uniform memory type reported by
mtrr_type_lookup().
Override MTRR state, making it WB by default as the kernel does for
Hyper-V guests.
Signed-off-by: Kirill A. Shutemov <[email protected]>
Suggested-by: Binbin Wu <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Tom Lendacky <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>1 parent bc07eea commit 8e690b8
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
980 | 981 | | |
981 | 982 | | |
982 | 983 | | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
983 | 987 | | |
984 | 988 | | |
985 | 989 | | |
| |||
0 commit comments