]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86/mmu: change TDP MMU yield function returns to match cond_resched
authorBen Gardon <bgardon@google.com>
Sat, 10 Apr 2021 15:12:21 +0000 (11:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:47:15 +0000 (08:47 +0200)
commit15e48657332753dfed71e26c7f1fda703fdda4cc
treeba5de048688e57a2a5c630b29096bf66559903a0
parentc4b292e00319908c8fe4e56743f50d019ff3e482
KVM: x86/mmu: change TDP MMU yield function returns to match cond_resched

[ Upstream commit e28a436ca4f65384cceaf3f4da0e00aa74244e6a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/mmu/tdp_mmu.c