From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Sat, 15 Jun 2019 07:45:50 +0000 Subject: Re: [PATCH v3 8/9] KVM: PPC: Ultravisor: Enter a secure guest Message-Id: <20190615074550.GE24709@blackberry> List-Id: References: <20190606173614.32090-1-cclaudio@linux.ibm.com> <20190606173614.32090-9-cclaudio@linux.ibm.com> In-Reply-To: <20190606173614.32090-9-cclaudio@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Claudio Carvalho Cc: Madhavan Srinivasan , Michael Anderson , Ram Pai , kvm-ppc@vger.kernel.org, Bharata B Rao , linuxppc-dev@ozlabs.org, Sukadev Bhattiprolu , Thiago Bauermann , Anshuman Khandual On Thu, Jun 06, 2019 at 02:36:13PM -0300, Claudio Carvalho wrote: > From: Sukadev Bhattiprolu > > 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 > [Pass SRR1 in r11 for UV_RETURN, fix kvmppc_msr_interrupt to preserve > the MSR_S bit] > Signed-off-by: Paul Mackerras > [Fix UV_RETURN token number and arch.secure_guest check] > Signed-off-by: Ram Pai > [Update commit message and ret_to_ultra comment] > Signed-off-by: Claudio Carvalho Acked-by: Paul Mackerras Paul.