From d8878e4fcaf3dfe591b18a06760831c041402d15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 6 Jun 2025 12:26:56 +0200 Subject: [PATCH] accel/hvf: Re-use QOM allocated state MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250606164418.98655-8-philmd@linaro.org> --- accel/hvf/hvf-all.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 9e4012e2d10..df95ba74d6e 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -251,7 +251,7 @@ static int hvf_accel_init(AccelState *as, MachineState *ms) { int x; hv_return_t ret; - HVFState *s; + HVFState *s = HVF_STATE(as); int pa_range = 36; MachineClass *mc = MACHINE_GET_CLASS(ms); @@ -270,8 +270,6 @@ static int hvf_accel_init(AccelState *as, MachineState *ms) } assert_hvf_ok(ret); - s = g_new0(HVFState, 1); - s->num_slots = ARRAY_SIZE(s->slots); for (x = 0; x < s->num_slots; ++x) { s->slots[x].size = 0; -- 2.47.3