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(-)
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
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 <[email protected]>
vsie_page was created with page_to_virt to this make sense to translated back here.
Reviewed-by: Christian Borntraeger <[email protected]>
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;
> }
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!