All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Thomas Huth <thuth@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] target/xtensa/cpu: Set owner of memory region in xtensa_cpu_initfn
Date: Tue, 7 Aug 2018 10:09:06 +0100	[thread overview]
Message-ID: <CAFEAcA-sP3mABockFiMDO2FGkW4=LHZQVm8jzVMgmZ2HePZjcA@mail.gmail.com> (raw)
In-Reply-To: <1532005320-17794-1-git-send-email-thuth@redhat.com>

On 19 July 2018 at 14:02, Thomas Huth <thuth@redhat.com> wrote:
> The instance_init function of the xtensa CPUs creates a memory region,
> but does not set an owner, so the memory region is not destroyed
> correctly when the CPU object is removed. This can happen when
> introspecting the CPU devices, so introspecting the CPU device will
> leave a dangling memory region object in the QOM tree. Make sure to
> set the right owner here to fix this issue.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  target/xtensa/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
> index b50c840..590813d 100644
> --- a/target/xtensa/cpu.c
> +++ b/target/xtensa/cpu.c
> @@ -149,7 +149,7 @@ static void xtensa_cpu_initfn(Object *obj)
>  #ifndef CONFIG_USER_ONLY
>      env->address_space_er = g_malloc(sizeof(*env->address_space_er));
>      env->system_er = g_malloc(sizeof(*env->system_er));
> -    memory_region_init_io(env->system_er, NULL, NULL, env, "er",
> +    memory_region_init_io(env->system_er, obj, NULL, env, "er",
>                            UINT64_C(0x100000000));
>      address_space_init(env->address_space_er, env->system_er, "ER");
>  #endif
> --

Applied to master for rc4, thanks.

-- PMM

      parent reply	other threads:[~2018-08-07  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 13:02 [Qemu-devel] [PATCH] target/xtensa/cpu: Set owner of memory region in xtensa_cpu_initfn Thomas Huth
2018-07-20  2:35 ` Max Filippov
2018-08-07  9:09 ` Peter Maydell [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='CAFEAcA-sP3mABockFiMDO2FGkW4=LHZQVm8jzVMgmZ2HePZjcA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.