lkml.org 
[lkml]   [2021]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC PATCH v3 53/59] KVM: x86: Add a helper function to restore 4 host MSRs on exit to user space
    On Tue, Nov 30, 2021 at 4:10 PM Chao Gao <chao.gao@intel.com> wrote:

    >
    > No, it is already documented in public spec.

    In intel-tdx-module-1.5-base-spec-348549001.pdf, page 79
    "recoverability hist", I think it is a "hint".

    >
    > TDX module spec just says some MSRs are reset to INIT state by TDX module
    > (un)conditionally during TD exit. When to restore these MSRs to host's
    > values is decided by host.
    >


    Sigh, it is quite a common solution to reset a register to a default
    value here, for example in VMX, the host GDT.limit and host TSS.limit
    is reset after VMEXIT, so load_fixmap_gdt() and invalidate_tss_limit()
    have to be called in host in vmx_vcpu_put().

    Off-topic: Is it a good idea to also put load_fixmap_gdt() and
    invalidate_tss_limit() in user-return-notfier?

    \
     
     \ /
      Last update: 2021-11-30 12:19    [W:5.005 / U:0.152 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site