]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
powerpc/powernv/npu: Fault user page into the hypervisor's pagetable
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 19 Dec 2018 08:52:29 +0000 (19:52 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Dec 2018 05:20:46 +0000 (16:20 +1100)
commit58629c0dc34904d135af944d120eb23165ec3b61
treec6e96ae78213fc95c6f7181047ee68210d6440d1
parent135ef954051b102870a8d47a8eb822af1f1b1ec1
powerpc/powernv/npu: Fault user page into the hypervisor's pagetable

When a page fault happens in a GPU, the GPU signals the OS and the GPU
driver calls the fault handler which populated a page table; this allows
the GPU to complete an ATS request.

On the bare metal get_user_pages() is enough as it adds a pte to
the kernel page table but under KVM the partition scope tree does not get
updated so ATS will still fail.

This reads a byte from an effective address which causes HV storage
interrupt and KVM updates the partition scope tree.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/npu-dma.c