qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>, "Peter Xu" <peterx@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] exec.c: check RAMBlock validity before changing its flag
Date: Thu, 5 Jul 2018 14:01:42 +0200	[thread overview]
Message-ID: <250b3fa9-6321-e1b1-35e5-c7fdaa6ef6d7@redhat.com> (raw)
In-Reply-To: <16ec29ab-a5ec-a68a-91d0-2c63838d0695@kaod.org>

On 05/07/2018 07:56, Cédric Le Goater wrote:
> Hello Paolo,
> 
> On 07/04/2018 02:16 PM, Paolo Bonzini wrote:
>> On 04/07/2018 11:55, Peter Xu wrote:
>>>>     commit b0e56e0b63f350691b52d3e75e89bb64143fbeff
>>>>     Author: Hu Tao <hutao@cn.fujitsu.com>
>>>>     Date:   Wed Apr 2 15:13:27 2014 +0800
>>>>
>>>>     unset RAMBlock idstr when unregister MemoryRegion
>>>>
>>>>     Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
>>>>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>>
>>>> whose commit message is a bit lacking, but
>>>> http://lists.gnu.org/archive/html/qemu-devel/2014-04/msg00282.html helps
>>>> more.  It seems like the original bug was a reference count issue.
>>>>
>>>> Clearing the new migratable flag should also be unnecessary.
>>> But even if we get rid of vmstate_unregister_ram(), the leak could
>>> still be there?
>>>
>>> I'm not sure what was leaked when b0e56e0b6 was introduced, I feel
>>> like it's the RAMBlock of the memdev.  Here I think the ROM memory
>>> region seems to be leaked as well (along with the RAMBlock inside)?
>>
>> The leak would be another bug that vmstate_unregister_ram is just
>> papering over.  We need to test memory unplug with
>> vmstate_unregister_ram removed, and fix bugs if any.
> 
> So for the time being, you would just get rid of pci_del_option_rom()
> which only does vmstate_unregister_ram() ? 

Yes, I think so.

Paolo

      reply	other threads:[~2018-07-05 12:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-01 17:19 [Qemu-devel] [PATCH] exec.c: check RAMBlock validity before changing its flag Cédric Le Goater
2018-07-02  3:57 ` Peter Xu
2018-07-03 12:45   ` Cédric Le Goater
2018-07-04  2:26     ` Peter Xu
2018-07-04  6:42       ` Cédric Le Goater
2018-07-04  9:34         ` Paolo Bonzini
2018-07-04  9:55           ` Peter Xu
2018-07-04 12:16             ` Paolo Bonzini
2018-07-05  5:56               ` Cédric Le Goater
2018-07-05 12:01                 ` Paolo Bonzini [this message]

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=250b3fa9-6321-e1b1-35e5-c7fdaa6ef6d7@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@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).