All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, f4bug@amsat.org, aurelien@aurel32.net,
	jiaxun.yang@flygoat.com, ani@anisinha.ca, mst@redhat.com
Subject: Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM
Date: Fri, 29 Jul 2022 10:09:49 +0200	[thread overview]
Message-ID: <20220729100949.34b20fda@redhat.com> (raw)
In-Reply-To: <CAFEAcA-Bzbw6MY2kir5fWezQmet6BWD=B+qS6uetsxRvPbdyCQ@mail.gmail.com>

On Thu, 28 Jul 2022 16:04:58 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:

> On Thu, 28 Jul 2022 at 15:44, Dr. David Alan Gilbert
> <dgilbert@redhat.com> wrote:
> >
> > * Igor Mammedov (imammedo@redhat.com) wrote:  
> > > QEMU crashes trying to save VMSTATE when only MIPS target are compiled in
> > >   $ qemu-system-mips -monitor stdio
> > >   (qemu) migrate "exec:gzip -c > STATEFILE.gz"
> > >   Segmentation fault (core dumped)
> > >
> > > It happens due to PIIX4_PM trying to parse hotplug vmstate structures
> > > which are valid only for x86 and not for MIPS (as it requires ACPI
> > > tables support which is not existent for ithe later)
> > >
> > > Issue was probably exposed by trying to cleanup/compile out unused
> > > ACPI bits from MIPS target (but forgetting about migration bits).
> > >
> > > Disable compiled out features using compat properties as the least
> > > risky way to deal with issue.  
> >
> > Isn't the problem partially due to a 'stub' vmsd which isn't terminated?  
> 
> Yes, but setting these properties causes that vmsd
> (vmstate_acpi_pcihp_pci_status) to not be used:
> 
>  * it is used only in VMSTATE_PCI_HOTPLUG()
>  * that macro is used only in hw/acpi/ich9.c (not relevant here) and
>    hw/acpi/piix4.c
>  * in piix4.c it is invoked passing it the test functions
>    vmstate_test_use_acpi_hotplug_bridge and
>    vmstate_test_migrate_acpi_index
>  * setting the properties on the device as this patch does
>    causes those test functions to return false, so the
>    vmstate_acpi_pcihp_pci_status is never examined

it's not limited to VMSTATE_PCI_HOTPLUG but also memory hotplug
and other x86 specific knobs that may cause crash.
(I ignored cpu hotplug one for now since it doesn't cause crash)

> 
> -- PMM
> 



  parent reply	other threads:[~2022-07-29  8:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 11:50 [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM Igor Mammedov
2022-07-28 12:29 ` Peter Maydell
2022-07-28 13:16   ` Igor Mammedov
2022-08-02  6:34     ` Philippe Mathieu-Daudé via
2022-08-03 17:26       ` Bernhard Beschow
2022-08-03 18:00         ` Peter Maydell
2022-08-04 21:32           ` BB
2022-08-08 12:15         ` Igor Mammedov
2022-08-08 17:57           ` BB
2022-08-08 18:02             ` Peter Maydell
2022-08-08 21:28               ` BB
2022-08-09  7:27             ` Igor Mammedov
2022-07-28 18:50   ` Ani Sinha
2022-07-28 14:44 ` Dr. David Alan Gilbert
2022-07-28 14:54   ` Igor Mammedov
2022-07-28 15:09     ` Dr. David Alan Gilbert
2022-07-28 15:12       ` Peter Maydell
2022-07-29  9:57         ` Igor Mammedov
2022-07-29 10:17           ` Peter Maydell
2022-08-01  9:17             ` Dr. David Alan Gilbert
2022-08-01  9:43               ` Peter Maydell
2022-07-28 15:04   ` Peter Maydell
2022-07-28 18:48     ` Ani Sinha
2022-07-29  8:09     ` Igor Mammedov [this message]
2022-08-03 22:00 ` Michael S. Tsirkin
2022-08-04  6:44   ` Ani Sinha
2022-08-08 21:24 ` Philippe Mathieu-Daudé via

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=20220729100949.34b20fda@redhat.com \
    --to=imammedo@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=aurelien@aurel32.net \
    --cc=dgilbert@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.