Page MenuHomeFreeBSD

msi: Support APIC Extended Destination IDs
Needs ReviewPublic

Authored by cperciva on Sun, Feb 22, 4:10 AM.
Tags
None
Referenced Files
F146088951: D55426.id172486.diff
Fri, Feb 27, 5:27 PM
Unknown Object (File)
Fri, Feb 27, 5:51 AM
Unknown Object (File)
Fri, Feb 27, 5:20 AM
Unknown Object (File)
Fri, Feb 27, 5:12 AM
Unknown Object (File)
Fri, Feb 27, 4:32 AM
Unknown Object (File)
Thu, Feb 26, 11:11 PM
Subscribers

Details

Reviewers
jhb
kib
Summary

Without an IOMMU, the APIC standard only allow 8 bits of Destination ID
for MSI messages, limiting us to 256 CPUs. While IOMMUs can allow for
more than 256 CPUs to be supported, they are not necessarily desireable
in virtualized environments.

Implement the Extended Destination ID standard authored by David
Woodhouse, which uses 7 "Reserved" bits for the high bits of a 15-bit
Extended Destination ID: http://david.woodhou.se/ExtDestId.pdf

This standard is implemented on the host side in Xen, Hyper-V, KVM,
and Bhyve; future commits will add code to detect and enable it
automatically but in the mean time it can be enabled via the loader
tunable machdep.msi_ext_dest_id.

MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70925
Build 67808: arc lint + arc unit

Event Timeline

sys/x86/x86/msi.c
100

Should it be SYSCTL_BOOL?

sys/x86/x86/msi.c
100

I'm actually about to change this to be tri-state, with -1 meaning "autodetect", so that the loader tunable can set this in either direction. So yes it probably should have been, but no it shouldn't be after that change.

This revision is now accepted and ready to land.Mon, Feb 23, 7:36 PM
sys/x86/x86/msi.c
666

This line seems to be over-indented by one space.

Switch machdep.msi_ext_dest_id to tristate

-1 (default) means autodetect

Setting the loader tunable to 0 or 1 forces the state off or on.

This revision now requires review to proceed.Mon, Feb 23, 7:52 PM
sys/x86/x86/msi.c
105

Too much indentation for this line too.

sys/x86/x86/msi.c
105

That indentation was there in the original INTEL_ADDR which I copied. Although perhaps the second line (which I added) should have the same extra half-indent?

666

That was deliberate based on the nesting of parentheses; I thought it was clearer this way.

sys/x86/x86/msi.c
105

I believe all lines after the first must have the same indent, per style.

666

Style(9) does not say anything about increasing indent for nested expressions. It is plain +4 spaces, same for all continuation lines.