On (Wed) 08 Jul 2015 [12:41:35], Michael S. Tsirkin wrote:
> From: Paulo Alcantara <pca...@gmail.com>
> 
> This interface provides some registers within a 32-byte range and can be
> acessed through PCI-to-LPC bridge interface (PMBASE + 0x60).
> 
> It's commonly used as a watchdog timer to detect system lockups through
> SMIs that are generated -- if TCO_EN bit is set -- on every timeout. If
> NO_REBOOT bit is not set in GCS (General Control and Status register),
> the system will be resetted upon second timeout if TCO_RLD register
> wasn't previously written to prevent timeout.
> 
> This patch adds support to TCO watchdog logic and few other features
> like mapping NMIs to SMIs (NMI2SMI_EN bit), system intruder detection,
> etc. are not implemented yet.
> 
> Signed-off-by: Paulo Alcantara <pca...@zytor.com>
> Reviewed-by: Michael S. Tsirkin <m...@redhat.com>
> Signed-off-by: Michael S. Tsirkin <m...@redhat.com>

> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index f4dc7a8..5fb7a87 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c

>  const VMStateDescription vmstate_ich9_pm = {
>      .name = "ich9_pm",
>      .version_id = 1,
> @@ -179,6 +207,10 @@ const VMStateDescription vmstate_ich9_pm = {
>      .subsections = (const VMStateDescription*[]) {
>          &vmstate_memhp_state,
>          NULL
> +    },
> +    .subsections = (const VMStateDescription*[]) {
> +        &vmstate_tco_io_state,
> +        NULL
>      }
>  };

This isn't the right way to add subsections - vmstate_tco_io_state
should go inside the existing .subsections array.  The effect this
commit has is that vmstate_memhp_state is not registered as a
subsection anymore.

Please fix.

Spotted by the static checker.

                Amit

Reply via email to