Re: [PATCH 06/12] KVM: MMU: rename kvm_mmu_reload

From: Paolo Bonzini
Date: Fri Feb 11 2022 - 11:52:47 EST


On 2/11/22 17:16, Sean Christopherson wrote:
The other nuance that I want to avoid is the implication that KVM is checking for
a valid root because it doesn't trust what has happened before, i.e. that the call
is there as a safeguard. That's misleading for the most common path, vcpu_enter_guest(),
because when the helper does do some work, it's usually because KVM deliberately
invalidated the root.

Fair enough.

I also thought of "establish_valid_root", but it has the opposite
problem---it does not convey well, if at all, that the root could be valid
already.

Heh, I agree that "establish" would imply the root is always invalid, but amusingly
"establish" is listed as a synonym for "ensure" on the few sites of checked. Yay English.

Well, synonyms rarely have a perfectly matching meaning.

Can we put this on the backburner for now?

Yes, of course.

Paolo

IMO, KVM_REQ_MMU_RELOAD is far more
misleading than kvm_mmu_reload(), and I posted a series to remedy that (though I
need to check if it's still viable since you vetoed adding the check for a pending
request in the page fault handler).

https://lore.kernel.org/all/20211209060552.2956723-1-seanjc@xxxxxxxxxx