KVM: s390: Fix instruction-execution-protection/change-recording override
This is a fix that prevents translation exception errors on valid page tables for the instruction-exection-protection support. This feature was added during the 4.11 merge window. We have to remove an old check that would trigger if the change-recording override is not available (e.g. edat1 disabled via cpu model). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJY4ktxAAoJEBF7vIC1phx8lroP/3miwUoUReBrQ4s4dFmMdRs9 YJ7y9uqHFNlGHiyLANEjQN5BQzyCZ7SeTvzQqvnBojhVVWV1ylFRIQltopJ4Hd3+ DIApcUXxrSLfSv3rXih/g1/RS7ZbN+HK8jb+uHj47drs96Y6g9/qomea060eIZiV 6WU7MYcf9hf+xVM/r8Hjo40iz+LFKk5qIqEGOGjR8bRvIdjJWyFYjEShyuX+O7F9 F83XryU386xJjLcDgpKIRmJpQ9h0a32e0TLxKSzh5YElIirmeUCNDrHkuBcljHBm tUp3P2ST6XRA1KtybLedNSS00HP+2pZsq2pZPmm/ACsKQtSItm1VUHjO13SUI1sB RHlJvsObMtSPbmlbctmTFtJ1L87BTygGTepYTwZIp9LzlmX0ddC7pCJHO+9OJlL1 N8kPmK1P8evVEntO0ej6R7JRPw/kLBb7+gXHBsMifqQQT7akVLMZKolv9z2yYms2 s1rc2XtbS/9QrexqsGu74dWrnjoTfd+SFslMNJK1GDOhgKljbZmU4Ca6wnsopTds 1JGf4Rc++pFANpxKOhkhavo4m/uDd7T6mCD4yPuhJA0lnGMBYUb26ycpL3gbeA1S PWo1quee1fmGcBjpDHJElyvc5DcgcaAm5b58nBwCusiRMUSmmMt+6sBEiH+n873h zwDoIwU9K/D0ogyEhvJD =G97j -----END PGP SIGNATURE----- Merge tag 'kvm-s390-master-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux From: Christian Borntraeger <borntraeger@de.ibm.com> KVM: s390: Fix instruction-execution-protection/change-recording override This is a fix that prevents translation exception errors on valid page tables for the instruction-exection-protection support. This feature was added during the 4.11 merge window. We have to remove an old check that would trigger if the change-recording override is not available (e.g. edat1 disabled via cpu model).
This commit is contained in:
commit
34fcf05b15
|
@ -168,8 +168,7 @@ union page_table_entry {
|
|||
unsigned long z : 1; /* Zero Bit */
|
||||
unsigned long i : 1; /* Page-Invalid Bit */
|
||||
unsigned long p : 1; /* DAT-Protection Bit */
|
||||
unsigned long co : 1; /* Change-Recording Override */
|
||||
unsigned long : 8;
|
||||
unsigned long : 9;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -745,8 +744,6 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
|
|||
return PGM_PAGE_TRANSLATION;
|
||||
if (pte.z)
|
||||
return PGM_TRANSLATION_SPEC;
|
||||
if (pte.co && !edat1)
|
||||
return PGM_TRANSLATION_SPEC;
|
||||
dat_protection |= pte.p;
|
||||
raddr.pfra = pte.pfra;
|
||||
real_address:
|
||||
|
@ -1182,7 +1179,7 @@ int kvm_s390_shadow_fault(struct kvm_vcpu *vcpu, struct gmap *sg,
|
|||
rc = gmap_read_table(sg->parent, pgt + vaddr.px * 8, &pte.val);
|
||||
if (!rc && pte.i)
|
||||
rc = PGM_PAGE_TRANSLATION;
|
||||
if (!rc && (pte.z || (pte.co && sg->edat_level < 1)))
|
||||
if (!rc && pte.z)
|
||||
rc = PGM_TRANSLATION_SPEC;
|
||||
shadow_page:
|
||||
pte.p |= dat_protection;
|
||||
|
|
Loading…
Reference in a new issue