This wires up the DeviceClass types to have their
security checked when devices are created.

Signed-off-by: Daniel P. BerrangĂ© <[email protected]>
---
 system/qdev-monitor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c
index 2ac92d0a07..f99907a311 100644
--- a/system/qdev-monitor.c
+++ b/system/qdev-monitor.c
@@ -644,6 +644,10 @@ DeviceState *qdev_device_add_from_qdict(const QDict *opts,
         return NULL;
     }
 
+    if (!machine_check_security(current_machine, OBJECT_CLASS(dc), errp)) {
+        return NULL;
+    }
+
     /* find bus */
     path = qdict_get_try_str(opts, "bus");
     if (path != NULL) {
-- 
2.50.1


Reply via email to