diff options
author | Guenther Hutzl <hutzl@linux.vnet.ibm.com> | 2015-02-18 11:13:03 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2015-05-08 15:51:14 +0200 |
commit | 53df84f8de312586e1c05a8f496f614ca814eeff (patch) | |
tree | 250f5611fa0eda500c4f314f911f604ff4718151 /arch/s390/kvm/priv.c | |
parent | a4a4f1916abbbc3148d79a37cf3fe4f3f6c604d9 (diff) | |
download | op-kernel-dev-53df84f8de312586e1c05a8f496f614ca814eeff.zip op-kernel-dev-53df84f8de312586e1c05a8f496f614ca814eeff.tar.gz |
KVM: s390: Enable guest EDAT2 support
1. Enable EDAT2 in the list of KVM facilities
2. Handle 2G frames in pfmf instruction
If we support EDAT2, we may enable handling of 2G frames if not in 24
bit mode.
3. Enable EDAT2 in sie_block
If the EDAT2 facility is available we enable GED2 mode control in the
sie_block.
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Guenther Hutzl <hutzl@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/priv.c')
-rw-r--r-- | arch/s390/kvm/priv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index d22d8ee..ad42422 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -698,10 +698,14 @@ static int handle_pfmf(struct kvm_vcpu *vcpu) case 0x00001000: end = (start + (1UL << 20)) & ~((1UL << 20) - 1); break; - /* We dont support EDAT2 case 0x00002000: + /* only support 2G frame size if EDAT2 is available and we are + not in 24-bit addressing mode */ + if (!test_kvm_facility(vcpu->kvm, 78) || + psw_bits(vcpu->arch.sie_block->gpsw).eaba == PSW_AMODE_24BIT) + return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); end = (start + (1UL << 31)) & ~((1UL << 31) - 1); - break;*/ + break; default: return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); } |