pub fn create_acpi_tables(
    guest_mem: &GuestMemory,
    num_cpus: u8,
    sci_irq: u32,
    reset_port: u32,
    reset_value: u8,
    acpi_dev_resource: &AcpiDevResource,
    host_cpus: Option<VcpuAffinity>,
    apic_ids: &mut Vec<usize>,
    pci_irqs: &[(PciAddress, u32, PciInterruptPin)],
    pcie_cfg_mmio: u64,
    max_bus: u8,
    force_s2idle: bool
) -> Option<GuestAddress>
Expand description

Create ACPI tables and return the RSDP. The basic tables DSDT/FACP/MADT/XSDT are constructed in this function.

§Arguments

  • guest_mem - The guest memory where the tables will be stored.
  • num_cpus - Used to construct the MADT.
  • sci_irq - Used to fill the FACP SCI_INTERRUPT field, which is going to be used by the ACPI drivers to register sci handler.
  • acpi_dev_resource - resouces needed by the ACPI devices for creating tables.
  • host_cpus - The CPU affinity per CPU used to get corresponding CPUs’ apic id and set these apic id in MADT if --host-cpu-topology option is set.
  • apic_ids - The apic id for vCPU will be sent to KVM by KVM_CREATE_VCPU ioctl.
  • pci_rqs - PCI device to IRQ number assignments as returned by arch::generate_pci_root() (device address, IRQ number, and PCI interrupt pin assignment).
  • pcie_cfg_mmio - Base address for the pcie enhanced configuration access mechanism
  • max_bus - Max bus number in MCFG table