KVM: PPC: Pass EA to updating emulation ops
authorAlexander Graf <agraf@suse.de>
Mon, 12 Mar 2012 01:26:30 +0000 (02:26 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 8 Apr 2012 11:01:37 +0000 (14:01 +0300)
commit6020c0f6e78888b6023559e9bf633ad0092a1709
tree9756a19a254c6094adcabbd387e162880ef5ad77
parent8943633cf9b87980d261a022e90d94bc2c55df35
KVM: PPC: Pass EA to updating emulation ops

When emulating updating load/store instructions (lwzu, stwu, ...) we need to
write the effective address of the load/store into a register.

Currently, we write the physical address in there, which is very wrong. So
instead let's save off where the virtual fault was on MMIO and use that
information as value to put into the register.

While at it, also move the XOP variants of the above instructions to the new
scheme of using the already known vaddr instead of calculating it themselves.

Reported-by: Jörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/emulate.c