mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
microvm: make pcie irq base runtime changeable
Allows to move them in case we have enough irq lines available. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20201203105423.10431-6-kraxel@redhat.com
This commit is contained in:
parent
c214a7bcb6
commit
3d09c00704
2 changed files with 7 additions and 6 deletions
|
@ -181,6 +181,7 @@ static void microvm_devices_init(MicrovmMachineState *mms)
|
|||
mms->virtio_irq_base = 5;
|
||||
mms->virtio_num_transports = 8;
|
||||
if (x86_machine_is_acpi_enabled(x86ms)) {
|
||||
mms->pcie_irq_base = 12;
|
||||
mms->virtio_irq_base = 16;
|
||||
}
|
||||
|
||||
|
@ -226,12 +227,12 @@ static void microvm_devices_init(MicrovmMachineState *mms)
|
|||
mms->gpex.mmio32.size = PCIE_MMIO_SIZE;
|
||||
mms->gpex.ecam.base = PCIE_ECAM_BASE;
|
||||
mms->gpex.ecam.size = PCIE_ECAM_SIZE;
|
||||
mms->gpex.irq = PCIE_IRQ_BASE;
|
||||
mms->gpex.irq = mms->pcie_irq_base;
|
||||
create_gpex(mms);
|
||||
x86ms->pci_irq_mask = ((1 << (PCIE_IRQ_BASE + 0)) |
|
||||
(1 << (PCIE_IRQ_BASE + 1)) |
|
||||
(1 << (PCIE_IRQ_BASE + 2)) |
|
||||
(1 << (PCIE_IRQ_BASE + 3)));
|
||||
x86ms->pci_irq_mask = ((1 << (mms->pcie_irq_base + 0)) |
|
||||
(1 << (mms->pcie_irq_base + 1)) |
|
||||
(1 << (mms->pcie_irq_base + 2)) |
|
||||
(1 << (mms->pcie_irq_base + 3)));
|
||||
} else {
|
||||
x86ms->pci_irq_mask = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue