The Machine base class implements TYPE_TARGET_SPECIFIC since
its children will almost all be target specific.

When the 'targets' field is set to a non-zero value on a
machine type, it will block creation of an instance of the
machine unless the current selected target matches. This
allows the current 'is_available' callback to be removed.

Eventually only the 'none' machine is likely to leave the
'targets' field set to 0, since it is universally creatable.

Signed-off-by: Daniel P. Berrangé <[email protected]>
---
 hw/core/machine.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index f7406537aa7..8692365ce89 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -1804,6 +1804,7 @@ static const TypeInfo machine_info = {
     .instance_finalize = machine_finalize,
     .interfaces = (const InterfaceInfo[]) {
         { TYPE_ALIASED },
+        { TYPE_TARGET_SPECIFIC },
         { }
     }
 };
-- 
2.56.1


Reply via email to