Page MenuHomeFreeBSD

gicv3: Support indirect ITS tables
ClosedPublic

Authored by andrew on Aug 22 2023, 4:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 5:55 PM
Unknown Object (File)
Jan 5 2024, 10:30 PM
Unknown Object (File)
Jan 1 2024, 11:22 AM
Unknown Object (File)
Dec 31 2023, 6:15 PM
Unknown Object (File)
Dec 25 2023, 5:17 PM
Unknown Object (File)
Dec 23 2023, 1:21 AM
Unknown Object (File)
Dec 19 2023, 11:50 PM
Unknown Object (File)
Nov 12 2023, 9:23 PM
Subscribers

Details

Summary

The GICv3 ITS device supports two options for device tables. Currently
we support a single table to hold all device IDs, however when the
device ID space grows large this can be too large for the GITS_BASER
register to describe.

To handle this case, and to reduce the memory needed when this space
is sparse support the second option, the indirect table. The indirect
table is a 2 level table where the first level contains the physical
address of the second with a valid bit. The second level is an ITS
page sized table where each entry is the original entry size.

As we don't need to allocate a second level table for devices IDs that
don't exist this can reduce the allocation size.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

gallatin added inline comments.
sys/arm64/arm64/gicv3_its.c
571

Why page_size * 2? Why not something like what you did in the earlier debugging session, and check for the number of l1 pages overflowing the size field of the GITS_BASER register?

This revision is now accepted and ready to land.Aug 22 2023, 5:16 PM
sys/arm64/arm64/gicv3_its.c
1294

Do the failure cases here need to be loud?

sys/arm64/arm64/gicv3_its.c
571

It is expected as the size of the device ID space increases it will become very sparse so I was trying to use the indirect table where possible to reduce the memory usage.

The testing patch I sent you also had this check, the overflow check was separate.

1294
This revision was automatically updated to reflect the committed changes.