qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Peng Liang <liangpeng10@huawei.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	mst@redhat.com, qemu-devel@nongnu.org, xiexiangyou@huawei.com,
	zhang.zhanghailiang@huawei.com
Subject: Re: [PATCH] ACPI: Avoid infinite recursion when dump-vmstate
Date: Fri, 23 Oct 2020 18:09:33 +0200	[thread overview]
Message-ID: <20201023180933.2fe23875@redhat.com> (raw)
In-Reply-To: <20201019093156.2993284-1-liangpeng10@huawei.com>

On Mon, 19 Oct 2020 17:31:56 +0800
Peng Liang <liangpeng10@huawei.com> wrote:

> There is a field with vmstate_ghes_state as vmsd in vmstate_ghes_state,
> which will lead to infinite recursion in dump_vmstate_vmsd.
> 
> Fixes: a08a64627b ("ACPI: Record the Generic Error Status Block address")
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Peng Liang <liangpeng10@huawei.com>
> ---
>  hw/acpi/generic_event_device.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> index 6df400e1ee16..4b6867300a55 100644
> --- a/hw/acpi/generic_event_device.c
> +++ b/hw/acpi/generic_event_device.c
> @@ -334,8 +334,7 @@ static const VMStateDescription vmstate_ghes_state = {
>      .minimum_version_id = 1,
>      .needed = ghes_needed,
>      .fields      = (VMStateField[]) {
> -        VMSTATE_STRUCT(ghes_state, AcpiGedState, 1,
> -                       vmstate_ghes_state, AcpiGhesState),
> +        VMSTATE_UINT64(ghes_state.ghes_addr_le, AcpiGedState),

not sure its' ok handle it this way,

see how it is done with another structure:

static const VMStateDescription vmstate_ged_state = {                            
    .name = "acpi-ged-state",                                                    
    .version_id = 1,                                                             
    .minimum_version_id = 1,                                                     
    .fields      = (VMStateField[]) {                                            
        VMSTATE_UINT32(sel, GEDState),                                           
        VMSTATE_END_OF_LIST()                                                    
    }                                                                            
}; 

...

VMSTATE_STRUCT(ged_state, AcpiGedState, 1, vmstate_ged_state, GEDState),

i.e. it looks like we are missing structure definition for AcpiGhesState

CCing David,
 to help with migration magic in case I'm wrong or missed something

>          VMSTATE_END_OF_LIST()
>      }
>  };



  reply	other threads:[~2020-10-23 16:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19  9:31 [PATCH] ACPI: Avoid infinite recursion when dump-vmstate Peng Liang
2020-10-23 16:09 ` Igor Mammedov [this message]
2020-10-23 18:54   ` Dr. David Alan Gilbert
2020-10-23 19:23     ` Igor Mammedov
2020-10-26  9:40       ` Dr. David Alan Gilbert
2020-10-26  6:22     ` Peng Liang
2020-11-11 14:01       ` Dr. David Alan Gilbert
2020-11-11 17:13         ` Igor Mammedov
2020-11-11 17:26           ` Dr. David Alan Gilbert
2020-11-12  1:28             ` Peng Liang

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=20201023180933.2fe23875@redhat.com \
    --to=imammedo@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=liangpeng10@huawei.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiexiangyou@huawei.com \
    --cc=zhang.zhanghailiang@huawei.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 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).