qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()


From: Cao jin
Subject: Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()
Date: Mon, 21 Dec 2015 18:39:22 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi Paolo

On 12/20/2015 07:38 PM, Cao jin wrote:
Hi

On 12/19/2015 02:01 AM, Paolo Bonzini wrote:


On 18/12/2015 12:03, Cao jin wrote:
[...]
+
+err_register_bus:
+    object_unref(OBJECT(ds));
+    object_unref(OBJECT(bds));
+    object_unref(OBJECT(bus));

I think these should be object_unparent, not unref.


But, it seems these 3 objects isn`t added as a child-property via
object_property_add_child() during creation, so OBJECT(ds)->parent(so
does the other 2) will be NULL, and so object_unparent will do nothing?

Or am I missing something?


I finally find what I missed...Yes you are right...In qom, seems all devices are attached to container:"peripheral", or "peripheral-anon", or "unattached" or anything I don`t see until now...Thanks a lot:)

Paolo

  }

  static void pxb_dev_exitfn(PCIDevice *pci_dev)
@@ -259,7 +263,7 @@ static void pxb_dev_class_init(ObjectClass
*klass, void *data)
      DeviceClass *dc = DEVICE_CLASS(klass);
      PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);

-    k->init = pxb_dev_initfn;
+    k->realize = pxb_dev_realize;
      k->exit = pxb_dev_exitfn;
      k->vendor_id = PCI_VENDOR_ID_REDHAT;
      k->device_id = PCI_DEVICE_ID_REDHAT_PXB;



.



--
Yours Sincerely,

Cao Jin





reply via email to

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