]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kvm: Use UV_RETURN ucall to return to ultravisor
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Thu, 22 Aug 2019 03:48:38 +0000 (00:48 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Aug 2019 23:40:16 +0000 (09:40 +1000)
commit8732c5ec500126557ac101b3359a5917c06064a3
tree2fd6399a7d2486f07d3b2ab5939145c0b49a8d3c
parentd7b17ae67b70cc080b3866ecfd760dafb0dfe3f8
powerpc/kvm: Use UV_RETURN ucall to return to ultravisor

When an SVM makes an hypercall or incurs some other exception, the
Ultravisor usually forwards (a.k.a. reflects) the exceptions to the
Hypervisor. After processing the exception, Hypervisor uses the
UV_RETURN ultracall to return control back to the SVM.

The expected register state on entry to this ultracall is:

* Non-volatile registers are restored to their original values.
* If returning from an hypercall, register R0 contains the return value
  (unlike other ultracalls) and, registers R4 through R12 contain any
  output values of the hypercall.
* R3 contains the ultracall number, i.e UV_RETURN.
* If returning with a synthesized interrupt, R2 contains the
  synthesized interrupt number.

Thanks to input from Paul Mackerras, Ram Pai and Mike Anderson.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Claudio Carvalho <cclaudio@linux.ibm.com>
Acked-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190822034838.27876-8-cclaudio@linux.ibm.com
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/include/asm/ultravisor-api.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S