forked from Minki/linux
KVM: s390: gaccess: add ESOP2 handling
When we access guest memory and run into a protection exception, we need to pass the exception data to the guest. ESOP2 provides detailed information about all protection exceptions which ESOP1 only partially provided. The gaccess changes make sure, that the guest always gets all available information. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
49def18533
commit
a679c547d1
@ -465,7 +465,9 @@ static int ar_translation(struct kvm_vcpu *vcpu, union asce *asce, ar_t ar,
|
|||||||
struct trans_exc_code_bits {
|
struct trans_exc_code_bits {
|
||||||
unsigned long addr : 52; /* Translation-exception Address */
|
unsigned long addr : 52; /* Translation-exception Address */
|
||||||
unsigned long fsi : 2; /* Access Exception Fetch/Store Indication */
|
unsigned long fsi : 2; /* Access Exception Fetch/Store Indication */
|
||||||
unsigned long : 6;
|
unsigned long : 2;
|
||||||
|
unsigned long b56 : 1;
|
||||||
|
unsigned long : 3;
|
||||||
unsigned long b60 : 1;
|
unsigned long b60 : 1;
|
||||||
unsigned long b61 : 1;
|
unsigned long b61 : 1;
|
||||||
unsigned long as : 2; /* ASCE Identifier */
|
unsigned long as : 2; /* ASCE Identifier */
|
||||||
@ -497,14 +499,18 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
|
|||||||
switch (code) {
|
switch (code) {
|
||||||
case PGM_PROTECTION:
|
case PGM_PROTECTION:
|
||||||
switch (prot) {
|
switch (prot) {
|
||||||
|
case PROT_TYPE_LA:
|
||||||
|
tec->b56 = 1;
|
||||||
|
break;
|
||||||
|
case PROT_TYPE_KEYC:
|
||||||
|
tec->b60 = 1;
|
||||||
|
break;
|
||||||
case PROT_TYPE_ALC:
|
case PROT_TYPE_ALC:
|
||||||
tec->b60 = 1;
|
tec->b60 = 1;
|
||||||
/* FALL THROUGH */
|
/* FALL THROUGH */
|
||||||
case PROT_TYPE_DAT:
|
case PROT_TYPE_DAT:
|
||||||
tec->b61 = 1;
|
tec->b61 = 1;
|
||||||
break;
|
break;
|
||||||
default: /* LA and KEYC set b61 to 0, other params undefined */
|
|
||||||
return code;
|
|
||||||
}
|
}
|
||||||
/* FALL THROUGH */
|
/* FALL THROUGH */
|
||||||
case PGM_ASCE_TYPE:
|
case PGM_ASCE_TYPE:
|
||||||
|
@ -80,6 +80,7 @@ static struct facility_def facility_defs[] = {
|
|||||||
76, /* msa extension 3 */
|
76, /* msa extension 3 */
|
||||||
77, /* msa extension 4 */
|
77, /* msa extension 4 */
|
||||||
78, /* enhanced-DAT 2 */
|
78, /* enhanced-DAT 2 */
|
||||||
|
131, /* enhanced-SOP 2 and side-effect */
|
||||||
-1 /* END */
|
-1 /* END */
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user