Re: [kvm-unit-tests PATCH v6 04/10] s390x: interrupt registration

David Hildenbrand
2020-05-15T07:57:44Z

On 15.05.20 08:57, Pierre Morel wrote:
>
>
> On 2020-05-14 13:58, Cornelia Huck wrote:
>> On Fri, 24 Apr 2020 12:45:46 +0200
>> Pierre Morel <pmorel@linux.ibm.com> wrote:
>>
>>> Let's make it possible to add and remove a custom io interrupt handler,
>>> that can be used instead of the normal one.
>>>
>>> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>> Reviewed-by: David Hildenbrand <david@redhat.com>
>>> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
>>> ---
>>> lib/s390x/interrupt.c | 23 ++++++++++++++++++++++-
>>> lib/s390x/interrupt.h | 8 ++++++++
>>> 2 files changed, 30 insertions(+), 1 deletion(-)
>>> create mode 100644 lib/s390x/interrupt.h
>>
>> As the "normal one" means "no handler, just abort", is there any reason
>> not simply to always provide one? What is the use case for multiple I/O
>> interrupt handlers?
>>
>
> I can only agree, I proposed this initially.
> David asked for a registration.
>

I don't understand "not simply to always provide one" or "multiple I/O
interrupt handlers".

There is always exactly *one* handler

void handle_io_int(void)
{
...
}

All we do here, is to allow to register a callback from the handler,
e.g., to verify in a test case that a specific I/O interrupt was received.

--
Thanks,

David / dhildenb