mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
s390x/sic: realize SIC handling
Currently, we do nothing for the SIC instruction, but we need to implement it properly. Let's add proper handling in the backend code. Co-authored-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
1622ffd515
commit
2283f4d67a
4 changed files with 44 additions and 1 deletions
|
@ -521,6 +521,32 @@ void css_conditional_io_interrupt(SubchDev *sch)
|
|||
}
|
||||
}
|
||||
|
||||
int css_do_sic(CPUS390XState *env, uint8_t isc, uint16_t mode)
|
||||
{
|
||||
S390FLICState *fs = s390_get_flic();
|
||||
S390FLICStateClass *fsc = S390_FLIC_COMMON_GET_CLASS(fs);
|
||||
int r;
|
||||
|
||||
if (env->psw.mask & PSW_MASK_PSTATE) {
|
||||
r = -PGM_PRIVILEGED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
trace_css_do_sic(mode, isc);
|
||||
switch (mode) {
|
||||
case SIC_IRQ_MODE_ALL:
|
||||
case SIC_IRQ_MODE_SINGLE:
|
||||
break;
|
||||
default:
|
||||
r = -PGM_OPERAND;
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = fsc->modify_ais_mode(fs, isc, mode) ? -PGM_OPERATION : 0;
|
||||
out:
|
||||
return r;
|
||||
}
|
||||
|
||||
void css_adapter_interrupt(uint8_t isc)
|
||||
{
|
||||
uint32_t io_int_word = (isc << 27) | IO_INT_WORD_AI;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue