summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Habkost2017-11-25 16:16:10 +0100
committerEduardo Habkost2018-01-19 14:18:51 +0100
commitef18310d5495c4ce0e1289ed7fc9833d73fe5ee1 (patch)
tree690357034410f1024c2ad4e92f48f2bd418f49cb
parentxen: Add only xen-sysdev to dynamic sysbus device list (diff)
downloadqemu-ef18310d5495c4ce0e1289ed7fc9833d73fe5ee1.tar.gz
qemu-ef18310d5495c4ce0e1289ed7fc9833d73fe5ee1.tar.xz
qemu-ef18310d5495c4ce0e1289ed7fc9833d73fe5ee1.zip
q35: Allow only supported dynamic sysbus devices
The only user-creatable sysbus devices in qemu-system-x86_64 are amd-iommu, intel-iommu, and xen-backend. xen-backend is handled by xen_set_dynamic_sysbus(), so we only need to add amd-iommu and intel-iommu. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20171125151610.20547-7-ehabkost@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--hw/i386/pc_q35.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 0505730a99..ed3a0b8ff7 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -42,6 +42,8 @@
#include "exec/address-spaces.h"
#include "hw/i386/pc.h"
#include "hw/i386/ich9.h"
+#include "hw/i386/amd_iommu.h"
+#include "hw/i386/intel_iommu.h"
#include "hw/smbios/smbios.h"
#include "hw/ide/pci.h"
#include "hw/ide/ahci.h"
@@ -299,8 +301,8 @@ static void pc_q35_machine_options(MachineClass *m)
m->default_machine_opts = "firmware=bios-256k.bin";
m->default_display = "std";
m->no_floppy = 1;
- /*TODO: allow only sysbus devices that really work with this machine */
- machine_class_allow_dynamic_sysbus_dev(m, TYPE_SYS_BUS_DEVICE);
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE);
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
m->max_cpus = 288;
}