lkml.org 
[lkml]   [2024]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v19 111/130] KVM: TDX: Implement callbacks for MSR operations for TDX
    From


    On 2/26/2024 4:26 PM, isaku.yamahata@intel.com wrote:
    > From: Isaku Yamahata <isaku.yamahata@intel.com>
    >
    > Implements set_msr/get_msr/has_emulated_msr methods for TDX to handle
    > hypercall from guest TD for paravirtualized rdmsr and wrmsr. The TDX
    > module virtualizes MSRs. For some MSRs, it injects #VE to the guest TD
    > upon RDMSR or WRMSR. The exact list of such MSRs are defined in the spec.
    >
    > Upon #VE, the guest TD may execute hypercalls,
    > TDG.VP.VMCALL<INSTRUCTION.RDMSR> and TDG.VP.VMCALL<INSTRUCTION.WRMSR>,
    > which are defined in GHCI (Guest-Host Communication Interface) so that the
    > host VMM (e.g. KVM) can virtualize the MSRs.
    >
    > There are three classes of MSRs virtualization.
    > - non-configurable: TDX module directly virtualizes it. VMM can't
    > configure. the value set by KVM_SET_MSR_INDEX_LIST is ignored.

    There is no KVM_SET_MSR_INDEX_LIST in current kvm code.
    Do you mean KVM_SET_MSRS?

    > - configurable: TDX module directly virtualizes it. VMM can configure at
    > the VM creation time. The value set by KVM_SET_MSR_INDEX_LIST is used.
    > - #VE case
    > Guest TD would issue TDG.VP.VMCALL<INSTRUCTION.{WRMSR,RDMSR> and
    > VMM handles the MSR hypercall. The value set by KVM_SET_MSR_INDEX_LIST
    > is used.
    >

    \
     
     \ /
      Last update: 2024-05-27 16:45    [W:2.812 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site