diff options
author | Paul Mackerras <paulus@samba.org> | 2012-09-20 19:39:21 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-10-05 23:38:53 +0200 |
commit | 70bddfefbdcdbfdebd81d8b59ff8a7fa5d450ccc (patch) | |
tree | 64196d1bffa4379dfcf6ed6c4e809ba138ae44cc /lib/mpi/mpi-internal.h | |
parent | 964ee98ccde0534548565a201827cf06d813180f (diff) |
KVM: PPC: Book3S HV: Fix calculation of guest phys address for MMIO emulation
In the case where the host kernel is using a 64kB base page size and
the guest uses a 4k HPTE (hashed page table entry) to map an emulated
MMIO device, we were calculating the guest physical address wrongly.
We were calculating a gfn as the guest physical address shifted right
16 bits (PAGE_SHIFT) but then only adding back in 12 bits from the
effective address, since the HPTE had a 4k page size. Thus the gpa
reported to userspace was missing 4 bits.
Instead, we now compute the guest physical address from the HPTE
without reference to the host page size, and then compute the gfn
by shifting the gpa right PAGE_SHIFT bits.
Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions