mirror of https://github.com/xqemu/xqemu.git
![]() Currently it's possible to crash QEMU using "-device *-iommu" and "-machine none": $ qemu-system-x86_64 -machine none -device amd-iommu qemu/hw/i386/amd_iommu.c:1140:amdvi_realize: Object 0x55627dafbc90 is not an instance of type generic-pc-machine Aborted (core dumped) $ qemu-system-x86_64 -machine none -device intel-iommu qemu/hw/i386/intel_iommu.c:2972:vtd_realize: Object 0x56292ec0bc90 is not an instance of type generic-pc-machine Aborted (core dumped) Fix amd-iommu and intel-iommu to ensure the current machine is really a TYPE_PC_MACHINE instance at their realize methods. Resulting error messages: $ qemu-system-x86_64 -machine none -device amd-iommu qemu-system-x86_64: -device amd-iommu: Machine-type 'none' not supported by amd-iommu $ qemu-system-x86_64 -machine none -device intel-iommu qemu-system-x86_64: -device intel-iommu: Machine-type 'none' not supported by intel-iommu Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> |
||
---|---|---|
.. | ||
kvm | ||
xen | ||
Makefile.objs | ||
acpi-build.c | ||
acpi-build.h | ||
amd_iommu.c | ||
amd_iommu.h | ||
intel_iommu.c | ||
intel_iommu_internal.h | ||
kvmvapic.c | ||
multiboot.c | ||
multiboot.h | ||
pc.c | ||
pc_piix.c | ||
pc_q35.c | ||
pc_sysfw.c | ||
pci-assign-load-rom.c | ||
trace-events | ||
x86-iommu.c |