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 kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html