[PATCH v2 1/3] KVM: Fix kvm_vcpu_map[_readonly]() function prototypes
Yosry Ahmed
yosry at kernel.org
Wed Apr 22 09:05:32 AEST 2026
On Tue, Apr 07, 2026 at 05:11:28PM -0700, Peter Fang wrote:
> kvm_vcpu_map() and kvm_vcpu_map_readonly() should take a gfn instead of
> a gpa. This appears to be a result of the original kvm_vcpu_map() being
> declared with the wrong function prototype in kvm_host.h, even though
> it was correct in the actual implementation in kvm_main.c.
>
> No actual harm has been done yet as all of the call sites are correctly
> passing in a gfn. Plus, both gfn_t and gpa_t are typedef'd to u64 so
> this change shouldn't have any functional impact.
>
> Compile-tested on x86 and ppc, which are the current users of these
> interfaces.
>
> Fixes: e45adf665a53 ("KVM: Introduce a new guest mapping API")
> Cc: KarimAllah Ahmed <karahmed at amazon.de>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com>
> Signed-off-by: Peter Fang <peter.fang at intel.com>
> ---
Reviewed-by: Yosry Ahmed <yosry at kernel.org>
More information about the Linuxppc-dev
mailing list