From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
Sergio Lopez <slp@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: [PATCH 4/7] microvm: set pci_irq_mask
Date: Fri, 16 Oct 2020 13:38:32 +0200 [thread overview]
Message-ID: <20201016113835.17465-5-kraxel@redhat.com> (raw)
In-Reply-To: <20201016113835.17465-1-kraxel@redhat.com>
Makes sure the PCI interrupt overrides are added to the
APIC table in case PCIe is enabled.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/i386/acpi-microvm.c | 2 +-
hw/i386/microvm.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c
index f16f2311955c..8e2d2b7cff83 100644
--- a/hw/i386/acpi-microvm.c
+++ b/hw/i386/acpi-microvm.c
@@ -196,7 +196,7 @@ static void acpi_build_microvm(AcpiBuildTables *tables,
acpi_add_table(table_offsets, tables_blob);
acpi_build_madt(tables_blob, tables->linker, X86_MACHINE(machine),
- ACPI_DEVICE_IF(x86ms->acpi_dev), false);
+ ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->pci_irq_mask != 0);
xsdt = tables_blob->len;
build_xsdt(tables_blob, tables->linker, table_offsets, NULL, NULL);
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 73a7a142b44a..9dd74458aca4 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -210,6 +210,12 @@ static void microvm_devices_init(MicrovmMachineState *mms)
mms->gpex.ecam.size = PCIE_ECAM_SIZE;
mms->gpex.irq = 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)));
+ } else {
+ x86ms->pci_irq_mask = 0;
}
if (mms->pic == ON_OFF_AUTO_ON || mms->pic == ON_OFF_AUTO_AUTO) {
--
2.27.0
next prev parent reply other threads:[~2020-10-16 11:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 11:38 [PATCH 0/7] microvm: fix PCIe IRQs in APIC table Gerd Hoffmann
2020-10-16 11:38 ` [PATCH 1/7] tests/acpi: allow changes for microvm/APIC.pcie Gerd Hoffmann
2020-10-16 11:38 ` [PATCH 2/7] tests/acpi: add empty microvm/APIC.pcie Gerd Hoffmann
2020-10-16 11:38 ` [PATCH 3/7] x86: make pci irqs runtime configurable Gerd Hoffmann
2020-10-16 11:38 ` Gerd Hoffmann [this message]
2020-10-16 11:38 ` [PATCH 5/7] apci: drop has_pci arg for acpi_build_madt Gerd Hoffmann
2020-10-16 11:38 ` [PATCH 6/7] tests/acpi: update expected data files Gerd Hoffmann
2020-10-16 11:38 ` [PATCH 7/7] tests/acpi: disallow changes for microvm/APIC.pcie Gerd Hoffmann
2020-10-23 18:42 ` [PATCH 0/7] microvm: fix PCIe IRQs in APIC table Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201016113835.17465-5-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=slp@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).