* [PATCH] s390/kvm/vsie: Use virt_to_phys for crypto control block
@ 2024-04-29 17:15 Nina Schoetterl-Glausch
2024-04-29 17:18 ` Alexander Gordeev
2024-04-29 18:32 ` Christian Borntraeger
0 siblings, 2 replies; 4+ messages in thread
From: Nina Schoetterl-Glausch @ 2024-04-29 17:15 UTC (permalink / raw)
To: Christian Borntraeger, Claudio Imbrenda, Janosch Frank,
Vasily Gorbik, Alexander Gordeev, Heiko Carstens
Cc: Nina Schoetterl-Glausch, David Hildenbrand, linux-s390,
linux-kernel, kvm, Sven Schnelle
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>
---
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;
}
base-commit: b947cc5bf6d793101135265352e205aeb30b54f0
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] s390/kvm/vsie: Use virt_to_phys for crypto control block
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
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Gordeev @ 2024-04-29 17:18 UTC (permalink / raw)
To: Nina Schoetterl-Glausch
Cc: Christian Borntraeger, Claudio Imbrenda, Janosch Frank,
Vasily Gorbik, Heiko Carstens, David Hildenbrand, linux-s390,
linux-kernel, kvm, Sven Schnelle
On Mon, Apr 29, 2024 at 07:15:12PM +0200, Nina Schoetterl-Glausch wrote:
> 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>
> ---
> arch/s390/kvm/vsie.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Please apply and push to devel, preferably using the following commands:
# b390 shazam -t <message-id>
# git push <repository> devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] s390/kvm/vsie: Use virt_to_phys for crypto control block
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
2024-04-29 19:35 ` Alexander Gordeev
1 sibling, 1 reply; 4+ messages in thread
From: Christian Borntraeger @ 2024-04-29 18:32 UTC (permalink / raw)
To: Nina Schoetterl-Glausch, Claudio Imbrenda, Janosch Frank,
Vasily Gorbik, Alexander Gordeev, Heiko Carstens
Cc: David Hildenbrand, linux-s390, linux-kernel, kvm, Sven Schnelle
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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] s390/kvm/vsie: Use virt_to_phys for crypto control block
2024-04-29 18:32 ` Christian Borntraeger
@ 2024-04-29 19:35 ` Alexander Gordeev
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Gordeev @ 2024-04-29 19:35 UTC (permalink / raw)
To: Christian Borntraeger
Cc: Nina Schoetterl-Glausch, Claudio Imbrenda, Janosch Frank,
Vasily Gorbik, Heiko Carstens, David Hildenbrand, linux-s390,
linux-kernel, kvm, Sven Schnelle
On Mon, Apr 29, 2024 at 08:32:43PM +0200, Christian Borntraeger wrote:
> I guess this should go via the s390 with the other virt/phys changes.
Yes, I will pick it.
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-29 19:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-04-29 19:35 ` Alexander Gordeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox