* [PATCH-for-7.0] target/i386/hvf: Free ressources when vCPU is destroyed
@ 2022-03-22 19:07 Philippe Mathieu-Daudé
2022-03-23 16:37 ` Philippe Mathieu-Daudé
2022-03-24 8:25 ` Igor Mammedov
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-22 19:07 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Cameron Esfahani, Roman Bolshakov,
Igor Mammedov, Paolo Bonzini
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>
---
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)
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH-for-7.0] target/i386/hvf: Free ressources when vCPU is destroyed
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
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-23 16:37 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Cameron Esfahani, Roman Bolshakov,
Igor Mammedov, Paolo Bonzini
Typo s/ressources/resources/ in subject.
On 22/3/22 20:07, Philippe Mathieu-Daudé 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>
> ---
> 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH-for-7.0] target/i386/hvf: Free ressources when vCPU is destroyed
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
1 sibling, 0 replies; 3+ messages in thread
From: Igor Mammedov @ 2022-03-24 8:25 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Cameron Esfahani, Philippe Mathieu-Daudé,
Roman Bolshakov, Paolo Bonzini
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-24 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).