]> www.infradead.org Git - users/willy/xarray.git/commit
KVM: VMX: Clean up PI pre/post-block WARNs
authorSean Christopherson <seanjc@google.com>
Wed, 8 Dec 2021 01:52:13 +0000 (01:52 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Dec 2021 14:30:47 +0000 (09:30 -0500)
commit45af1bb99b72e36c16714390a8a3c9445e432938
treec8dc18cda40d54f220da00fb48ab7444caaf85dc
parent83c98007d9fb5c827cd954fc48e9cba034ef6fdc
KVM: VMX: Clean up PI pre/post-block WARNs

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: Sean Christopherson <seanjc@google.com>
Message-Id: <20211208015236.1616697-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/posted_intr.c