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
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)
> > >
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
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;
>
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
> +
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