aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-06-06 12:26:56 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-04 15:22:04 +0200
commitd8878e4fcaf3dfe591b18a06760831c041402d15 (patch)
treeee9e9bc3d5689c4ac4e398f71f3e445def572088
parent9d01d2e86d450f12f275bd64aeb022e8423e220c (diff)
downloadqemu-d8878e4fcaf3dfe591b18a06760831c041402d15.zip
qemu-d8878e4fcaf3dfe591b18a06760831c041402d15.tar.gz
qemu-d8878e4fcaf3dfe591b18a06760831c041402d15.tar.bz2
accel/hvf: Re-use QOM allocated state
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250606164418.98655-8-philmd@linaro.org>
-rw-r--r--accel/hvf/hvf-all.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
index 9e4012e..df95ba7 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;