xen/events: modify struct evtchn layout
authorJuergen Gross <jgross@suse.com>
Mon, 30 Nov 2020 13:04:34 +0000 (14:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 30 Nov 2020 13:04:34 +0000 (14:04 +0100)
commit43803dc0240f11a4b72c373f16e89508c23dcaa9
tree71f21fa902a4d1096bb9d4f7814ba9607e8da5e3
parentf7d7d53f6464cff94ead4c15d21e79ce4d9173f5
xen/events: modify struct evtchn layout

In order to avoid latent races when updating an event channel put
xen_consumer and pending fields in different bytes. This is no problem
right now, but especially the pending indicator isn't used only when
initializing an event channel (unlike xen_consumer), so any future
addition to this byte would need to be done with a potential race kept
in mind.

At the same time move some other fields around to have less implicit
paddings and to keep related fields more closely together.

Finally switch struct evtchn to no longer use fixed sized types where
not needed.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/event_fifo.c
xen/include/xen/sched.h