• Maxim Levitsky's avatar
    KVM: x86: nSVM: implement nested vGIF · 0b349662
    Maxim Levitsky authored
    In case L1 enables vGIF for L2, the L2 cannot affect L1's GIF, regardless
    of STGI/CLGI intercepts, and since VM entry enables GIF, this means
    that L1's GIF is always 1 while L2 is running.
    
    Thus in this case leave L1's vGIF in vmcb01, while letting L2
    control the vGIF thus implementing nested vGIF.
    
    Also allow KVM to toggle L1's GIF during nested entry/exit
    by always using vmcb01.
    Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Message-Id: <20220322174050.241850-5-mlevitsk@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    0b349662
nested.c 46.1 KB