On 03/26/2018 11:03 AM, Pierre Morel wrote: >>> +int ap_device_handle_pqap(S390CPU *cpu) >>> +{ >>> + CPUS390XState *env = &cpu->env; >>> + int fc = 4 & (env->regs[0] >> 24); >>> + >>> + /* >>> + * The Query Configuration Information (QCI) function (fc == 4) does >>> not >>> + * set a response code in reg 1, so check for that along with the >>> + * AP feature. >>> + */ >>> + if ((fc != 4) && s390_has_feat(S390_FEAT_AP)) { >>> + env->regs[1] = 0x10000; >>> + >>> + return 0; >>> + } >> This would imply an operation exception in case fc==4, which sounds very >> wrong.
Yes, operation exception is a wrong response under the condition (fc == 4) && s390_has_feat(S390_FEAT_AP). @David: FYI Tony is likely to respond after Wednesday as he is on vacation right now. > > It depends but I think that the S390_FEAT_AP_QUERY_CONFIG_INFO must be tested > to know what to answer. > If the feature is there, QCI must be answered correctly. > > there are also some error situations to handle in all three functions. > I agree. Regards, Halil