remarkable-linux/arch
Peter Maydell 6d3cfbe21b arm/arm64: KVM: vgic: move reset initialization into vgic_init_maps()
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).

Finally rename vgic_init_maps to vgic_init and renamed kvm_vgic_init to
kvm_vgic_map_resources.

  [ This patch is originally written by Peter Maydell, but I have
    modified it somewhat heavily, renaming various bits and moving code
    around.  If something is broken, I am to be blamed. - Christoffer ]

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2014-12-13 14:15:52 +01:00
..
alpha Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
arc The "weak" attribute is commonly used for the default version of a 2014-10-23 15:04:27 -07:00
arm arm/arm64: KVM: vgic: move reset initialization into vgic_init_maps() 2014-12-13 14:15:52 +01:00
arm64 arm/arm64: KVM: Introduce stage2_unmap_vm 2014-12-13 14:15:27 +01:00
avr32 Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
blackfin Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
c6x
cris Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 16:23:15 +02:00
frv frv: remove unused declarations of __start___ex_table and __stop___ex_table 2014-10-14 02:18:28 +02:00
hexagon Merge branch 'locking-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 15:48:00 +02:00
ia64 kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn() 2014-11-25 13:57:26 +00:00
m32r Merge branch 'locking-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 15:48:00 +02:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2014-10-14 03:51:22 +02:00
metag Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
microblaze Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
mips MIPS: SEAD3: Fix I2C device registration. 2014-10-24 13:34:42 +02:00
mn10300 Merge branch 'locking-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 15:48:00 +02:00
openrisc Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
parisc Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
powerpc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux 2014-10-21 07:48:56 -07:00
s390 KVM: s390: sigp: split handling of SIGP STOP (AND STORE STATUS) 2014-10-28 13:09:14 +01:00
score
sh Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2014-10-24 12:45:47 -07:00
tile Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
um Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
unicore32
x86 kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn() 2014-11-25 13:57:26 +00:00
xtensa Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
.gitignore
Kconfig