From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
borntraeger@linux.ibm.com, akrowiak@linux.ibm.com
Subject: Re: [RFC 09/10] KVM: s390: Use gpa_t in pv.c
Date: Wed, 18 Mar 2026 16:46:02 +0100 [thread overview]
Message-ID: <20260318164602.2b7fce6d@p-imbrenda> (raw)
In-Reply-To: <20260316180310.17765-10-frankja@linux.ibm.com>
On Mon, 16 Mar 2026 16:23:56 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:
> Lot's of locations where we could've used gpa_t but used u64/unsigned
> long.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
> arch/s390/kvm/kvm-s390.h | 8 ++++----
> arch/s390/kvm/pv.c | 12 ++++++------
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
> index bf1d7798c1af..1ffaec723a30 100644
> --- a/arch/s390/kvm/kvm-s390.h
> +++ b/arch/s390/kvm/kvm-s390.h
> @@ -308,17 +308,17 @@ int kvm_s390_pv_deinit_vm(struct kvm *kvm, u16 *rc, u16 *rrc);
> int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc);
> int kvm_s390_pv_set_sec_parms(struct kvm *kvm, void *hdr, u64 length, u16 *rc,
> u16 *rrc);
> -int kvm_s390_pv_unpack(struct kvm *kvm, unsigned long addr, unsigned long size,
> +int kvm_s390_pv_unpack(struct kvm *kvm, gpa_t addr, unsigned long size,
> unsigned long tweak, u16 *rc, u16 *rrc);
> int kvm_s390_pv_set_cpu_state(struct kvm_vcpu *vcpu, u8 state);
> int kvm_s390_pv_dump_cpu(struct kvm_vcpu *vcpu, void *buff, u16 *rc, u16 *rrc);
> int kvm_s390_pv_dump_stor_state(struct kvm *kvm, void __user *buff_user,
> - u64 *gaddr, u64 buff_user_len, u16 *rc, u16 *rrc);
> + gpa_t *gaddr, u64 buff_user_len, u16 *rc, u16 *rrc);
> int kvm_s390_pv_dump_complete(struct kvm *kvm, void __user *buff_user,
> u16 *rc, u16 *rrc);
> int kvm_s390_pv_destroy_page(struct kvm *kvm, unsigned long gaddr);
> -int kvm_s390_pv_convert_to_secure(struct kvm *kvm, unsigned long gaddr);
> -int kvm_s390_pv_make_secure(struct kvm *kvm, unsigned long gaddr, void *uvcb);
> +int kvm_s390_pv_convert_to_secure(struct kvm *kvm, gpa_t gaddr);
> +int kvm_s390_pv_make_secure(struct kvm *kvm, gpa_t gaddr, void *uvcb);
>
> static inline u64 kvm_s390_pv_get_handle(struct kvm *kvm)
> {
> diff --git a/arch/s390/kvm/pv.c b/arch/s390/kvm/pv.c
> index c2dafd812a3b..a86469507309 100644
> --- a/arch/s390/kvm/pv.c
> +++ b/arch/s390/kvm/pv.c
> @@ -125,7 +125,7 @@ static void _kvm_s390_pv_make_secure(struct guest_fault *f)
> * Context: needs to be called with kvm->srcu held.
> * Return: 0 on success, < 0 in case of error.
> */
> -int kvm_s390_pv_make_secure(struct kvm *kvm, unsigned long gaddr, void *uvcb)
> +int kvm_s390_pv_make_secure(struct kvm *kvm, gpa_t gaddr, void *uvcb)
> {
> struct pv_make_secure priv = { .uvcb = uvcb };
> struct guest_fault f = {
> @@ -157,7 +157,7 @@ int kvm_s390_pv_make_secure(struct kvm *kvm, unsigned long gaddr, void *uvcb)
> return rc;
> }
>
> -int kvm_s390_pv_convert_to_secure(struct kvm *kvm, unsigned long gaddr)
> +int kvm_s390_pv_convert_to_secure(struct kvm *kvm, gpa_t gaddr)
> {
> struct uv_cb_cts uvcb = {
> .header.cmd = UVC_CMD_CONV_TO_SEC_STOR,
> @@ -765,7 +765,7 @@ int kvm_s390_pv_set_sec_parms(struct kvm *kvm, void *hdr, u64 length, u16 *rc,
> return cc ? -EINVAL : 0;
> }
>
> -static int unpack_one(struct kvm *kvm, unsigned long addr, u64 tweak,
> +static int unpack_one(struct kvm *kvm, gpa_t addr, u64 tweak,
> u64 offset, u16 *rc, u16 *rrc)
> {
> struct uv_cb_unp uvcb = {
> @@ -793,7 +793,7 @@ static int unpack_one(struct kvm *kvm, unsigned long addr, u64 tweak,
> return ret;
> }
>
> -int kvm_s390_pv_unpack(struct kvm *kvm, unsigned long addr, unsigned long size,
> +int kvm_s390_pv_unpack(struct kvm *kvm, gpa_t addr, unsigned long size,
> unsigned long tweak, u16 *rc, u16 *rrc)
> {
> u64 offset = 0;
> @@ -802,7 +802,7 @@ int kvm_s390_pv_unpack(struct kvm *kvm, unsigned long addr, unsigned long size,
> if (addr & ~PAGE_MASK || !size || size & ~PAGE_MASK)
> return -EINVAL;
>
> - KVM_UV_EVENT(kvm, 3, "PROTVIRT VM UNPACK: start addr %lx size %lx",
> + KVM_UV_EVENT(kvm, 3, "PROTVIRT VM UNPACK: start addr %llx size %lx",
> addr, size);
>
> guard(srcu)(&kvm->srcu);
> @@ -891,7 +891,7 @@ int kvm_s390_pv_dump_cpu(struct kvm_vcpu *vcpu, void *buff, u16 *rc, u16 *rrc)
> * -EFAULT if copying the result to buff_user failed
> */
> int kvm_s390_pv_dump_stor_state(struct kvm *kvm, void __user *buff_user,
> - u64 *gaddr, u64 buff_user_len, u16 *rc, u16 *rrc)
> + gpa_t *gaddr, u64 buff_user_len, u16 *rc, u16 *rrc)
> {
> struct uv_cb_dump_stor_state uvcb = {
> .header.cmd = UVC_CMD_DUMP_CONF_STOR_STATE,
next prev parent reply other threads:[~2026-03-18 15:46 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 16:23 [RFC 00/10] KVM: s390: spring cleanup Janosch Frank
2026-03-16 16:23 ` [RFC 01/10] KVM: s390: diag258: Pass absolute address to kvm_is_gpa_in_memslot() Janosch Frank
2026-03-16 18:34 ` Christian Borntraeger
2026-03-17 10:01 ` Christoph Schlameuss
2026-03-18 16:04 ` Claudio Imbrenda
2026-03-16 16:23 ` [RFC 02/10] KVM: s390: Consolidate lpswe variants Janosch Frank
2026-03-16 18:47 ` Christian Borntraeger
2026-03-17 8:13 ` Janosch Frank
2026-03-17 13:03 ` [PATCH] KVM: s390: Fix lpsw/e breaking event handling Janosch Frank
2026-03-17 13:30 ` Christian Borntraeger
2026-03-23 15:08 ` Hendrik Brueckner
2026-03-16 16:23 ` [RFC 03/10] KVM: s390: Convert shifts to gpa_to_gfn() Janosch Frank
2026-03-16 18:49 ` Christian Borntraeger
2026-03-17 10:38 ` Christoph Schlameuss
2026-03-18 14:26 ` Claudio Imbrenda
2026-03-16 16:23 ` [RFC 04/10] KVM: s390: kvm_s390_real_to_abs() should return gpa_t Janosch Frank
2026-03-16 18:53 ` Christian Borntraeger
2026-03-18 7:10 ` Christoph Schlameuss
2026-03-18 14:29 ` Claudio Imbrenda
2026-03-16 16:23 ` [RFC 05/10] KVM: s390: vsie: Cleanup and fixup of crycb handling Janosch Frank
2026-03-18 14:13 ` Christoph Schlameuss
2026-03-18 16:48 ` Claudio Imbrenda
2026-03-20 12:01 ` Anthony Krowiak
2026-03-23 15:54 ` Janosch Frank
2026-03-16 16:23 ` [RFC 06/10] KVM: s390: Rework lowcore access functions Janosch Frank
2026-03-18 14:25 ` Claudio Imbrenda
2026-03-23 9:11 ` Christoph Schlameuss
2026-03-16 16:23 ` [RFC 07/10] KVM: s390: Use gpa_t and gva_t in gaccess files Janosch Frank
2026-03-18 15:36 ` Claudio Imbrenda
2026-03-23 9:10 ` Christoph Schlameuss
2026-03-16 16:23 ` [RFC 08/10] KVM: s390: Use gpa_t in priv.c Janosch Frank
2026-03-18 16:02 ` Claudio Imbrenda
2026-03-30 14:53 ` Janosch Frank
2026-03-23 9:28 ` Christoph Schlameuss
2026-03-16 16:23 ` [RFC 09/10] KVM: s390: Use gpa_t in pv.c Janosch Frank
2026-03-18 15:46 ` Claudio Imbrenda [this message]
2026-03-23 9:41 ` Christoph Schlameuss
2026-03-30 14:36 ` Janosch Frank
2026-03-16 16:23 ` [RFC 10/10] KVM: s390: Cleanup kvm_s390_store_status_unloaded Janosch Frank
2026-03-18 15:51 ` Claudio Imbrenda
2026-03-23 9:47 ` Christoph Schlameuss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260318164602.2b7fce6d@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox