• Sean Christopherson's avatar
    KVM: VMX: Clean up PI pre/post-block WARNs · 45af1bb9
    Sean Christopherson authored
    Move the WARN sanity checks out of the PI descriptor update loop so as
    not to spam the kernel log if the condition is violated and the update
    takes multiple attempts due to another writer.  This also eliminates a
    few extra uops from the retry path.
    
    Technically not checking every attempt could mean KVM will now fail to
    WARN in a scenario that would have failed before, but any such failure
    would be inherently racy as some other agent (CPU or device) would have
    to concurrent modify the PI descriptor.
    
    Add a helper to handle the actual write and more importantly to document
    why the write may need to be retried.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20211208015236.1616697-4-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    45af1bb9
posted_intr.c 9.81 KB