public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Nina Schoetterl-Glausch <nsg@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, Sven Schnelle <svens@linux.ibm.com>
Subject: Re: [PATCH] s390/kvm/vsie: Use virt_to_phys for crypto control block
Date: Mon, 29 Apr 2024 20:32:43 +0200	[thread overview]
Message-ID: <2f046603-ae89-4ad2-95df-8e187501e06d@linux.ibm.com> (raw)
In-Reply-To: <20240429171512.879215-1-nsg@linux.ibm.com>

Am 29.04.24 um 19:15 schrieb Nina Schoetterl-Glausch:
> The address of the crypto control block in the (shadow) SIE block is
> absolute/physical.
> Convert from virtual to physical when shadowing the guest's control
> block during VSIE.
> 
> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>

vsie_page was created with page_to_virt to this make sense to translated back here.

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>

I guess this should go via the s390 with the other virt/phys changes.

> ---
>   arch/s390/kvm/vsie.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index b2c9f010f0fe..24defeada00c 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -361,7 +361,7 @@ static int shadow_crycb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
>   	case -EACCES:
>   		return set_validity_icpt(scb_s, 0x003CU);
>   	}
> -	scb_s->crycbd = ((__u32)(__u64) &vsie_page->crycb) | CRYCB_FORMAT2;
> +	scb_s->crycbd = (u32)virt_to_phys(&vsie_page->crycb) | CRYCB_FORMAT2;
>   	return 0;
>   }

  parent reply	other threads:[~2024-04-29 18:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 17:15 [PATCH] s390/kvm/vsie: Use virt_to_phys for crypto control block Nina Schoetterl-Glausch
2024-04-29 17:18 ` Alexander Gordeev
2024-04-29 18:32 ` Christian Borntraeger [this message]
2024-04-29 19:35   ` Alexander Gordeev

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=2f046603-ae89-4ad2-95df-8e187501e06d@linux.ibm.com \
    --to=borntraeger@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nsg@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    /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