diff options
author | Alexander Graf <agraf@suse.de> | 2012-03-11 21:26:30 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 07:01:37 -0400 |
commit | 6020c0f6e78888b6023559e9bf633ad0092a1709 (patch) | |
tree | 9756a19a254c6094adcabbd387e162880ef5ad77 /arch/powerpc/kvm/booke.c | |
parent | 8943633cf9b87980d261a022e90d94bc2c55df35 (diff) |
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>
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 9f27258d8035..2675dcb40a7f 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -875,6 +875,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
875 | /* Guest has mapped and accessed a page which is not | 875 | /* Guest has mapped and accessed a page which is not |
876 | * actually RAM. */ | 876 | * actually RAM. */ |
877 | vcpu->arch.paddr_accessed = gpaddr; | 877 | vcpu->arch.paddr_accessed = gpaddr; |
878 | vcpu->arch.vaddr_accessed = eaddr; | ||
878 | r = kvmppc_emulate_mmio(run, vcpu); | 879 | r = kvmppc_emulate_mmio(run, vcpu); |
879 | kvmppc_account_exit(vcpu, MMIO_EXITS); | 880 | kvmppc_account_exit(vcpu, MMIO_EXITS); |
880 | } | 881 | } |