]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Refactor yield safe root iterator
authorBen Gardon <bgardon@google.com>
Thu, 1 Apr 2021 23:37:28 +0000 (16:37 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 19 Apr 2021 13:05:24 +0000 (09:05 -0400)
commit24946934b7492d14a65d23371dc52eb770ac86c3
tree73889cddaca2d8136fb590f85a458ca527632ba4
parent0b094185065c59ce049aff8c302cbd9d5feb94b0
KVM: x86/mmu: Refactor yield safe root iterator

Refactor the yield safe TDP MMU root iterator to be more amenable to
changes in future commits which will allow it to be used under the MMU
lock in read mode. Currently the iterator requires a complicated dance
between the helper functions and different parts of the for loop which
makes it hard to reason about. Moving all the logic into a single function
simplifies the iterator substantially.

Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210401233736.638171-6-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c