]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S PR: Do dcbz32 patching with big endian instructions
authorAlexander Graf <agraf@suse.de>
Thu, 24 Apr 2014 11:52:01 +0000 (13:52 +0200)
committerAlexander Graf <agraf@suse.de>
Fri, 30 May 2014 12:26:21 +0000 (14:26 +0200)
commit2340c88a21880f844f59550622b048c38762a95a
tree69a6fcf03d10a7b329e84dae3e487d0dd5ae9756
parentd03ee193f3c1e094a5a09e0d7a9c56282414768f
KVM: PPC: Book3S PR: Do dcbz32 patching with big endian instructions

When the host CPU we're running on doesn't support dcbz32 itself, but the
guest wants to have dcbz only clear 32 bytes of data, we loop through every
executable mapped page to search for dcbz instructions and patch them with
a special privileged instruction that we emulate as dcbz32.

The only guests that want to see dcbz act as 32byte are book3s_32 guests, so
we don't have to worry about little endian instruction ordering. So let's
just always search for big endian dcbz instructions, also when we're on a
little endian host.

Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_32_mmu.c
arch/powerpc/kvm/book3s_pr.c