]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/events: reset affinity of 2-level event when tearing it down
authorJuergen Gross <jgross@suse.com>
Mon, 15 Mar 2021 08:54:02 +0000 (09:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 15:07:24 +0000 (16:07 +0100)
commit2ce514cfaaa83df009f2337b6c315b2a8126fffe
tree3cd89178a8268eef2d5647f1e8080a8bc256ee89
parent7671c44edfd0411c7411266f0c90dd21b535c3d4
xen/events: reset affinity of 2-level event when tearing it down

commit 9e77d96b8e2724ed00380189f7b0ded61113b39f upstream.

When creating a new event channel with 2-level events the affinity
needs to be reset initially in order to avoid using an old affinity
from earlier usage of the event channel port. So when tearing an event
channel down reset all affinity bits.

The same applies to the affinity when onlining a vcpu: all old
affinity settings for this vcpu must be reset. As percpu events get
initialized before the percpu event channel hook is called,
resetting of the affinities happens after offlining a vcpu (this is
working, as initial percpu memory is zeroed out).

Cc: stable@vger.kernel.org
Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Link: https://lore.kernel.org/r/20210306161833.4552-2-jgross@suse.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/events/events_2l.c
drivers/xen/events/events_base.c
drivers/xen/events/events_internal.h