On Tue, 2026-04-07 at 17:11 -0700, Peter Fang wrote:
> kvm_vcpu_map() and kvm_vcpu_map_readonly() are declared to take a gpa_t
> in kvm_host.h when they're supposed to take a gfn_t. First fix the
> function prototypes, and then refactor them to correctly take a gpa_t,
> reducing boilerplate gpa->gfn conversions at all call sites.
> 
> No actual harm has been done yet as all of the call sites are correctly
> passing in a gfn.
> 
> No functional change intended. All changes are compile-tested on x86 and
> ppc, which are the current users of these APIs.

Fred is already removing all the usage of kvm_vcpu_map() in nested VMX¹
and nested SVM probably wants the same treatment. And the PowerPC one
looks like it could just as easily operate on the userspace address? 

Could we just kill kvm_vcpu_map() completely?



¹ https://lore.kernel.org/kvm/[email protected]/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to