Commit af8159d9 authored by Pierre Morel's avatar Pierre Morel Committed by Greg Kroah-Hartman

s390: vsie: Use effective CRYCBD.31 to check CRYCBD validity

commit b10bd9a2 upstream.

When facility.76 MSAX3 is present for the guest we must issue a validity
interception if the CRYCBD is not valid.

The bit CRYCBD.31 is an effective field and tested at each guest level
and has for effect to mask the facility.76

It follows that if CRYCBD.31 is clear and AP is not in use  we do not
have to test the CRYCBD validatity even if facility.76 is present in the

Fixes: 6ee74098 ("KVM: s390: vsie: allow CRYCB FORMAT-0")
Cc: [email protected]
Signed-off-by: default avatarPierre Morel <[email protected]>
Reported-by: default avatarClaudio Imbrenda <[email protected]>
Acked-by: David Hildenbrand's avatarDavid Hildenbrand <[email protected]>
Acked-by: Cornelia Huck's avatarCornelia Huck <[email protected]>
Reviewed-by: default avatarChristian Borntraeger <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: default avatarChristian Borntraeger <[email protected]>
Signed-off-by: default avatarGreg Kroah-Hartman <[email protected]>
parent 31e48b91
......@@ -297,7 +297,7 @@ static int shadow_crycb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
scb_s->crycbd = 0;
apie_h = vcpu->arch.sie_block->eca & ECA_APIE;
if (!apie_h && !key_msk)
if (!apie_h && (!key_msk || fmt_o == CRYCB_FORMAT0))
return 0;
if (!crycb_addr)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment