aboutsummaryrefslogtreecommitdiff
path: root/include/hw/i386
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-09-28 12:42:49 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-09-30 11:29:56 +0200
commit24db877ab6e6dc999016f1f29e59c7eb1539f5d3 (patch)
tree28c49e12f78e90557f805c821daa7bbbb531c648 /include/hw/i386
parentebf187757048e972eea1054cb1b5b54a3e47356b (diff)
downloadqemu-24db877ab6e6dc999016f1f29e59c7eb1539f5d3.zip
qemu-24db877ab6e6dc999016f1f29e59c7eb1539f5d3.tar.gz
qemu-24db877ab6e6dc999016f1f29e59c7eb1539f5d3.tar.bz2
microvm: add pcie support
Uses the existing gpex device which is also used as pcie host bridge on arm/aarch64. For now only a 32bit mmio window and no ioport support. It is disabled by default, use "-machine microvm,pcie=on" to enable. ACPI support must be enabled too because the bus is declared in the DSDT table. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20200928104256.9241-6-kraxel@redhat.com
Diffstat (limited to 'include/hw/i386')
-rw-r--r--include/hw/i386/microvm.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h
index 0d61697..91b0645 100644
--- a/include/hw/i386/microvm.h
+++ b/include/hw/i386/microvm.h
@@ -25,6 +25,7 @@
#include "hw/boards.h"
#include "hw/i386/x86.h"
#include "hw/acpi/acpi_dev_interface.h"
+#include "hw/pci-host/gpex.h"
#include "qom/object.h"
/*
@@ -42,10 +43,10 @@
* 9 | acpi | acpi (ged)
* 10 | pci lnk |
* 11 | pci lnk |
- * 12 | ps2 |
- * 13 | fpu |
- * 14 | ide 0 |
- * 15 | ide 1 |
+ * 12 | ps2 | pcie
+ * 13 | fpu | pcie
+ * 14 | ide 0 | pcie
+ * 15 | ide 1 | pcie
* 16-23 | pci gsi | virtio
*/
@@ -59,10 +60,17 @@
#define GED_MMIO_BASE_REGS (GED_MMIO_BASE + 0x200)
#define GED_MMIO_IRQ 9
+#define PCIE_MMIO_BASE 0xc0000000
+#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"
#define MICROVM_MACHINE_PIC "pic"
#define MICROVM_MACHINE_RTC "rtc"
+#define MICROVM_MACHINE_PCIE "pcie"
#define MICROVM_MACHINE_ISA_SERIAL "isa-serial"
#define MICROVM_MACHINE_OPTION_ROMS "x-option-roms"
#define MICROVM_MACHINE_AUTO_KERNEL_CMDLINE "auto-kernel-cmdline"
@@ -80,6 +88,7 @@ struct MicrovmMachineState {
OnOffAuto pic;
OnOffAuto pit;
OnOffAuto rtc;
+ OnOffAuto pcie;
bool isa_serial;
bool option_roms;
bool auto_kernel_cmdline;
@@ -89,6 +98,7 @@ struct MicrovmMachineState {
bool kernel_cmdline_fixed;
Notifier machine_done;
Notifier powerdown_req;
+ struct GPEXConfig gpex;
};
#define TYPE_MICROVM_MACHINE MACHINE_TYPE_NAME("microvm")