lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/12] KVM: x86: save/load state on SMM switch


On 21/05/2015 18:20, Radim Krčmář wrote:
> 2. NMI -> SMI -> IRET -> RSM -> NMI
> NMI is injected; I think it shouldn't be ... have you based this
> behavior on the 3rd paragraph of SDM 34.8 NMI HANDLING WHILE IN SMM
> ("A special case [...]")?

Yes.

> Why I think we should restore NMI mask on RSM:
> - It's consistent with SMI -> IRET -> NMI -> RSM -> NMI (where we,
> I think correctly, unmask NMIs)

Yes, we do.

> and the idea that SMM tries to be to
> transparent (but maybe they didn't care about retarded SMI handlers).

That's my reading of that paragraph of the manual. :)

> - APM 2:15.30.3 SMM_CTL MSR (C001_0116h)
> • ENTER—Bit 1. Enter SMM: map the SMRAM memory areas, record whether
> NMI was currently blocked and block further NMI and SMI interrupts.
> • EXIT—Bit 3. Exit SMM: unmap the SMRAM memory areas, restore the
> previous masking status of NMI and unconditionally reenable SMI.
>
> The MSR should mimic real SMM signals and does restore the NMI mask.

No idea... My implementation does restore the previous masking status,
but only if it was "unmasked".

Paolo


\
 
 \ /
  Last update: 2015-05-21 19:01    [W:1.367 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site