Re: [Qemu-devel] [PATCH v3.1 25/31] hostmem: add properties for NUMA memory policy

2014-06-08 Thread Hu Tao
On Fri, Jun 06, 2014 at 01:15:28PM -0300, Eduardo Habkost wrote: > On Fri, Jun 06, 2014 at 11:37:26AM +0800, Hu Tao wrote: > > On Mon, May 19, 2014 at 08:34:54PM -0300, Eduardo Habkost wrote: > > > On Tue, May 06, 2014 at 05:27:46PM +0800, Hu Tao wrote: > > > [...] > > > > @@ -203,6 +296,20 @@ host

Re: [Qemu-devel] [PATCH v3.1 25/31] hostmem: add properties for NUMA memory policy

2014-06-06 Thread Eduardo Habkost
On Fri, Jun 06, 2014 at 11:37:26AM +0800, Hu Tao wrote: > On Mon, May 19, 2014 at 08:34:54PM -0300, Eduardo Habkost wrote: > > On Tue, May 06, 2014 at 05:27:46PM +0800, Hu Tao wrote: > > [...] > > > @@ -203,6 +296,20 @@ host_memory_backend_memory_init(UserCreatable *uc, > > > Error **errp) > > >

Re: [Qemu-devel] [PATCH v3.1 25/31] hostmem: add properties for NUMA memory policy

2014-06-05 Thread Hu Tao
On Mon, May 19, 2014 at 08:34:54PM -0300, Eduardo Habkost wrote: > On Tue, May 06, 2014 at 05:27:46PM +0800, Hu Tao wrote: > [...] > > @@ -203,6 +296,20 @@ host_memory_backend_memory_init(UserCreatable *uc, > > Error **errp) > > if (backend->prealloc) { > > os_mem_prealloc(memory_reg

Re: [Qemu-devel] [PATCH v3.1 25/31] hostmem: add properties for NUMA memory policy

2014-05-19 Thread Eduardo Habkost
On Tue, May 06, 2014 at 05:27:46PM +0800, Hu Tao wrote:\ [...] > +static void > +set_host_nodes(Object *obj, Visitor *v, void *opaque, const char *name, > + Error **errp) > +{ > +#ifdef CONFIG_NUMA > +HostMemoryBackend *backend = MEMORY_BACKEND(obj); > +uint16List *l = NULL; >

Re: [Qemu-devel] [PATCH v3.1 25/31] hostmem: add properties for NUMA memory policy

2014-05-19 Thread Eduardo Habkost
On Tue, May 06, 2014 at 05:27:46PM +0800, Hu Tao wrote: [...] > @@ -203,6 +296,20 @@ host_memory_backend_memory_init(UserCreatable *uc, Error > **errp) > if (backend->prealloc) { > os_mem_prealloc(memory_region_get_fd(&backend->mr), ptr, sz); > } > + > +#ifdef CONFIG_NUMA > +

[Qemu-devel] [PATCH v3.1 25/31] hostmem: add properties for NUMA memory policy

2014-05-06 Thread Hu Tao
Signed-off-by: Hu Tao [Raise errors on setting properties if !CONFIG_NUMA. Add BUILD_BUG_ON checks. - Paolo] Signed-off-by: Paolo Bonzini Signed-off-by: Hu Tao --- backends/hostmem.c | 109 ++- include/sysemu/hostmem.h | 4 ++ qapi-schema.j