[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251118151818.9674C62-hca@linux.ibm.com>
Date: Tue, 18 Nov 2025 16:18:18 +0100
From: Heiko Carstens <hca@...ux.ibm.com>
To: Claudio Imbrenda <imbrenda@...ux.ibm.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org, borntraeger@...ibm.com,
frankja@...ux.ibm.com, nsg@...ux.ibm.com, nrb@...ux.ibm.com,
seiden@...ux.ibm.com, schlameuss@...ux.ibm.com, svens@...ux.ibm.com,
agordeev@...ux.ibm.com, gor@...ux.ibm.com, david@...hat.com,
gerald.schaefer@...ux.ibm.com
Subject: Re: [PATCH v3 18/23] KVM: s390: Switch to new gmap
On Thu, Nov 06, 2025 at 05:11:12PM +0100, Claudio Imbrenda wrote:
> Switch KVM/s390 to use the new gmap code.
>
> Remove includes to <gmap.h> and include "gmap.h" instead; fix all the
> existing users of the old gmap functions to use the new ones instead.
>
> Signed-off-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>
> ---
> arch/s390/Kconfig | 2 +-
> arch/s390/include/asm/kvm_host.h | 5 +-
> arch/s390/include/asm/mmu_context.h | 4 -
> arch/s390/include/asm/tlb.h | 3 -
> arch/s390/kvm/Makefile | 2 +-
> arch/s390/kvm/diag.c | 2 +-
> arch/s390/kvm/gaccess.c | 552 +++++++++++----------
> arch/s390/kvm/gaccess.h | 16 +-
> arch/s390/kvm/gmap-vsie.c | 141 ------
> arch/s390/kvm/gmap.c | 6 +-
> arch/s390/kvm/intercept.c | 15 +-
> arch/s390/kvm/interrupt.c | 2 +-
> arch/s390/kvm/kvm-s390.c | 727 ++++++++--------------------
> arch/s390/kvm/kvm-s390.h | 20 +-
> arch/s390/kvm/priv.c | 207 +++-----
> arch/s390/kvm/pv.c | 64 +--
> arch/s390/kvm/vsie.c | 117 +++--
> arch/s390/mm/gmap_helpers.c | 29 --
> 18 files changed, 710 insertions(+), 1204 deletions(-)
> delete mode 100644 arch/s390/kvm/gmap-vsie.c
...
> +static int _gaccess_do_shadow(struct kvm_s390_mmu_cache *mc, struct gmap *sg,
> + unsigned long saddr, struct pgtwalk *w)
> +{
...
> + /*
> + * Skip levels that are already protected. For each level, protect
> + * only the page containing the entry, not the whole table.
> + */
> + for (i = gl ; i > w->level; i--)
> + gmap_protect_rmap(mc, sg, entries[i - 1].gfn, gpa_to_gfn(saddr),
> + entries[i - 1].pfn, i, entries[i - 1].writable);
> +
Why is it ok to ignore the potential -ENOMEM return value of
gmap_protect_rmap()?
Powered by blists - more mailing lists