From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCXjH-0006Ht-5X for qemu-devel@nongnu.org; Tue, 27 Mar 2012 10:50:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCXjA-0004EL-Nm for qemu-devel@nongnu.org; Tue, 27 Mar 2012 10:50:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCXjA-0004Dt-FY for qemu-devel@nongnu.org; Tue, 27 Mar 2012 10:50:28 -0400 Message-ID: <4F71D3A3.5030506@redhat.com> Date: Tue, 27 Mar 2012 16:50:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1332740423-8426-1-git-send-email-zwu.kernel@gmail.com> <1332740423-8426-2-git-send-email-zwu.kernel@gmail.com> <4F71791C.1060601@redhat.com> <4F719328.8010409@redhat.com> <4F71C79F.8000505@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: Zhi Yong Wu , qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Il 27/03/2012 16:18, Zhi Yong Wu ha scritto: > On Tue, Mar 27, 2012 at 9:58 PM, Paolo Bonzini wrote: >> Il 27/03/2012 13:59, Zhi Yong Wu ha scritto: >>> On Tue, Mar 27, 2012 at 6:15 PM, Paolo Bonzini wrote: >>>> Il 27/03/2012 11:06, Zhi Yong Wu ha scritto: >>>>>>>>> +#define DEFINE_HOSTDEV_PROP_PEER(_n, _s, _f) \ >>>>>>>>> + DEFINE_HOSTDEV_PROP(_n, _s, _f, hostdev_prop_netdev, NetClientState*) >>>>>>> >>>>>>> This should be simply a link property. >>>>> IMHO, i don't fully understand what link mean. What is the >>>>> difference between it and Child. Can you elaborate this? >>>> >>>> link is a pointer to another object. child means that >>> Where are link used? >> >> The peer property needs to be one. > sorry, i don't get what it means. Links are pointers. As you convert host devices to QOM, pointer properties such as drive or chardev need to become links. Peer is another pointer property that needs to become a link. >>> what is relationship between the two objects? >> >> A has a pointer to B. > > I knew this, but can you say one example in QEMU device model? I > checked QEMU code, and found that those link functions in object.c are > not currently used. right? Yes, that's correct. Everything that uses PROP_PTR needs to become a link. We cannot do that yet because devices do not yet have a canonical path. >>> Moreover, -device has exposed network card info. >> >> ... this is extremely confused. Each NIC device has a NIC-type >> NetClientState. If NetClientState is converted to QOM, all of its > The original idea about -netdev QOM is to convert NetClientState to > QOM, but now this idea seems to be changed. I cannot parse this at all. You have not converted all of NetClientState to QOM, have you? >>> We hope that -netdev options info can be configurated or changed >>> purely via QOM, not command line. >> >> Yes, but does it buy anything or it is just a nice exercise? > > buy anything? sorry, i don't understand this. What's the advantage? Converting chardev would give hotplug. What can we do with a QOMified netdev that we cannot do now? Paolo