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

    > $Subject: KVM: x86: Add a helper function to restore 4 host MSRs on exit to user space

    Which user space are you talking about? This subject line is misleading
    at best. The unconditional reset is happening when a TDX VM exits
    because the SEAM firmware enforces this to prevent unformation leaks.

    It also does not matter whether this are four or ten MSR. Fact is that
    the SEAM firmware is buggy because it does not save/restore those MSRs.

    So the proper subject line is:

    KVM: x86: Add infrastructure to handle MSR corruption by broken TDX firmware

    > The TDX module unconditionally reset 4 host MSRs (MSR_SYSCALL_MASK,
    > MSR_START, MSR_LSTAR, MSR_TSC_AUX) to architectural INIT state on exit from
    > TDX VM to KVM. KVM needs to save their values before TD enter and restore
    > them on exit to userspace.
    >
    > Reuse current kvm_user_return mechanism and introduce a function to update
    > cached values and register the user return notifier in this new function.
    >
    > The later patch will use the helper function to save/restore 4 host
    > MSRs.

    'The later patch ...' is useless information. Of course there will be a
    later patch to make use of this which is implied by 'Add infrastructure
    ...'. Can we please get rid of these useless phrases which have no value
    at patch submission time and are even more confusing once the pile is
    merged?

    Thanks,

    tglx

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