bool make_spte(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,I'd prefer a different name since `sptep` has specific meaning
struct kvm_memory_slot *slot,
unsigned int pte_access, gfn_t gfn, kvm_pfn_t pfn,
- u64 old_spte, bool speculative, bool can_unsync,
- bool host_writable, u64 *new_spte)
+ bool speculative, bool can_unsync,
+ bool host_writable, u64 *sptep)
throughout the mmu code. (It's the address of the spte in the page
table.)
Case in point, I was going to suggest we can get rid of struct
kvm_mmu_page since it can be derived from the sptep and then realized
how wrong that was:).
Instead of receiving the new spte as a parameter what do you think about
changing make_spte to return the new spte? I think that would make the
code more readable (but won't reduce the number of arguments because
you'd have to add wrprot).