Re: [Qemu-devel] [PATCH 1/2][RFC] qom: introduce cpu QOM hierarchy tree /machine/node/socket/core/thread/cpu.

2014-02-27 Thread Chen Fan
On Wed, 2014-02-26 at 15:52 -0300, Eduardo Habkost wrote: > On Tue, Feb 25, 2014 at 05:07:31PM +0800, Chen Fan wrote: > [...] > > +Object *object_get_thread_from_index(int64_t cpu_index) > > Probably the code that is going to call this function already knows what > will be the node/socket/core/thr

Re: [Qemu-devel] [PATCH 1/2][RFC] qom: introduce cpu QOM hierarchy tree /machine/node/socket/core/thread/cpu.

2014-02-26 Thread Eduardo Habkost
On Tue, Feb 25, 2014 at 05:07:31PM +0800, Chen Fan wrote: [...] > +Object *object_get_thread_from_index(int64_t cpu_index) Probably the code that is going to call this function already knows what will be the node/socket/core/thread IDs for the CPU. And if it doesn't, we need to make the code node-

Re: [Qemu-devel] [PATCH 1/2][RFC] qom: introduce cpu QOM hierarchy tree /machine/node/socket/core/thread/cpu.

2014-02-25 Thread Chen Fan
On Tue, 2014-02-25 at 06:35 -0700, Eric Blake wrote: > On 02/25/2014 02:07 AM, Chen Fan wrote: > > Signed-off-by: Chen Fan > > --- > > include/qom/node.h | 66 +++ > > qom/Makefile.objs | 2 +- > > qom/node.c | 156 > > +

Re: [Qemu-devel] [PATCH 1/2][RFC] qom: introduce cpu QOM hierarchy tree /machine/node/socket/core/thread/cpu.

2014-02-25 Thread Eric Blake
On 02/25/2014 02:07 AM, Chen Fan wrote: > Signed-off-by: Chen Fan > --- > include/qom/node.h | 66 +++ > qom/Makefile.objs | 2 +- > qom/node.c | 156 > + > 3 files changed, 223 insertions(+), 1 deletion(-) > cr

[Qemu-devel] [PATCH 1/2][RFC] qom: introduce cpu QOM hierarchy tree /machine/node/socket/core/thread/cpu.

2014-02-25 Thread Chen Fan
Signed-off-by: Chen Fan --- include/qom/node.h | 66 +++ qom/Makefile.objs | 2 +- qom/node.c | 156 + 3 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 include/qom/node.h create mode 100644 q