kvm: mmu: Separate making non-leaf sptes from link_shadow_page
authorBen Gardon <bgardon@google.com>
Fri, 25 Sep 2020 21:22:48 +0000 (14:22 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 21 Oct 2020 22:16:58 +0000 (18:16 -0400)
commitcc4674d0ded069c1673fd6fec94a18e436828195
tree6be5e66ae93b96ba81d12a217a4609c8cd3dfdfb
parentc0623f5e5d21d65d08f6276ca4e64d470c833761
kvm: mmu: Separate making non-leaf sptes from link_shadow_page

The TDP MMU page fault handler will need to be able to create non-leaf
SPTEs to build up the paging structures. Rather than re-implementing the
function, factor the SPTE creation out of link_shadow_page.

Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell
machine. This series introduced no new failures.

This series can be viewed in Gerrit at:
https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538

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