public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [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

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