• Vitaly Kuznetsov's avatar
    KVM: x86: hyper-v: L2 TLB flush · c58a318f
    Vitaly Kuznetsov authored
    Handle L2 TLB flush requests by going through all vCPUs and checking
    whether there are vCPUs running the same VM_ID with a VP_ID specified
    in the requests. Perform synthetic exit to L2 upon finish.
    
    Note, while checking VM_ID/VP_ID of running vCPUs seem to be a bit
    racy, we count on the fact that KVM flushes the whole L2 VPID upon
    transition. Also, KVM_REQ_HV_TLB_FLUSH request needs to be done upon
    transition between L1 and L2 to make sure all pending requests are
    always processed.
    
    For the reference, Hyper-V TLFS refers to the feature as "Direct
    Virtual Flush".
    
    Note, nVMX/nSVM code does not handle VMCALL/VMMCALL from L2 yet.
    Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
    Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-Id: <20221101145426.251680-24-vkuznets@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c58a318f
trace.h 44.1 KB