s390/kvm/vsie: Use virt_to_phys for crypto control block
PATCH 1/1 s390/kvm/vsie: Use virt_to_phys for crypto control block
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.
--- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kvm/vsie.c +1 -1
@@ -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
Signature · 1 line
2.40.1
Quoted 9 lines · 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 <[email protected]>--- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Please apply and push to devel, preferably using the following commands:
# b390 shazam -t <message-id> # git push <repository> devel
Am 29.04.24 um 19:15 schrieb Nina Schoetterl-Glausch:
Quoted 6 lines
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 <[email protected]>
vsie_page was created with page_to_virt to this make sense to translated back here.
I guess this should go via the s390 with the other virt/phys changes.
Quoted 16 lines
--- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/s390/kvm/vsie.c +1
-1@@ -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 ; }
Alexander Gordeev
maintainerQuoted 1 line · Christian Borntraeger
I guess this should go via the s390 with the other
virt/physchanges.
Yes, I will pick it.
Thanks!