On Thu, Jun 06, 2019 at 02:36:13PM -0300, Claudio Carvalho wrote: > From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx> > > 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 <sukadev@xxxxxxxxxxxxxxxxxx> > [Pass SRR1 in r11 for UV_RETURN, fix kvmppc_msr_interrupt to preserve > the MSR_S bit] > Signed-off-by: Paul Mackerras <paulus@xxxxxxxxxx> > [Fix UV_RETURN token number and arch.secure_guest check] > Signed-off-by: Ram Pai <linuxram@xxxxxxxxxx> > [Update commit message and ret_to_ultra comment] > Signed-off-by: Claudio Carvalho <cclaudio@xxxxxxxxxxxxx> Acked-by: Paul Mackerras <paulus@xxxxxxxxxx> Paul.