mirror of https://gitee.com/openkylin/qemu.git
More s390x fixes: Correct ilen, and ccw checking.
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJZewBGAAoJEN7Pa5PG8C+v6EUP/1A5Gz/A06jfEqupyTrbWxRO CkOLIKQhcKaBHtfF+RpwOvSzcEoNN8Z5l6t6ymVo7/o493avZkhxtSwiWLm9ziAf XghEumAggVdjyaJVyvr1kZouJMtN8J8MZc4loBvY99l2DWRs5Rl8P4l9XISWyWmB 1XgAodOB+DF7Syy2/PgAfxNoVaCSHh1UPNnqwMxj8X+kzJUCbWC4CjeVR1yeLz7j ULiiqmVwYSPW6MTf46BrlP+4zKwIIw/Euj0+KCqxfmRg6RPQ/l14whrwkxvF73dI tEOqWqc8t0oq1G0ak3c8VvM2w4j9fascvN+piz5/i+65+MoyuVMKJBzryLLEM69s ozYIMQ0hfG/KH7uMpccGV0RDzr750wZyU/cZKTgDYjfGOV/CfEQEhjyWISkAZCB7 sV3daivO+DzMcsdWDwU/XG3cnG6/5Pc2p61wYTKw3KnXV3cLv1bwe2b9aFUpymwA VIHHSBW2qX0PK7CzeKGMyOckxYS6swTuUVQBGRPH4VUNR0HmjI59yJrv0iULCxQy 4hDgkHgJcbOPm8d9gwQLJXmcu0Ub8PPI21jxqodhWVhRB9LLOuNLqJCq3Fh+QdZi L94++GMgqve5AIb+h3yAMCxiT+4RRUdlBiUEaPKZJj7dEsBIteIXaHLvxY6s+zPl 0K1Jwdvtgmp25Qn8NAtP =CWHT -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170728' into staging More s390x fixes: Correct ilen, and ccw checking. # gpg: Signature made Fri 28 Jul 2017 10:13:42 BST # gpg: using RSA key 0xDECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # gpg: aka "Cornelia Huck <cohuck@kernel.org>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20170728: s390x/css: fix bits must be zero check for TIC s390x/css: check ccw address validity target/s390x: fix pgm irq ilen in translate_pages() target/s390x: fix pgm irq ilen for stsi Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
871a0f7ad2
|
@ -795,6 +795,10 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr,
|
|||
if (!ccw_addr) {
|
||||
return -EIO;
|
||||
}
|
||||
/* Check doubleword aligned and 31 or 24 (fmt 0) bit addressable. */
|
||||
if (ccw_addr & (sch->ccw_fmt_1 ? 0x80000007 : 0xff000007)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Translate everything to format-1 ccws - the information is the same. */
|
||||
ccw = copy_ccw_from_guest(ccw_addr, sch->ccw_fmt_1);
|
||||
|
@ -881,7 +885,8 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr,
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
if (ccw.flags & (CCW_FLAG_CC | CCW_FLAG_DC)) {
|
||||
if (ccw.flags || ccw.count) {
|
||||
/* We have already sanitized these if converted from fmt 0. */
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0,
|
|||
if ((r0 & STSI_LEVEL_MASK) <= STSI_LEVEL_3 &&
|
||||
((r0 & STSI_R0_RESERVED_MASK) || (r1 & STSI_R1_RESERVED_MASK))) {
|
||||
/* valid function code, invalid reserved bits */
|
||||
program_interrupt(env, PGM_SPECIFICATION, 2);
|
||||
program_interrupt(env, PGM_SPECIFICATION, 4);
|
||||
}
|
||||
|
||||
sel1 = r0 & STSI_R0_SEL1_MASK;
|
||||
|
|
|
@ -440,7 +440,7 @@ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,
|
|||
}
|
||||
if (!address_space_access_valid(&address_space_memory, pages[i],
|
||||
TARGET_PAGE_SIZE, is_write)) {
|
||||
program_interrupt(env, PGM_ADDRESSING, 0);
|
||||
program_interrupt(env, PGM_ADDRESSING, ILEN_AUTO);
|
||||
return -EFAULT;
|
||||
}
|
||||
addr += TARGET_PAGE_SIZE;
|
||||
|
|
Loading…
Reference in New Issue