qemu-patch-raspberry4/hw
Mohammed Gamal a0c167a184 x86_iommu: check if machine has PCI bus
Starting qemu with
qemu-system-x86_64 -S -M isapc -device {amd|intel}-iommu
leads to a segfault. The code assume PCI bus is present and
tries to access the bus structure without checking.

Since Intel VT-d and AMDVI should only work with PCI, add a
check for PCI bus and return error if not present.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
2018-01-18 21:52:38 +02:00
..
9pfs 9pfs: deprecate handle backend 2018-01-08 11:18:23 +01:00
acpi Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
adc maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
alpha Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
arm hw/arm/virt: Add virt-2.12 machine type 2018-01-16 13:28:10 +00:00
audio misc: remove old i386 dependency 2017-12-18 17:07:02 +03:00
block vhost-user-blk: introduce a new vhost-user-blk host device 2018-01-18 21:52:37 +02:00
bt
char maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
core Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
cpu hw: use "qemu/osdep.h" as first #include in source files 2017-12-18 17:07:02 +03:00
cris
display * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
dma maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
gpio
i2c * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
i386 x86_iommu: check if machine has PCI bus 2018-01-18 21:52:38 +02:00
ide hw/ide: Emulate SiI3112 SATA controller 2018-01-10 12:53:00 +11:00
input Split adb.c into adb.c, adb-mouse.c and adb-kbd.c 2017-12-21 20:11:28 +01:00
intc hw/intc/armv7m: Support byte and halfword accesses to CFSR 2018-01-16 13:28:09 +00:00
ipack
ipmi hw/ipmi: remove old i386 dependency 2017-12-18 17:07:02 +03:00
isa Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
lm32
m68k
mem spapr: replace numa_get_node() with lookup in pc-dimm list 2017-12-15 09:49:24 +11:00
microblaze
mips Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
misc maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
moxie hw/moxie/moxiesim: Add support for loading a BIOS on moxiesim 2017-12-21 09:30:31 +01:00
net * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
nios2 nios2: remove duplicated includes (in code commented out) 2017-12-18 17:07:02 +03:00
nvram mips: fix potential fopen(NULL,...) 2018-01-16 14:54:50 +01:00
openrisc
pci pci/shpc: Move function to generic header file 2018-01-18 21:52:38 +02:00
pci-bridge hw/pci-bridge: fix QEMU crash because of pcie-root-port 2018-01-18 21:52:38 +02:00
pci-host Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
pcmcia
ppc ppc/pnv: change initrd address 2018-01-17 09:35:24 +11:00
s390x Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
scsi * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
sd sdhci: add a 'dma' property to the sysbus devices 2018-01-16 13:28:21 +00:00
sh4 pci: Rename root bus initialization functions for clarity 2017-12-05 19:13:45 +02:00
smbios Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
sparc sun4m: remove include/hw/sparc/sun4m.h and all references to it 2018-01-09 21:48:20 +00:00
sparc64 sun4u_iommu: add trace event for IOMMU translations 2018-01-09 21:48:20 +00:00
ssi maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
timer maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
tpm maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
tricore tricore: use generic cpu_model parsing 2017-10-27 16:04:27 +02:00
unicore32 hw/unicore32: restrict hw addr defines to source file 2017-12-18 17:07:02 +03:00
usb Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
vfio Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
virtio virtio: improve virtio devices initialization time 2018-01-18 21:52:38 +02:00
watchdog misc: drop old i386 dependency 2017-12-18 17:07:03 +03:00
xen Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
xenpv
xtensa
Makefile.objs