From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] vgic: move reset initialization into vgic_init_maps()
Date: Tue, 9 Dec 2014 16:46:43 +0100 [thread overview]
Message-ID: <20141209154643.GA28388@cbox> (raw)
In-Reply-To: <1417705344-747-1-git-send-email-peter.maydell@linaro.org>
On Thu, Dec 04, 2014 at 03:02:24PM +0000, Peter Maydell wrote:
> VGIC initialization currently happens in three phases:
> (1) kvm_vgic_create() (triggered by userspace GIC creation)
> (2) vgic_init_maps() (triggered by userspace GIC register read/write
> requests, or from kvm_vgic_init() if not already run)
> (3) kvm_vgic_init() (triggered by first VM run)
>
> We were doing initialization of some state to correspond with the
> state of a freshly-reset GIC in kvm_vgic_init(); this is too late,
> since it will overwrite changes made by userspace using the
> register access APIs before the VM is run. Move this initialization
> earlier, into the vgic_init_maps() phase.
>
> This fixes a bug where QEMU could successfully restore a saved
> VM state snapshot into a VM that had already been run, but could
> not restore it "from cold" using the -loadvm command line option
> (the symptoms being that the restored VM would run but interrupts
> were ignored).
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> You could make a good argument for renaming vgic_init_maps() and
> kvm_vgic_init() (eg vgic_init() and vgic_first_run() ?)...
>
Yes you could. I've sent out a series today that reworks your patch and
adds some other logic to go along with it.
-Christoffer
prev parent reply other threads:[~2014-12-09 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 15:02 [PATCH] vgic: move reset initialization into vgic_init_maps() Peter Maydell
2014-12-09 15:46 ` Christoffer Dall [this message]
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=20141209154643.GA28388@cbox \
--to=christoffer.dall@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).