mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
s390x/ioinst: Fixed priority of operand exceptions
Operand exceptions have a lower priority than specification and address exceptions. Thus the checks for operand exceptions must be done later. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
7ae5a7c0f6
commit
71ed827abd
@ -151,11 +151,6 @@ int ioinst_handle_msch(CPUS390XState *env, uint64_t reg1, uint32_t ipb)
|
||||
int cc;
|
||||
hwaddr len = sizeof(*schib);
|
||||
|
||||
if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) {
|
||||
program_interrupt(env, PGM_OPERAND, 2);
|
||||
return -EIO;
|
||||
}
|
||||
trace_ioinst_sch_id("msch", cssid, ssid, schid);
|
||||
addr = decode_basedisp_s(env, ipb);
|
||||
if (addr & 3) {
|
||||
program_interrupt(env, PGM_SPECIFICATION, 2);
|
||||
@ -167,11 +162,13 @@ int ioinst_handle_msch(CPUS390XState *env, uint64_t reg1, uint32_t ipb)
|
||||
cc = -EIO;
|
||||
goto out;
|
||||
}
|
||||
if (!ioinst_schib_valid(schib)) {
|
||||
if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid) ||
|
||||
!ioinst_schib_valid(schib)) {
|
||||
program_interrupt(env, PGM_OPERAND, 2);
|
||||
cc = -EIO;
|
||||
goto out;
|
||||
}
|
||||
trace_ioinst_sch_id("msch", cssid, ssid, schid);
|
||||
sch = css_find_subch(m, cssid, ssid, schid);
|
||||
if (sch && css_subch_visible(sch)) {
|
||||
ret = css_do_msch(sch, schib);
|
||||
@ -226,11 +223,6 @@ int ioinst_handle_ssch(CPUS390XState *env, uint64_t reg1, uint32_t ipb)
|
||||
int cc;
|
||||
hwaddr len = sizeof(*orig_orb);
|
||||
|
||||
if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) {
|
||||
program_interrupt(env, PGM_OPERAND, 2);
|
||||
return -EIO;
|
||||
}
|
||||
trace_ioinst_sch_id("ssch", cssid, ssid, schid);
|
||||
addr = decode_basedisp_s(env, ipb);
|
||||
if (addr & 3) {
|
||||
program_interrupt(env, PGM_SPECIFICATION, 2);
|
||||
@ -243,11 +235,13 @@ int ioinst_handle_ssch(CPUS390XState *env, uint64_t reg1, uint32_t ipb)
|
||||
goto out;
|
||||
}
|
||||
copy_orb_from_guest(&orb, orig_orb);
|
||||
if (!ioinst_orb_valid(&orb)) {
|
||||
if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid) ||
|
||||
!ioinst_orb_valid(&orb)) {
|
||||
program_interrupt(env, PGM_OPERAND, 2);
|
||||
cc = -EIO;
|
||||
goto out;
|
||||
}
|
||||
trace_ioinst_sch_id("ssch", cssid, ssid, schid);
|
||||
sch = css_find_subch(m, cssid, ssid, schid);
|
||||
if (sch && css_subch_visible(sch)) {
|
||||
ret = css_do_ssch(sch, &orb);
|
||||
@ -306,11 +300,6 @@ int ioinst_handle_stsch(CPUS390XState *env, uint64_t reg1, uint32_t ipb)
|
||||
SCHIB *schib;
|
||||
hwaddr len = sizeof(*schib);
|
||||
|
||||
if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) {
|
||||
program_interrupt(env, PGM_OPERAND, 2);
|
||||
return -EIO;
|
||||
}
|
||||
trace_ioinst_sch_id("stsch", cssid, ssid, schid);
|
||||
addr = decode_basedisp_s(env, ipb);
|
||||
if (addr & 3) {
|
||||
program_interrupt(env, PGM_SPECIFICATION, 2);
|
||||
@ -322,6 +311,13 @@ int ioinst_handle_stsch(CPUS390XState *env, uint64_t reg1, uint32_t ipb)
|
||||
cc = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) {
|
||||
program_interrupt(env, PGM_OPERAND, 2);
|
||||
cc = -EIO;
|
||||
goto out;
|
||||
}
|
||||
trace_ioinst_sch_id("stsch", cssid, ssid, schid);
|
||||
sch = css_find_subch(m, cssid, ssid, schid);
|
||||
if (sch) {
|
||||
if (css_subch_visible(sch)) {
|
||||
|
Loading…
Reference in New Issue
Block a user