lkml.org 
[lkml]   [2022]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v3 0/3] x86/crash: Fix double NMI shootdown bug
    Date
    On 14/11/2022 23:34, Sean Christopherson wrote:
    > Tom,
    >
    > I Cc'd you this time around because the APM doesn't explicitly state that
    > GIF is set when EFER.SVME is disabled. KVM's nSVM emulation does set GIF
    > in this case, but it's not clear whether or not KVM is making up behavior.
    > If clearing EFER.SVME doesn't set GIF, then patch 1 needs to be modified
    > to try STGI before clearing EFER.SVME, e.g. if a crash is initiated from
    > KVM between CLGI and STGI. Responding CPUs are "safe" because GIF=0 also
    > blocks NMIs, but the initiating CPU might leave GIF=0 when jumping into
    > the new kernel.

    GIF exists independently of EFER.SVME.

    It is also gets set by the SKINIT instruction, which is why there is an
    asymmetry on the #UD conditions of STGI and CLGI.

    STGI is also intended to be used by the DLME once critical
    initialisation is done, hence why it's dependent on EFER.SVME || SKINIT.

    ~Andrew
    \
     
     \ /
      Last update: 2022-11-15 01:32    [W:3.747 / U:0.192 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site