[PATCH v12 07/19] x86/msr: Add variable MTRR base/mask and x2apic ID registers

Ross Philipson posted 19 patches 1 year, 1 month ago
There is a newer version of this series
[PATCH v12 07/19] x86/msr: Add variable MTRR base/mask and x2apic ID registers
Posted by Ross Philipson 1 year, 1 month ago
These values are needed by Secure Launch to locate particular CPUs
during AP startup and to restore the MTRR state after a TXT launch.

Signed-off-by: Ross Philipson <ross.philipson@oracle.com>
---
 arch/x86/include/asm/msr-index.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 3ae84c3b8e6d..c54c1b644ec4 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -364,6 +364,9 @@
 #define MSR_IA32_RTIT_OUTPUT_BASE	0x00000560
 #define MSR_IA32_RTIT_OUTPUT_MASK	0x00000561
 
+#define MSR_MTRRphysBase0		0x00000200
+#define MSR_MTRRphysMask0		0x00000201
+
 #define MSR_MTRRfix64K_00000		0x00000250
 #define MSR_MTRRfix16K_80000		0x00000258
 #define MSR_MTRRfix16K_A0000		0x00000259
@@ -881,6 +884,8 @@
 #define MSR_IA32_APICBASE_ENABLE	(1<<11)
 #define MSR_IA32_APICBASE_BASE		(0xfffff<<12)
 
+#define MSR_IA32_X2APIC_APICID		0x00000802
+
 #define MSR_IA32_UCODE_WRITE		0x00000079
 #define MSR_IA32_UCODE_REV		0x0000008b
 
-- 
2.39.3
Re: [PATCH v12 07/19] x86/msr: Add variable MTRR base/mask and x2apic ID registers
Posted by Jarkko Sakkinen 11 months, 1 week ago
On Thu, Dec 19, 2024 at 11:42:04AM -0800, Ross Philipson wrote:
> These values are needed by Secure Launch to locate particular CPUs
> during AP startup and to restore the MTRR state after a TXT launch.

Hmm... does the first part with like locating particular CPU cores?

I'd start also the sentence with the action taken except assuring
why the undefined action is taken.

"Add the MSR values required by Secure Launch (SL) to locate particular
CPU cores during application processor (AP) startup, and restore the
MTRR state after a Intel TXT launch."

Along the lines would be more informative...

BR, Jarkko
Re: [PATCH v12 07/19] x86/msr: Add variable MTRR base/mask and x2apic ID registers
Posted by ross.philipson@oracle.com 11 months, 1 week ago
On 3/6/25 9:55 PM, Jarkko Sakkinen wrote:
> On Thu, Dec 19, 2024 at 11:42:04AM -0800, Ross Philipson wrote:
>> These values are needed by Secure Launch to locate particular CPUs
>> during AP startup and to restore the MTRR state after a TXT launch.
> 
> Hmm... does the first part with like locating particular CPU cores?
> 
> I'd start also the sentence with the action taken except assuring
> why the undefined action is taken.
> 
> "Add the MSR values required by Secure Launch (SL) to locate particular
> CPU cores during application processor (AP) startup, and restore the
> MTRR state after a Intel TXT launch."

Yes we can adopt something like that. Thanks for the suggestion.

Ross

> 
> Along the lines would be more informative...
> 
> BR, Jarkko