qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/27] add memdev backend infrastructure


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 07/27] add memdev backend infrastructure
Date: Mon, 25 Nov 2013 17:01:58 +0100

On Mon, 25 Nov 2013 13:54:10 +0100
Paolo Bonzini <address@hidden> wrote:

> Il 21/11/2013 03:38, Igor Mammedov ha scritto:
> > +
> > +    /* verify properties correctnes and initialize backend */
> > +    bc = MEMORY_BACKEND_GET_CLASS(obj);
> > +    if (bc->get_memory) {
> > +        HostMemoryBackend *backend = MEMORY_BACKEND(obj);
> > +        if (!bc->get_memory(backend, &local_err)) {
> > +            goto out;
> > +        }
> > +    }
> 
> So this is why you need a new command-line option.
> 
> I think we need a generic mechanism for post-initialization of whatever
> is given on the command line.  Perhaps you can do that with an
> interface, and get rid of -memdev and memdev_add altogether?
> 
> MemoryBackend's implementation of the interface's sole method would call
> get_memory, of course.

What I would use instead of memdev_add in CLI/HMP/QMP?
Could you explain it a bit more, please?

> Paolo
> 
> > +    /* make backend available to the world via QOM tree */
> > +    object_property_add_child(container_get(qemu_get_backend(), "/memdev"),
> > +                              qemu_opts_id(opts), obj, &local_err);
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]