From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932803AbdA0PNZ (ORCPT ); Fri, 27 Jan 2017 10:13:25 -0500 Received: from foss.arm.com ([217.140.101.70]:56364 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932292AbdA0PMz (ORCPT ); Fri, 27 Jan 2017 10:12:55 -0500 Date: Fri, 27 Jan 2017 15:03:22 +0000 From: Will Deacon To: Christopher Covington Cc: Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Christoffer Dall , Marc Zyngier , Catalin Marinas , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, shankerd@codeaurora.org, timur@codeaurora.org, Mark Langsdorf , Mark Salter , Jon Masters , Neil Leeder Subject: Re: [PATCH v4 3/4] arm64: Use __tlbi() macros in KVM code Message-ID: <20170127150321.GM21144@arm.com> References: <20170125155232.10277-1-cov@codeaurora.org> <20170125155232.10277-3-cov@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170125155232.10277-3-cov@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 25, 2017 at 10:52:31AM -0500, Christopher Covington wrote: > Refactor the KVM code to use the __tlbi macros, which will allow an errata > workaround that repeats tlbi dsb sequences to only change one location. > This is not intended to change the generated assembly and comparing before > and after vmlinux objdump shows no functional changes. > > Signed-off-by: Christopher Covington > --- > arch/arm64/kvm/hyp/tlb.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) [...] > @@ -82,7 +83,7 @@ void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu) > void __hyp_text __kvm_flush_vm_context(void) > { > dsb(ishst); > - asm volatile("tlbi alle1is \n" > - "ic ialluis ": : ); > + __tlbi(alle1is); > + asm volatile("ic ialluis" : : ); > dsb(ish); Should be a separate patch, but this can now be a __flush_icache_all instead of the open-coded asm. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v4 3/4] arm64: Use __tlbi() macros in KVM code Date: Fri, 27 Jan 2017 15:03:22 +0000 Message-ID: <20170127150321.GM21144@arm.com> References: <20170125155232.10277-1-cov@codeaurora.org> <20170125155232.10277-3-cov@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Mark Langsdorf , Jon Masters , kvm@vger.kernel.org, Marc Zyngier , Catalin Marinas , timur@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Leeder , Paolo Bonzini , kvmarm@lists.cs.columbia.edu To: Christopher Covington Return-path: Content-Disposition: inline In-Reply-To: <20170125155232.10277-3-cov@codeaurora.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu List-Id: kvm.vger.kernel.org On Wed, Jan 25, 2017 at 10:52:31AM -0500, Christopher Covington wrote: > Refactor the KVM code to use the __tlbi macros, which will allow an errata > workaround that repeats tlbi dsb sequences to only change one location. > This is not intended to change the generated assembly and comparing before > and after vmlinux objdump shows no functional changes. > > Signed-off-by: Christopher Covington > --- > arch/arm64/kvm/hyp/tlb.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) [...] > @@ -82,7 +83,7 @@ void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu) > void __hyp_text __kvm_flush_vm_context(void) > { > dsb(ishst); > - asm volatile("tlbi alle1is \n" > - "ic ialluis ": : ); > + __tlbi(alle1is); > + asm volatile("ic ialluis" : : ); > dsb(ish); Should be a separate patch, but this can now be a __flush_icache_all instead of the open-coded asm. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Fri, 27 Jan 2017 15:03:22 +0000 Subject: [PATCH v4 3/4] arm64: Use __tlbi() macros in KVM code In-Reply-To: <20170125155232.10277-3-cov@codeaurora.org> References: <20170125155232.10277-1-cov@codeaurora.org> <20170125155232.10277-3-cov@codeaurora.org> Message-ID: <20170127150321.GM21144@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Jan 25, 2017 at 10:52:31AM -0500, Christopher Covington wrote: > Refactor the KVM code to use the __tlbi macros, which will allow an errata > workaround that repeats tlbi dsb sequences to only change one location. > This is not intended to change the generated assembly and comparing before > and after vmlinux objdump shows no functional changes. > > Signed-off-by: Christopher Covington > --- > arch/arm64/kvm/hyp/tlb.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) [...] > @@ -82,7 +83,7 @@ void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu) > void __hyp_text __kvm_flush_vm_context(void) > { > dsb(ishst); > - asm volatile("tlbi alle1is \n" > - "ic ialluis ": : ); > + __tlbi(alle1is); > + asm volatile("ic ialluis" : : ); > dsb(ish); Should be a separate patch, but this can now be a __flush_icache_all instead of the open-coded asm. Will