[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] migration: drop unused VMStateField.star
From: |
Halil Pasic |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] migration: drop unused VMStateField.start |
Date: |
Mon, 30 Jan 2017 16:28:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 10/20/2016 03:25 PM, Halil Pasic wrote:
> diff --git a/migration/vmstate.c b/migration/vmstate.c
> index fc29acf..8767e40 100644
> --- a/migration/vmstate.c
> +++ b/migration/vmstate.c
> @@ -66,10 +66,10 @@ static void *vmstate_base_addr(void *opaque, VMStateField
> *field, bool alloc)
> }
> }
> if (size) {
> - *((void **)base_addr + field->start) = g_malloc(size);
> + *(void **)base_addr = g_malloc(size);
> }
> }
> - base_addr = *(void **)base_addr + field->start;
> + base_addr = *(void **)base_addr;
> }
>
> return base_addr;
Hi!
It is been a while, and IMHO this is still broken, and the
VMSTATE_VBUFFER* macros are still only used with the start argument
being zero.
What changed is that with commit 94869d5c ("migration: migrate QTAILQ")
from Jan 19 we have code actually using VMStateDecription.start -- but
for something different (IMHO), as allocation is done by get_qtailq and
not by vmstate_base_addr (as in case of VMSTATE_VBUFFER_ALLOC_UINT32).
Thus I would need to update the commit message and keep the start field
at least.
But before I do so, I would like to ask the maintainers if there is
interest in a change like this?
Regards,
Halil
- Re: [Qemu-devel] [PATCH v2 2/2] migration: drop unused VMStateField.start,
Halil Pasic <=