vsie.c (fe722d13e3638470a7eef5dad6c9ded7f6653773) | vsie.c (730cd632c4e485b90f97fe998e300045da094938) |
---|---|
1/* 2 * kvm nested virtualization support for s390x 3 * 4 * Copyright IBM Corp. 2016 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License (version 2 only) 8 * as published by the Free Software Foundation. --- 103 unchanged lines hidden (view full) --- 112 newflags |= CPUSTAT_GED2; 113 } 114 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_GPERE)) 115 newflags |= cpuflags & CPUSTAT_P; 116 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_GSLS)) 117 newflags |= cpuflags & CPUSTAT_SM; 118 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_IBS)) 119 newflags |= cpuflags & CPUSTAT_IBS; | 1/* 2 * kvm nested virtualization support for s390x 3 * 4 * Copyright IBM Corp. 2016 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License (version 2 only) 8 * as published by the Free Software Foundation. --- 103 unchanged lines hidden (view full) --- 112 newflags |= CPUSTAT_GED2; 113 } 114 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_GPERE)) 115 newflags |= cpuflags & CPUSTAT_P; 116 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_GSLS)) 117 newflags |= cpuflags & CPUSTAT_SM; 118 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_IBS)) 119 newflags |= cpuflags & CPUSTAT_IBS; |
120 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_KSS)) 121 newflags |= cpuflags & CPUSTAT_KSS; |
|
120 121 atomic_set(&scb_s->cpuflags, newflags); 122 return 0; 123} 124 125/* 126 * Create a shadow copy of the crycb block and setup key wrapping, if 127 * requested for guest 3 and enabled for guest 2. --- 156 unchanged lines hidden (view full) --- 284 scb_s->lctl = scb_o->lctl; 285 scb_s->svcc = scb_o->svcc; 286 scb_s->ictl = scb_o->ictl; 287 /* 288 * SKEY handling functions can't deal with false setting of PTE invalid 289 * bits. Therefore we cannot provide interpretation and would later 290 * have to provide own emulation handlers. 291 */ | 122 123 atomic_set(&scb_s->cpuflags, newflags); 124 return 0; 125} 126 127/* 128 * Create a shadow copy of the crycb block and setup key wrapping, if 129 * requested for guest 3 and enabled for guest 2. --- 156 unchanged lines hidden (view full) --- 286 scb_s->lctl = scb_o->lctl; 287 scb_s->svcc = scb_o->svcc; 288 scb_s->ictl = scb_o->ictl; 289 /* 290 * SKEY handling functions can't deal with false setting of PTE invalid 291 * bits. Therefore we cannot provide interpretation and would later 292 * have to provide own emulation handlers. 293 */ |
292 scb_s->ictl |= ICTL_ISKE | ICTL_SSKE | ICTL_RRBE; | 294 if (!(atomic_read(&scb_s->cpuflags) & CPUSTAT_KSS)) 295 scb_s->ictl |= ICTL_ISKE | ICTL_SSKE | ICTL_RRBE; 296 |
293 scb_s->icpua = scb_o->icpua; 294 295 if (!(atomic_read(&scb_s->cpuflags) & CPUSTAT_SM)) 296 new_mso = scb_o->mso & 0xfffffffffff00000UL; 297 /* if the hva of the prefix changes, we have to remap the prefix */ 298 if (scb_s->mso != new_mso || scb_s->prefix != scb_o->prefix) 299 prefix_unmapped(vsie_page); 300 /* SIE will do mso/msl validity and exception checks for us */ --- 834 unchanged lines hidden --- | 297 scb_s->icpua = scb_o->icpua; 298 299 if (!(atomic_read(&scb_s->cpuflags) & CPUSTAT_SM)) 300 new_mso = scb_o->mso & 0xfffffffffff00000UL; 301 /* if the hva of the prefix changes, we have to remap the prefix */ 302 if (scb_s->mso != new_mso || scb_s->prefix != scb_o->prefix) 303 prefix_unmapped(vsie_page); 304 /* SIE will do mso/msl validity and exception checks for us */ --- 834 unchanged lines hidden --- |