]> git.baikalelectronics.ru Git - kernel.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)
commit672742dbef5af8c44f27e03bb547aefb0191d409
treec8dc18cda40d54f220da00fb48ab7444caaf85dc
parent77c3fbae8595bfbba2e6341372cda70df631cd8b
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