]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: change TDP MMU yield function returns to match cond_resched
authorBen Gardon <bgardon@google.com>
Tue, 2 Feb 2021 18:57:07 +0000 (10:57 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:38 +0000 (05:27 -0500)
commit311e08c5e0fb166b04bba7454883a553b3f39c18
tree08388c88f6387ff020fd70f810227a856fc8cdd6
parenta6b1703b9f5d98377ecdc31aae1cf02f27deece1
KVM: x86/mmu: change TDP MMU yield function returns to match cond_resched

Currently the TDP MMU yield / cond_resched functions either return
nothing or return true if the TLBs were not flushed. These are confusing
semantics, especially when making control flow decisions in calling
functions.

To clean things up, change both functions to have the same
return value semantics as cond_resched: true if the thread yielded,
false if it did not. If the function yielded in the _flush_ version,
then the TLBs will have been flushed.

Reviewed-by: Peter Feiner <pfeiner@google.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210202185734.1680553-2-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c