All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/CPU: don't hard-code MTRR availability
@ 2025-03-25  7:18 Jan Beulich
  2025-03-27  8:21 ` Roger Pau Monné
  2025-03-27 10:55 ` Roger Pau Monné
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Beulich @ 2025-03-25  7:18 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org; +Cc: Andrew Cooper, Roger Pau Monné

In particular if we're running virtualized, the underlying hypervisor
(which may be another Xen) may not surface MTRRs, and offer PAT only.

Fixes: 5a281883cdc3 ("Hardcode many cpu features for x86/64 -- we know 64-bit")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/include/asm/cpufeature.h
+++ b/xen/arch/x86/include/asm/cpufeature.h
@@ -70,7 +70,7 @@ static inline bool boot_cpu_has(unsigned
 #define cpu_has_pse             1
 #define cpu_has_apic            boot_cpu_has(X86_FEATURE_APIC)
 #define cpu_has_sep             boot_cpu_has(X86_FEATURE_SEP)
-#define cpu_has_mtrr            1
+#define cpu_has_mtrr            boot_cpu_has(X86_FEATURE_MTRR)
 #define cpu_has_pge             1
 #define cpu_has_pse36           boot_cpu_has(X86_FEATURE_PSE36)
 #define cpu_has_clflush         boot_cpu_has(X86_FEATURE_CLFLUSH)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-03-27 10:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-25  7:18 [PATCH] x86/CPU: don't hard-code MTRR availability Jan Beulich
2025-03-27  8:21 ` Roger Pau Monné
2025-03-27  9:15   ` Jan Beulich
2025-03-27  9:30     ` Jan Beulich
2025-03-27  9:50     ` Roger Pau Monné
2025-03-27  9:59       ` Jan Beulich
2025-03-27 10:54         ` Roger Pau Monné
2025-03-27 10:55 ` Roger Pau Monné

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.