Thread (1 message) 1 message, 1 author, 2021-11-25

Re: [RFC PATCH v3 02/59] x86/mtrr: mask out keyid bits from variable mtrr mask register

From: Thomas Gleixner <hidden>
Date: 2021-11-25 17:19:12
Also in: lkml

On Thu, Nov 25 2021 at 09:36, Thomas Gleixner wrote:
quoted
 
+			if (boot_cpu_has(X86_FEATURE_TME)) {
cpu_feature_enabled() as Borislav pointed out several times already.
quoted
+				u64 tme_activate;
+
+				rdmsrl(MSR_IA32_TME_ACTIVATE, tme_activate);
+				if (TME_ACTIVATE_LOCKED(tme_activate) &&
+				    TME_ACTIVATE_ENABLED(tme_activate)) {
+					phys_addr -= TME_ACTIVATE_KEYID_BITS(tme_activate);
+				}
+			}
 			size_or_mask = SIZE_OR_MASK_BITS(phys_addr);
 			size_and_mask = ~size_or_mask & 0xfffff00000ULL;
 		} else if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR &&
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help