On Fri, Mar 10, 2017 at 09:33:57AM +0100, Paolo Bonzini wrote:
> 
> 
> On 10/03/2017 05:13, Peter Xu wrote:
> > Trying to get memory region size of an uninitialized memory region is
> > probably not a good idea. Let's just do the alloc no matter what.
> > 
> > Signed-off-by: Peter Xu <pet...@redhat.com>
> 
> What is the effect of the bug? The idea was to do the initialization
> once only (memory_region_size ought to be 0 when the MR is
> uninitialized; now it is ugly but it made more sense when MemoryRegion
> was just a C struct and not a QOM object).

It's not really a bug. I just saw it, thought it was something not
quite right, so posted a patch. Since it's intended, then please
ignore this patch, and sorry for the noise... :)

(Considering it's a QOM object, it'll better explain itself if we were
 using something like object_initialized() here for the check, but
 since we don't have that, I think fetching size is okay as well)

Thanks,

-- peterx

Reply via email to