qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/i386/sgx: Use QDev API


From: Michael Tokarev
Subject: Re: [PATCH] hw/i386/sgx: Use QDev API
Date: Thu, 15 Feb 2024 12:31:09 +0300
User-agent: Mozilla Thunderbird

13.02.2024 10:16, Philippe Mathieu-Daudé :
Prefer the QDev API over the low level QOM one.
No logical change intended.
...
          /* set the numa node property for sgx epc object */
-        object_property_set_uint(obj, SGX_EPC_NUMA_NODE_PROP, 
list->value->node,
-                             &error_fatal);
-        object_property_set_bool(obj, "realized", true, &error_fatal);
-        object_unref(obj);
+        object_property_set_uint(OBJECT(dev), SGX_EPC_NUMA_NODE_PROP,
+                                 list->value->node, &error_fatal);
+        qdev_realize_and_unref(dev, &error_fatal);

This does not work.  Here's the function prototype:

 bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp);

I'd say a v2 is in order.

/mjt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]