[PATCH v7 3/4] KVM: arm64: Tweak parameters of guest cache maintenance functions

Marc Zyngier maz at kernel.org
Fri Jun 18 04:30:35 PDT 2021


On Thu, 17 Jun 2021 11:58:23 +0100,
Yanan Wang <wangyanan55 at huawei.com> wrote:
> 
> Adjust the parameter "kvm_pfn_t pfn" of __clean_dcache_guest_page
> and __invalidate_icache_guest_page to "void *va", which paves the
> way for converting these two guest CMO functions into callbacks in
> structure kvm_pgtable_mm_ops. No functional change.
> 
> Signed-off-by: Yanan Wang <wangyanan55 at huawei.com>
> ---
>  arch/arm64/include/asm/kvm_mmu.h |  9 ++-------
>  arch/arm64/kvm/mmu.c             | 28 +++++++++++++++-------------
>  2 files changed, 17 insertions(+), 20 deletions(-)
>

[...]

> @@ -1219,7 +1221,7 @@ bool kvm_set_spte_gfn(struct kvm *kvm, struct kvm_gfn_range *range)
>  	 * We've moved a page around, probably through CoW, so let's treat it
>  	 * just like a translation fault and clean the cache to the PoC.
>  	 */
> -	clean_dcache_guest_page(pfn, PAGE_SIZE);
> +	clean_dcache_guest_page(page_address(pfn_to_page(pfn), PAGE_SIZE);

This obviously doesn't compile. I have fixed it locally, but in the
future please make sure that patch series can be bisected correctly.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list