From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicholas Piggin Date: Mon, 22 Mar 2021 18:13:39 +0000 Subject: Re: [PATCH v3 17/41] KVM: PPC: Book3S HV P9: implement kvmppc_xive_pull_vcpu in C Message-Id: <1616436715.ynrx4scuw6.astroid@bobo.none> List-Id: References: <20210305150638.2675513-1-npiggin@gmail.com> <20210305150638.2675513-18-npiggin@gmail.com> <11823cfb-3d10-8f2f-4caf-9b38a010ed31@kaod.org> In-Reply-To: <11823cfb-3d10-8f2f-4caf-9b38a010ed31@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: =?iso-8859-1?q?C=E9dric?= Le Goater , kvm-ppc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Excerpts from Cédric Le Goater's message of March 23, 2021 2:19 am: > On 3/5/21 4:06 PM, Nicholas Piggin wrote: >> This is more symmetric with kvmppc_xive_push_vcpu. The extra test in >> the asm will go away in a later change. >> >> Signed-off-by: Nicholas Piggin > > Reviewed-by: Cédric Le Goater >> diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c >> index e7219b6f5f9a..52cdb9e2660a 100644 >> --- a/arch/powerpc/kvm/book3s_xive.c >> +++ b/arch/powerpc/kvm/book3s_xive.c >> @@ -127,6 +127,37 @@ void kvmppc_xive_push_vcpu(struct kvm_vcpu *vcpu) >> } >> EXPORT_SYMBOL_GPL(kvmppc_xive_push_vcpu); >> >> +/* >> + * Pull a vcpu's context from the XIVE on guest exit. >> + * This assumes we are in virtual mode (MMU on) > > should we add an assert on is_rm() ? I thought the same thing at first, but I think it should be okay. kvmppc_xive_push_cpu does not have an assert, and in the next patch the push and pull get moved out to where it is much clearer to see the MMU is on. Thanks, Nick