aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2017-11-25 13:16:06 -0200
committerEduardo Habkost <ehabkost@redhat.com>2018-01-19 11:18:51 -0200
commit6f2062b9758ebc64dfbbda642b0c407c38131ea3 (patch)
tree7c64b74eb11471937a8208a850f4a68b3defe095
parent0bd1909da606a60f50128290fc319db020fa303c (diff)
downloadqemu-6f2062b9758ebc64dfbbda642b0c407c38131ea3.zip
qemu-6f2062b9758ebc64dfbbda642b0c407c38131ea3.tar.gz
qemu-6f2062b9758ebc64dfbbda642b0c407c38131ea3.tar.bz2
hw/arm/virt: Allow only supported dynamic sysbus devices
Replace the TYPE_SYS_BUS_DEVICE entry in the allowed sysbus device list with the two device types that are really supported by the virt machine: vfio-amd-xgbe and vfio-calxeda-xgmac. Cc: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-arm@nongnu.org Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20171125151610.20547-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--hw/arm/virt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 7549895..4a6fdcc 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -34,6 +34,8 @@
#include "hw/arm/arm.h"
#include "hw/arm/primecell.h"
#include "hw/arm/virt.h"
+#include "hw/vfio/vfio-calxeda-xgmac.h"
+#include "hw/vfio/vfio-amd-xgbe.h"
#include "hw/devices.h"
#include "net/net.h"
#include "sysemu/block-backend.h"
@@ -1591,8 +1593,8 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
* configuration of the particular instance.
*/
mc->max_cpus = 255;
- /*TODO: allow only sysbus devices that really work with this machine */
- machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SYS_BUS_DEVICE);
+ machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_CALXEDA_XGMAC);
+ machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_AMD_XGBE);
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
mc->pci_allow_0_address = true;