Page MenuHomeFreeBSD

gicv3_its: Don't restrict target CPUs based on SRAT
ClosedPublic

Authored by scottph on Jan 25 2021, 8:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 29 2024, 3:40 PM
Unknown Object (File)
Dec 22 2023, 11:36 PM
Unknown Object (File)
Dec 14 2023, 8:20 PM
Unknown Object (File)
Dec 2 2023, 7:34 AM
Unknown Object (File)
Dec 2 2023, 7:34 AM
Unknown Object (File)
Nov 27 2023, 3:33 PM
Unknown Object (File)
Nov 24 2023, 9:33 PM
Unknown Object (File)
Nov 24 2023, 8:13 AM

Details

Summary

ACPI Sec 5.2.16.5 (SRAT, GIC Interrupt Translation Service (ITS)
Affinity Structure) says:

The GIC ITS Affinity Structure provides the association between
a GIC ITS and a proximity domain. This enables the OSPM to
discover the memory that is closest to the ITS, and use that in
allocating its management tables and command queue.

Previously the ITS driver was using the proximity domain to
restrict which CPUs can be targeted by an LPI. We keep that logic
just for the original dual socket ThunderX which cannot forward
LPIs between sockets.

We also use the SRAT entry for its intended purpose of attempting
to allocate ITS table structures near the ITS.

Sponsored by: Ampere Computing LLC

Test Plan

Boot on Altra with the CPU configured in Hemisphere or Quadrant mode with an nvme device attached to a pcie controller connected to a domain other than the boot domain.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

We need to limit which CPUs we send these interrupts to on the original dual socket ThunderX as it is unable to forward them between the two sockets.

scottph edited the summary of this revision. (Show Details)

We need to limit which CPUs we send these interrupts to on the original dual socket ThunderX as it is unable to forward them between the two sockets.

Would this be a reasonable approach? It seems like the GIC architecture doesn't give us any help here, other than "the ITS channel to the Redistributors is IMPLEMENTATION DEFINED."

Is the IIDR for the existing quirk the right one to hook for the case you mention? Could there be other implementations with this restriction? I could also set sc_cpus to all_cpus only for Altra if you think it would be better to be conservative.

This revision is now accepted and ready to land.Feb 4 2021, 3:50 PM
sys/arm64/arm64/gicv3_its.c
250

Most fields here have an sc_ prefix, it'd be nice to try and keep it consistent.

881

Don't you want to allocate these from the domain local to the CPU?

This revision now requires review to proceed.Feb 16 2021, 6:07 PM
scottph added inline comments.
sys/arm64/arm64/gicv3_its.c
881

Right you are, I had mistaken this for the hardware's collection table which is actually allocated up on line 492.

This revision is now accepted and ready to land.Feb 16 2021, 6:23 PM
This revision was automatically updated to reflect the committed changes.
scottph marked an inline comment as done.