Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-28 Thread Paolo Bonzini
Il 27/03/2012 23:21, Zhi Yong Wu ha scritto: Yes, that's correct. Everything that uses PROP_PTR needs to become a But i didn't see that that stuff which uses PROP_PTR become a link in current QEMU code. Yes, that's why I wrote needs to become. In order to use links, you need two things: *

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-28 Thread Zhi Yong Wu
By the way, why have we not add one QOM cookbook to docs? It is very useful for us newbiew to learn. On Wed, Mar 28, 2012 at 2:41 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/03/2012 23:21, Zhi Yong Wu ha scritto: Yes, that's correct.  Everything that uses PROP_PTR needs to become a But

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-28 Thread Paolo Bonzini
Il 28/03/2012 09:53, Zhi Yong Wu ha scritto: By the way, why have we not add one QOM cookbook to docs? It is very useful for us newbiew to learn. Yes, that would be useful. It takes time to write docs unfortunately. :( Paolo

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-28 Thread Zhi Yong Wu
On Wed, Mar 28, 2012 at 4:05 PM, 陳韋任 che...@iis.sinica.edu.tw wrote: Il 28/03/2012 09:53, Zhi Yong Wu ha scritto: By the way, why have we not add one QOM cookbook to docs? It is very useful for us newbiew to learn.  You can write what you learn during this work. This should be a good

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-28 Thread 陳韋任
Il 28/03/2012 09:53, Zhi Yong Wu ha scritto: By the way, why have we not add one QOM cookbook to docs? It is very useful for us newbiew to learn. You can write what you learn during this work. This should be a good start! :) Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab,

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-28 Thread 陳韋任
On Wed, Mar 28, 2012 at 04:25:54PM +0800, Zhi Yong Wu wrote: On Wed, Mar 28, 2012 at 4:05 PM, 陳韋任 che...@iis.sinica.edu.tw wrote: Il 28/03/2012 09:53, Zhi Yong Wu ha scritto: By the way, why have we not add one QOM cookbook to docs? It is very useful for us newbiew to learn.  You can

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Paolo Bonzini
Il 26/03/2012 07:40, zwu.ker...@gmail.com 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 linkNetDev property. Paolo

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Zhi Yong Wu
On Tue, Mar 27, 2012 at 4:23 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 26/03/2012 07:40, zwu.ker...@gmail.com 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

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Paolo Bonzini
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 linkNetDev property. IMHO, i don't fully understand what linkNetDev mean. What is

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Zhi Yong Wu
On Tue, Mar 27, 2012 at 6:15 PM, Paolo Bonzini pbonz...@redhat.com 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

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Paolo Bonzini
Il 27/03/2012 13:59, Zhi Yong Wu ha scritto: On Tue, Mar 27, 2012 at 6:15 PM, Paolo Bonzini pbonz...@redhat.com 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,

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Zhi Yong Wu
On Tue, Mar 27, 2012 at 9:58 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/03/2012 13:59, Zhi Yong Wu ha scritto: On Tue, Mar 27, 2012 at 6:15 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/03/2012 11:06, Zhi Yong Wu ha scritto: +#define DEFINE_HOSTDEV_PROP_PEER(_n, _s, _f)            

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Paolo Bonzini
Il 27/03/2012 16:18, Zhi Yong Wu ha scritto: On Tue, Mar 27, 2012 at 9:58 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/03/2012 13:59, Zhi Yong Wu ha scritto: On Tue, Mar 27, 2012 at 6:15 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/03/2012 11:06, Zhi Yong Wu ha scritto: +#define

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Zhi Yong Wu
On Tue, Mar 27, 2012 at 10:50 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/03/2012 16:18, Zhi Yong Wu ha scritto: On Tue, Mar 27, 2012 at 9:58 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/03/2012 13:59, Zhi Yong Wu ha scritto: On Tue, Mar 27, 2012 at 6:15 PM, Paolo Bonzini

[Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- include/qemu/hostdev.h | 128 ++ qom/Makefile |2 +- qom/hostdev.c | 333 3 files changed, 462

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-25 Thread Zhi Yong Wu
A lot of property get/set functions in qdev-properties.c are related to DeviceState. So i have to copy and modify some of them here to apply our host device model. In the future, we should make those functions more generic. On Mon, Mar 26, 2012 at 1:40 PM, zwu.ker...@gmail.com wrote: From: Zhi