xen/events: fix delayed eoi list handling
authorJuergen Gross <jgross@suse.com>
Mon, 25 Sep 2023 15:54:13 +0000 (17:54 +0200)
committerJuergen Gross <jgross@suse.com>
Mon, 13 Nov 2023 14:21:08 +0000 (15:21 +0100)
commit47d970204054f859f35a2237baa75c2d84fcf436
treef25e52fdb626b46b202a27f9bbc06b22932b2160
parent50e865a56876bd7a74a79c1778025631150f104a
xen/events: fix delayed eoi list handling

When delaying eoi handling of events, the related elements are queued
into the percpu lateeoi list. In case the list isn't empty, the
elements should be sorted by the time when eoi handling is to happen.

Unfortunately a new element will never be queued at the start of the
list, even if it has a handling time lower than all other list
elements.

Fix that by handling that case the same way as for an empty list.

Fixes: e99502f76271 ("xen/events: defer eoi in case of excessive number of events")
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/events/events_base.c