qemu-trivial
[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: Philippe Mathieu-Daudé
Subject: Re: [PATCH] hw/i386/sgx: Use QDev API
Date: Thu, 15 Feb 2024 15:07:33 +0100
User-agent: Mozilla Thunderbird

On 15/2/24 10:31, Michael Tokarev wrote:
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 was surprised because all my local tests passed, but then I
realized 'config SGX depends on KVM' and I'm on Darwin... Sorry.


I'd say a v2 is in order.

/mjt





reply via email to

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