From: Alexander Graf <agraf@suse.de>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] Unable to loadvm on qemu-system-ppc -M g3beige (keyboard freeze)
Date: Fri, 19 Dec 2014 00:01:57 +0100 [thread overview]
Message-ID: <54935CE5.4090201@suse.de> (raw)
In-Reply-To: <549348E7.3020401@ilande.co.uk>
On 18.12.14 22:36, Mark Cave-Ayland wrote:
> On 18/12/14 15:13, Peter Maydell wrote:
>
>> On 18 December 2014 at 14:46, Alexander Graf <agraf@suse.de> wrote:
>>> On 18.12.14 14:54, Mark Cave-Ayland wrote:
>>>> So it looks like several of the device MemoryRegions aren't being added
>>>> after the "loadvm". Does this mean there is an object lifecycle issue
>>>> here in that some of the initialisation needs to be done in realizefn
>>>> rather than initfn or vice-versa?
>>>
>>> I always thought we're going through both - initfn and realizefn with
>>> normal system boot as well as vmstate load.
>>
>> Yes. Migration incoming and vmstate load both work as "create,
>> initialize, realize and reset system as normal, then do state
>> load before running it".
>>
>>> So that means that the additional mappings above must be runtime
>>> creations that aren't saved and restored properly.
>>
>> Looks likely. Memory regions themselves don't have any saved or
>> reloaded state, so it's the responsibility of the devices that
>> create and control them to ensure that they're set up correctly
>> again on state load. This is trivial for most devices which
>> just have an unchanging set, but controller chip equivalents
>> that allow the guest to map and unmap stuff need to be cleverer.
>
> I think that the problem is that the macio device doesn't have any
> declared vmstate - presumably since no vmstate is saved for that device
> then it doesn't appear in the loadvm restore list and so the object is
> never re-initialised.
>
> I can probably have a go at trying to sort out the VMStateDescription
> (and maybe see how easy it is to convert some of these things to QOM)
> but it seems that MACIOState has an array of qemu_irqs embedded directly
> in it which I'm not sure how to handle.
>
> Can anyone point me towards an example device the best current practice
> for either wiring up qemu_irqs via QOM or how to represent them within a
> VMStateDescription? In general it seems that SPARC and PPC mostly use
> old APIs so there is a distinct lack of good reference examples for
> devices I am familiar with.
Why exactly would you need to wire up the qemu_irqs? If the lines are
asserted at the point of migration, the MPIC model should migrate over
the fact that a line is pending, no?
Alex
next prev parent reply other threads:[~2014-12-18 23:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 10:17 [Qemu-devel] Unable to loadvm on qemu-system-ppc -M g3beige (keyboard freeze) Mark Cave-Ayland
2014-12-17 10:23 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-12-17 10:47 ` Mark Cave-Ayland
2014-12-17 11:11 ` Alexander Graf
2014-12-17 11:23 ` Peter Maydell
2014-12-18 13:54 ` Mark Cave-Ayland
2014-12-18 14:46 ` Alexander Graf
2014-12-18 15:13 ` Peter Maydell
2014-12-18 21:36 ` Mark Cave-Ayland
2014-12-18 23:01 ` Alexander Graf [this message]
2014-12-19 10:53 ` Mark Cave-Ayland
2014-12-19 12:29 ` Peter Maydell
2014-12-19 14:12 ` Mark Cave-Ayland
2014-12-19 14:29 ` Peter Maydell
2014-12-19 16:15 ` Mark Cave-Ayland
2014-12-19 16:35 ` Peter Maydell
2014-12-19 16:51 ` Mark Cave-Ayland
2014-12-19 17:16 ` Alexander Graf
2014-12-19 17:29 ` Paolo Bonzini
2014-12-19 17:45 ` Alexander Graf
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=54935CE5.4090201@suse.de \
--to=agraf@suse.de \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 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).