• Jan Beulich's avatar
    x86/xen: properly retrieve NMI reason · f221b04f
    Jan Beulich authored
    Using the native code here can't work properly, as the hypervisor would
    normally have cleared the two reason bits by the time Dom0 gets to see
    the NMI (if passed to it at all). There's a shared info field for this,
    and there's an existing hook to use - just fit the two together. This
    is particularly relevant so that NMIs intended to be handled by APEI /
    GHES actually make it to the respective handler.
    
    Note that the hook can (and should) be used irrespective of whether
    being in Dom0, as accessing port 0x61 in a DomU would be even worse,
    while the shared info field would just hold zero all the time. Note
    further that hardware NMI handling for PVH doesn't currently work
    anyway due to missing code in the hypervisor (but it is expected to
    work the native rather than the PV way).
    Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
    Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
    Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
    f221b04f
nmi.h 1.47 KB