Skip to content

Commit 93391d4

Browse files
committed
pci: fdt: fix: add pci-probe-only property to the chosen node
The `pci-probe-only` property tells the guest to preserve any PCI resource assignment done by the firmware (VMM in this case). Since we do not support BAR relocation, this is a valid way to tell the guest to not relocate anything. The absence of this property did not cause any issues so far. But this can change. Add this property explicitly to prevent potential future issues. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent eff14c7 commit 93391d4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src/vmm/src/arch/aarch64

src/vmm/src/arch/aarch64/fdt.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ fn create_chosen_node(
272272
)?;
273273
}
274274

275+
// Prevent the kernel from reassigning PCI BAR addresses.
276+
// https://elixir.bootlin.com/linux/v6.19.8/source/drivers/pci/of.c#L255
277+
fdt.property_u32("linux,pci-probe-only", 1)?;
278+
275279
fdt.end_node(chosen)?;
276280

277281
Ok(())

0 commit comments

Comments
 (0)