crosvm/cros_fdt
Jakob Vukalovic f72868a451 cros_fdt: Do not apply children of filtered nodes
When a filtered DT overlay is applied, cros_fdt applies the filtered
node(s) and its dependencies. Until now, the filtered node's
dependencies were:
- its parent nodes
- all nodes in the subtree rooted at the filtered node, ie its child
  nodes
- all nodes referenced by their phandle value from any of the above

Including all child nodes as dependencies is incorrect. Simply
referencing a bus node from any node in the DT would include all of
the devices on a bus. For VM device assignment, it would populate
the DT with devices that are not being assigned.

This change updates the filtering algorithm to stop treating child
nodes of a filtered node as dependecies.

Bug: 320481473
Test: cd cros_fdt && cargo test
Change-Id: I3c393d41a4c497c043917767d555880896c10eb5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5217131
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Pierre-Clément Tosi <ptosi@google.com>
Commit-Queue: Jakob Vukalović <jakobvukalovic@google.com>
2024-01-22 10:37:57 +00:00
..
src cros_fdt: Do not apply children of filtered nodes 2024-01-22 10:37:57 +00:00
test-files
Cargo.toml