diff options
author | Pierre Morel <[email protected]> | 2019-02-11 10:20:49 +0100 |
---|---|---|
committer | Christian Borntraeger <[email protected]> | 2019-02-11 13:19:20 +0100 |
commit | b10bd9a256aec504c14a7c9b6fccb6301ecf290a (patch) | |
tree | ca2c0bbc5b1750d152e64314ecc46e47142a1aa7 | |
parent | bfeffd155283772bbe78c6a05dec7c0128ee500c (diff) |
s390: vsie: Use effective CRYCBD.31 to check CRYCBD validity
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
host.
Fixes: 6ee74098201b ("KVM: s390: vsie: allow CRYCB FORMAT-0")
Cc: [email protected]
Signed-off-by: Pierre Morel <[email protected]>
Reported-by: Claudio Imbrenda <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Acked-by: Cornelia Huck <[email protected]>
Reviewed-by: Christian Borntraeger <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
-rw-r--r-- | arch/s390/kvm/vsie.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index a153257bf7d9..d62fa148558b 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -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) |