• Paolo Bonzini's avatar
    KVM: nVMX: fixes to nested virt interrupt injection · b96fb439
    Paolo Bonzini authored
    There are three issues in nested_vmx_check_exception:
    
    1) it is not taking PFEC_MATCH/PFEC_MASK into account, as reported
    by Wanpeng Li;
    
    2) it should rebuild the interruption info and exit qualification fields
    from scratch, as reported by Jim Mattson, because the values from the
    L2->L0 vmexit may be invalid (e.g. if an emulated instruction causes
    a page fault, the EPT misconfig's exit qualification is incorrect).
    
    3) CR2 and DR6 should not be written for exception intercept vmexits
    (CR2 only for AMD).
    
    This patch fixes the first two and adds a comment about the last,
    outlining the fix.
    
    Cc: Jim Mattson <jmattson@google.com>
    Cc: Wanpeng Li <wanpeng.li@hotmail.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    b96fb439
vmx.c 334 KB