Page MenuHomeFreeBSD

xen/intr: move x86 bits into xen_arch_isrc_t structure
Needs ReviewPublic

Authored by ehem_freebsd_m5p.com on Fri, Jun 4, 9:29 PM.

Details

Summary

This moves quite a few of the x86-specific variables into a structure
separate from struct xenisrc, a first step in breaking them off.

Ideally these would never have left sys/x86/xen, but breaking them off at
the same time as moving the main portion of the file would have been
ugly.

xi_activehi and xi_edgetrigger disappeared with the removal of PVHv1.
Originally they would have ended up in xen_arch_isrc, but now instead
purge them.

Other architectures (ARM) assigns interrupt vectors via other means, thus
having the vector number in the general structure makes no sense.

This was inspired by the work of Julien Grall <julien@xen.org>,
2015-10-20 09:14:56, but merely borrows the "xen_arch_intr_t" name.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 39718
Build 36607: arc lint + arc unit

Event Timeline

sys/xen/xen_intr.c
119

Should this be added to an x86 header instead of here so that you don't have to move it afterwards?

I expect you will end up moving it in a later commit?

121

Make it unsigned int while at it.

127

While there could you add a CTASSERT that &xenisrc == &xenisrc->xi_arch.xai_intsrc where the code is relying on that property?

I think you can use offsetof to check the field is at offset 0 at build time.

129

Can you place the removal of those fields into a separate patch and make it part of the branch to be committed?