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>,
Richard Henderson <richard.henderson@linaro.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: [PATCH v3 05/12] microvm: make pcie irq base runtime changeable
Date: Thu, 3 Dec 2020 11:54:16 +0100 [thread overview]
Message-ID: <20201203105423.10431-6-kraxel@redhat.com> (raw)
In-Reply-To: <20201203105423.10431-1-kraxel@redhat.com>
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>
---
include/hw/i386/microvm.h | 2 +-
hw/i386/microvm.c | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h
index c5d60bacb5e8..f1e9db059b85 100644
--- a/include/hw/i386/microvm.h
+++ b/include/hw/i386/microvm.h
@@ -66,7 +66,6 @@
#define PCIE_MMIO_SIZE 0x20000000
#define PCIE_ECAM_BASE 0xe0000000
#define PCIE_ECAM_SIZE 0x10000000
-#define PCIE_IRQ_BASE 12
/* Machine type options */
#define MICROVM_MACHINE_PIT "pit"
@@ -96,6 +95,7 @@ struct MicrovmMachineState {
bool auto_kernel_cmdline;
/* Machine state */
+ uint32_t pcie_irq_base;
uint32_t virtio_irq_base;
uint32_t virtio_num_transports;
bool kernel_cmdline_fixed;
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index e92f236bf442..5e4182b47464 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -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;
}
--
2.27.0
next prev parent reply other threads:[~2020-12-03 10:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 10:54 [PATCH v3 00/12] microvm: add second ioapic Gerd Hoffmann
2020-12-03 10:54 ` [PATCH v3 01/12] [testing] disable xhci msix Gerd Hoffmann
2020-12-03 11:00 ` Michael S. Tsirkin
2020-12-03 11:19 ` Gerd Hoffmann
2020-12-03 10:54 ` [PATCH v3 02/12] x86: rewrite gsi_handler() Gerd Hoffmann
2020-12-03 10:54 ` [PATCH v3 03/12] x86: add support for second ioapic Gerd Hoffmann
2020-12-03 13:21 ` Sergio Lopez
2020-12-03 10:54 ` [PATCH v3 04/12] microvm: make number of virtio transports runtime changeable Gerd Hoffmann
2020-12-03 13:26 ` Sergio Lopez
2020-12-03 10:54 ` Gerd Hoffmann [this message]
2020-12-03 13:27 ` [PATCH v3 05/12] microvm: make pcie irq base " Sergio Lopez
2020-12-03 10:54 ` [PATCH v3 06/12] microvm: drop microvm_gsi_handler() Gerd Hoffmann
2020-12-03 13:27 ` Sergio Lopez
2020-12-03 10:54 ` [PATCH v3 07/12] microvm: add second ioapic Gerd Hoffmann
2020-12-03 15:12 ` Sergio Lopez
2020-12-03 10:54 ` [PATCH v3 08/12] tests/acpi: allow updates for expected data files Gerd Hoffmann
2020-12-03 10:54 ` [PATCH v3 09/12] tests/acpi: add data files for ioapic2 test variant Gerd Hoffmann
2020-12-03 10:54 ` [PATCH v3 10/12] tests/acpi: add ioapic2=on test for microvm Gerd Hoffmann
2020-12-03 10:54 ` [PATCH v3 11/12] tests/acpi: update expected data files Gerd Hoffmann
2020-12-03 10:54 ` [PATCH v3 12/12] tests/acpi: disallow updates for " Gerd Hoffmann
2020-12-03 11:01 ` [PATCH v3 00/12] microvm: add second ioapic Michael S. Tsirkin
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=20201203105423.10431-6-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=richard.henderson@linaro.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).