KVM: MMU: pass struct kvm_page_fault to mmu_set_spte
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 17 Aug 2021 11:49:47 +0000 (07:49 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Oct 2021 07:44:56 +0000 (03:44 -0400)
commita12f43818b3f8f2d85b961493ff134c19ffcd05b
treee6e40c1998f5bf747e44e053deebdc526f0e86cf
parent7158bee4b47519430f3ccad7cffea578533f364e
KVM: MMU: pass struct kvm_page_fault to mmu_set_spte

mmu_set_spte is called for either PTE prefetching or page faults.  The
three boolean arguments write_fault, speculative and host_writable are
always respectively false/true/true for prefetching and coming from
a struct kvm_page_fault for page faults.

Let mmu_set_spte distinguish these two situation by accepting a
possibly NULL struct kvm_page_fault argument.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/paging_tmpl.h