vmm: Add ACPI Generic Initiator support - #7626
Merged
Merged
Conversation
saravan2
force-pushed
the
generic-initiator
branch
from
January 22, 2026 02:14
710ee7c to
c68fbfe
Compare
phip1611
reviewed
Jan 22, 2026
up2wing
reviewed
Jan 22, 2026
saravan2
force-pushed
the
generic-initiator
branch
6 times, most recently
from
January 31, 2026 12:10
84d0b83 to
42bc2f3
Compare
Member
Author
|
Added a new commit to update link checker exclusion patterns |
rbradford
approved these changes
Feb 2, 2026
sboeuf
reviewed
Feb 2, 2026
saravan2
force-pushed
the
generic-initiator
branch
2 times, most recently
from
February 11, 2026 08:20
7c680e8 to
0a2536f
Compare
rksaripalli
approved these changes
Feb 11, 2026
Member
Author
|
@sboeuf I addressed all of your suggestions. Can you review and confirm the resolution of the open threads ? |
The documentation says guest_numa_id is required to be unique and therefore the parser() giving default value for non-existing guest_numa_id with .unwrap_or(0) is dangerous. Return a validation error if guest_numa_id is not provided instead of silently defaulting to 0. Signed-off-by: Saravanan D <[email protected]>
Add an optional device_id string field to NumaConfig for identifying PCI devices associated with a NUMA node. This is used by the Generic Initiator support to map devices to their proximity domain. Update OpenAPI spec (cloud-hypervisor.yaml) to include the new device_id field in the NumaConfig schema. The device_id is optional and parsed from the --numa parameter: --numa "device_id=<device_id>,distances=[...],..." The optional field is accepted but not used. Signed-off-by: Saravanan D <[email protected]>
Validate device_id in numa config is mutually exclusive with cpus and memory_zones Add NumaConfig::validate() and modify NumaConfig::parse() Add ValidationError::InvalidNumaConfig for detailed error messages Include unit tests covering valid and invalid configs Signed-off-by: Saravanan D <[email protected]>
Support ACPI Generic Initiator Affinity to associate PCI devices with NUMA proximity domains Add GenericInitiatorAffinity struct Add from_pci_bdf() to encode PCI Segment:Bus:Device.Function Add from_acpi_device() for ACPI device handles (future use) Generate SRAT Type 5 entries for nodes with device_id Improve create_slit_table() to check distance symmetry when forward distance is missing Track device ID to BDF mappings in DeviceManager Includes comprehensive unit tests Signed-off-by: Saravanan D <[email protected]>
Update FDT generation to skip NUMA properties when Generic Initiator nodes are present, preventing conflicts between FDT and ACPI NUMA information. FDT cannot represent Generic Initiator nodes, so ACPI (via SRAT Type 5) becomes the authoritative source for the entire NUMA topology when Generic Initiators exist. Skip FDT numa-node-id properties in CPU and memory nodes when Generic Initiator is present Distance map bug fix : iterate over actual NUMA node IDs instead of 0..len() Use distance symmetry to derive distance when forward config is missing Default to distance cost 20 when neither direction specified Only create memory nodes if NUMA node has memory region Added unit tests ARM64 boot protocol: https://docs.kernel.org/arch/arm64/booting.html Signed-off-by: Saravanan D <[email protected]>
Add test_guest_numa_generic_initiator to validate ACPI Generic
Initiator Affinity (SRAT Type 5) support for VFIO device.
The test verifies the following :
- Guest VM boots with a VFIO device associated with a {cpu,
memort}-less NUMA node
- Guest Kernel correctly detects Generic Initiator through
ACPI tables SRAT, SLIT
- NUMA topology in the guest includes the device-only node
with correct distances
Invoked via :
./scripts/dev_cli.sh tests --integration -- --hypervisor kvm \
--test-filter test_guest_numa_generic_initiator
The test requires a real VFIO device bound to vfio-pci driver and
skips gracefully if hardware is unavailable.
Signed-off-by: Saravanan D <[email protected]>
Document device_id parameter in NumaConfig, automatic guest_numa_id assignment, default NUMA distances and restrictions on Generoc Initiator NUMA nodes Add numa configuration examples with GPU device and distance relationships. Signed-off-by: Saravanan D <[email protected]>
Update .lychee.toml to exclude the following patterns: - ARM domains (developer.arm.com, infocenter.arm.com) which return 403 Forbidden due to anti-bot protections in CI. - Local TCP addresses (192.168.1.10) which are unsupported by the link-checker tool. - The .lychee.toml file itself, to prevent the tool from recursively checking its own regex exclusion patterns as valid URLs. Signed-off-by: Saravanan D <[email protected]>
saravan2
force-pushed
the
generic-initiator
branch
from
February 11, 2026 18:56
0a2536f to
6adc445
Compare
Member
Author
|
Amended one of my existing commits 842b8dd to update OpenAPI spec (cloud-hypervisor.yaml) to include the new device_id field in the NumaConfig schema. |
rbradford
approved these changes
Feb 12, 2026
This was referenced Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements ACPI Generic Initiator Affinity (SRAT Type 5) support to associate VFIO-PCI devices with dedicated {memory,CPU}-less NUMA nodes. This feature enables the guest OS to make NUMA-aware memory allocation decisions for device workloads.
Changes
Configuration:
device_idparameter to--numafor specifying VFIO devicesParsing and Validation: Generic Initiator nodes have no CPUs or memory zones
ACPI : Generate SRAT Type 5 entries with PCI device handles
FDT (aarch64): Add Generic Initiator awareness
Distance handling: Implement automatic distance symmetry and defaults (self=10, remote=20)
Documentation: Update docs/memory.md
CI: Update link checker exclusion patterns
Tests
Unit tests
Integration test