• Alison Schofield's avatar
    x86/cpu: Remove useless work in detect_tme_early() · 98b83cf0
    Alison Schofield authored
    TME (Total Memory Encryption) and MKTME (Multi-Key Total Memory
    Encryption) BIOS detection were introduced together here [1] and
    are loosely coupled in the Intel CPU init code.
    
    TME is a hardware only feature and its BIOS status is all that needs
    to be shared with the kernel user: enabled or disabled. The TME
    algorithm the BIOS is using and whether or not the kernel recognizes
    that algorithm is useless to the kernel user.
    
    MKTME is a hardware feature that requires kernel support. MKTME
    detection code was added in advance of broader kernel support for
    MKTME that never followed. So, rather than continuing to spew
    needless and confusing messages about BIOS MKTME status, remove
    most of the MKTME pieces from detect_tme_early().
    
    Keep one useful message: alert the user when BIOS enabled MKTME
    reduces the available physical address bits. Recovery of the MKTME
    consumed bits requires a reboot with MKTME disabled in BIOS.
    
    There is no functional change for the user, only a change in boot
    messages. Below is one example when both TME and MKTME are enabled
    in BIOS with AES_XTS_256 which is unknown to the detect tme code.
    
    Before:
    [] x86/tme: enabled by BIOS
    [] x86/tme: Unknown policy is active: 0x2
    [] x86/mktme: No known encryption algorithm is supported: 0x4
    [] x86/mktme: enabled by BIOS
    [] x86/mktme: 127 KeyIDs available
    
    After:
    [] x86/tme: enabled by BIOS
    [] x86/mktme: BIOS enable: x86_phys_bits reduced by 8
    
    [1]
    commit cb06d8e3 ("x86/tme: Detect if TME and MKTME is activated by BIOS")
    Signed-off-by: default avatarAlison Schofield <alison.schofield@intel.com>
    Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
    Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Link: https://lore.kernel.org/all/86dfdf6ced8c9b790f9376bf6c7e22b5608f47c2.1715054189.git.alison.schofield%40intel.com
    98b83cf0
intel.c 35.7 KB