Skip to content

Commit eff14c7

Browse files
committed
pci: doc: Add comment about DSM_PCI_PRESERVE_BOOT_CONFIG in AML
The DSM_PCI_PRESERVE_BOOT_CONFIG function in the DSM tells the guest if it should preserve the PCI resource assignments done by the firmware (VMM in this case). Since we do not support BAR relocation this is a valid way to prevent guest from trying to relocate them. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent 636f7fa commit eff14c7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/vmm/src/devices/pci/pci_segment.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ impl Aml for PciDsmMethod {
316316
&aml::Equal::new(&aml::Arg(2), &aml::ZERO),
317317
vec![&aml::Return::new(&aml::Buffer::new(vec![0x21]))],
318318
),
319+
// Define DSM_PCI_PRESERVE_BOOT_CONFIG(0x05) function. The return
320+
// value of 0 indicates that the guest should preserve PCI resource
321+
// assignment done by us.
322+
// https://elixir.bootlin.com/linux/v6.19.8/source/drivers/pci/pci-acpi.c#L123
319323
&aml::If::new(
320324
&aml::Equal::new(&aml::Arg(2), &0x05u8),
321325
vec![&aml::Return::new(&aml::ZERO)],

0 commit comments

Comments
 (0)