From: Peter Xu <peterx@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Igor Mammedov <imammedo@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hostmem: fix reference to uninit mr
Date: Fri, 10 Mar 2017 16:59:17 +0800 [thread overview]
Message-ID: <20170310085917.GF17299@pxdev.xzpeter.org> (raw)
In-Reply-To: <da6200fe-c0ac-00bb-d0b7-dbf3c5a8a21f@redhat.com>
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 <peterx@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
next prev parent reply other threads:[~2017-03-10 8:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 4:13 [Qemu-devel] [PATCH] hostmem: fix reference to uninit mr Peter Xu
2017-03-10 8:33 ` Paolo Bonzini
2017-03-10 8:59 ` Peter Xu [this message]
2017-03-10 9:17 ` Peter Maydell
2017-03-10 9:36 ` Peter Xu
2017-03-10 10:06 ` Paolo Bonzini
2017-03-10 9:19 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170310085917.GF17299@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).