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)
Sep 28 2024, 8:21 AM
Unknown Object (File)
Sep 22 2024, 8:09 PM
Unknown Object (File)
Sep 22 2024, 9:53 AM
Unknown Object (File)
Sep 21 2024, 8:13 PM
Unknown Object (File)
Sep 21 2024, 2:43 AM
Unknown Object (File)
Sep 20 2024, 12:01 AM
Unknown Object (File)
Sep 18 2024, 10:12 PM
Unknown Object (File)
Sep 16 2024, 4:20 AM
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.