From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Guo Subject: Re: [PATCH 23/26] KVM: PPC: Book3S PR: add emulation for tabort. for privilege guest Date: Tue, 30 Jan 2018 11:24:36 +0800 Message-ID: <20180130032436.GJ3261@simonLocalRHEL7.x64> References: <1515665499-31710-1-git-send-email-wei.guo.simon@gmail.com> <1515665499-31710-24-git-send-email-wei.guo.simon@gmail.com> <20180123094416.GO3924@fergus.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org To: Paul Mackerras Return-path: Received: from mail-pf0-f194.google.com ([209.85.192.194]:44293 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752221AbeA3DYj (ORCPT ); Mon, 29 Jan 2018 22:24:39 -0500 Content-Disposition: inline In-Reply-To: <20180123094416.GO3924@fergus.ozlabs.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Paul, On Tue, Jan 23, 2018 at 08:44:16PM +1100, Paul Mackerras wrote: > On Thu, Jan 11, 2018 at 06:11:36PM +0800, wei.guo.simon@gmail.com wrote: > > From: Simon Guo > > > > Currently privilege guest will be run with TM disabled. > > > > Although the privilege guest cannot initiate a new transaction, > > it can use tabort to terminate its problem state's transaction. > > So it is still necessary to emulate tabort. for privilege guest. > > > > This patch adds emulation for tabort. of privilege guest. > > > > Tested with: > > https://github.com/justdoitqd/publicFiles/blob/master/test_tabort.c > > > > Signed-off-by: Simon Guo > > --- > > arch/powerpc/include/asm/kvm_book3s.h | 1 + > > arch/powerpc/kvm/book3s_emulate.c | 31 +++++++++++++++++++++++++++++++ > > arch/powerpc/kvm/book3s_pr.c | 2 +- > > 3 files changed, 33 insertions(+), 1 deletion(-) > > > > diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h > > index 524cd82..8bd454c 100644 > > --- a/arch/powerpc/include/asm/kvm_book3s.h > > +++ b/arch/powerpc/include/asm/kvm_book3s.h > > @@ -258,6 +258,7 @@ extern void kvmppc_copy_from_svcpu(struct kvm_vcpu *vcpu, > > void kvmppc_save_tm_pr(struct kvm_vcpu *vcpu); > > void kvmppc_restore_tm_pr(struct kvm_vcpu *vcpu); > > void kvmppc_restore_tm_sprs(struct kvm_vcpu *vcpu); > > +void kvmppc_save_tm_sprs(struct kvm_vcpu *vcpu); > > Why do you add this declaration, and change it from "static inline" to > "inline" below, when this patch doesn't use it? Also, making it > "inline" is pointless if it has a caller outside the source file where > it's defined (if gcc wants to inline uses of it inside the same source > file, it will do so anyway even without the "inline" keyword.) > > Paul. It is a leave over of my previous rework. Sorry and I will remove them. Thanks, - Simon