Re: [PATCH v2 06/15] KVM: s390: use __kvm_faultin_pfn()

Janosch Frank
2025-01-17T16:20:54Z

On 1/16/25 12:33 PM, Claudio Imbrenda wrote:
> Refactor the existing page fault handling code to use __kvm_faultin_pfn().
>
> This possible now that memslots are always present.
>
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
> arch/s390/kvm/kvm-s390.c | 122 ++++++++++++++++++++++++++++++---------
> arch/s390/kvm/kvm-s390.h | 6 ++
> arch/s390/mm/gmap.c | 1 +
> 3 files changed, 102 insertions(+), 27 deletions(-)
>
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index c9496d23470c..7608cffb805f 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -4784,11 +4784,102 @@ static void kvm_s390_assert_primary_as(struct kvm_vcpu *vcpu)
> current->thread.gmap_int_code, current->thread.gmap_teid.val);
> }
>
> +/*
> + * __kvm_s390_handle_dat_fault() - handle a dat fault for the gmap of a vcpu
> + * @vcpu: the vCPU whose gmap is to be fixed up
> + * @gfn: the guest frame number used for memslots (including fake memslots)
> + * @gaddr: the gmap address, does not have to match @gfn for ucontrol gmaps
> + * @flags: FOLL_* flags
> + *
> + * Return: 0 on success, < 0 in case or error.

s/or/of/

With nit fixed:
Acked-by: Janosch Frank <frankja@linux.ibm.com>