lkml.org 
[lkml]   [2022]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCHv6 10/30] x86/tdx: Handle CPUID via #VE
    Date
    On Wed, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote:
    > In TDX guests, most CPUID leaf/sub-leaf combinations are virtualized
    > by the TDX module while some trigger #VE.
    >
    > Implement the #VE handling for EXIT_REASON_CPUID by handing it through
    > the hypercall, which in turn lets the TDX module handle it by invoking
    > the host VMM.
    >
    > More details on CPUID Virtualization can be found in the TDX module
    > specification, the section titled "CPUID Virtualization".
    >
    > Note that VMM that handles the hypercall is not trusted. It can return
    > data that may steer the guest kernel in wrong direct. Only allow VMM
    > to control range reserved for hypervisor communication.
    >
    > Return all-zeros for any CPUID outside the hypervisor range. It matches
    > CPU behaviour for non-supported leaf.
    >
    > Co-developed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    > Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    > Reviewed-by: Andi Kleen <ak@linux.intel.com>
    > Reviewed-by: Tony Luck <tony.luck@intel.com>
    > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    > Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>

    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

    \
     
     \ /
      Last update: 2022-03-17 12:32    [W:4.262 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site