Re: [PATCH v3 8/9] KVM: PPC: Ultravisor: Enter a secure guest
From: Paul Mackerras <hidden>
Date: 2019-06-15 07:53:13
On Thu, Jun 06, 2019 at 02:36:13PM -0300, Claudio Carvalho wrote:
From: Sukadev Bhattiprolu <redacted> To enter a secure guest, we have to go through the ultravisor, therefore we do a ucall when we are entering a secure guest. This change is needed for any sort of entry to the secure guest from the hypervisor, whether it is a return from an hcall, a return from a hypervisor interrupt, or the first time that a secure guest vCPU is run. If we are returning from an hcall, the results are already in the appropriate registers (R3:12), except for R6,7, which need to be restored before doing the ucall (UV_RETURN). Have fast_guest_return check the kvm_arch.secure_guest field so that a new CPU enters UV when started (in response to a RTAS start-cpu call). Thanks to input from Paul Mackerras, Ram Pai and Mike Anderson. Signed-off-by: Sukadev Bhattiprolu <redacted> [Pass SRR1 in r11 for UV_RETURN, fix kvmppc_msr_interrupt to preserve the MSR_S bit] Signed-off-by: Paul Mackerras <redacted> [Fix UV_RETURN token number and arch.secure_guest check] Signed-off-by: Ram Pai <redacted> [Update commit message and ret_to_ultra comment] Signed-off-by: Claudio Carvalho <redacted>
Acked-by: Paul Mackerras <redacted> Paul.