Re: [PATCH 08/12] KVM: x86: save/load state on SMM switch
From: Paolo Bonzini
Date: Thu May 21 2015 - 12:23:42 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/