From: Igor Mammedov <imammedo@redhat.com>
To: "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>
Cc: qemu-devel@nongnu.org, "Cameron Esfahani" <dirty@apple.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Roman Bolshakov" <r.bolshakov@yadro.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH-for-7.0] target/i386/hvf: Free ressources when vCPU is destroyed
Date: Thu, 24 Mar 2022 09:25:37 +0100 [thread overview]
Message-ID: <20220324092537.63991c50@redhat.com> (raw)
In-Reply-To: <20220322190745.37727-1-philippe.mathieu.daude@gmail.com>
On Tue, 22 Mar 2022 20:07:45 +0100
Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Both xsave_buf and hvf_caps are allocated in hvf_arch_init_vcpu(),
> free them in hvf_arch_vcpu_destroy().
>
> Reported-by: Mark Kanda <mark.kanda@oracle.com>
> Suggested-by: Igor Mammedov <imammedo@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> target/i386/hvf/hvf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
> index fc12c02fb2..39fa4641b9 100644
> --- a/target/i386/hvf/hvf.c
> +++ b/target/i386/hvf/hvf.c
> @@ -163,7 +163,9 @@ void hvf_arch_vcpu_destroy(CPUState *cpu)
> X86CPU *x86_cpu = X86_CPU(cpu);
> CPUX86State *env = &x86_cpu->env;
>
> + g_free(env->xsave_buf);
> g_free(env->hvf_mmio_buf);
> + g_free(hvf_state->hvf_caps);
> }
>
> static void init_tsc_freq(CPUX86State *env)
prev parent reply other threads:[~2022-03-24 8:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 19:07 [PATCH-for-7.0] target/i386/hvf: Free ressources when vCPU is destroyed Philippe Mathieu-Daudé
2022-03-23 16:37 ` Philippe Mathieu-Daudé
2022-03-24 8:25 ` Igor Mammedov [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=20220324092537.63991c50@redhat.com \
--to=imammedo@redhat.com \
--cc=dirty@apple.com \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
--cc=philippe.mathieu.daude@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=r.bolshakov@yadro.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.