Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1552909

Re: [PATCH v2 4/5] arm64: Use __tlbi_dsb() macros in KVM code

Path csiph.com!1.us.feeder.erje.net!2.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Christopher Covington <cov@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 4/5] arm64: Use __tlbi_dsb() macros in KVM code
Date Fri, 06 Jan 2017 17:00:02 +0100
Message-ID <sWF5U-3ZI-37@gated-at.bofh.it> (permalink)
References <sTRGh-4dP-1@gated-at.bofh.it> <sTRGi-4dP-7@gated-at.bofh.it> <sVzOV-jT-11@gated-at.bofh.it>
X-Original-To Mark Rutland <mark.rutland@arm.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1483717917; bh=j8EK5R+1fQVlMc7jYWqZ/BpmqjKHBdjn6f5kKEMIjSU=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=cwoKbHZ5xkHjGZSYxmKIFY60yPTpvG/6Vsz48zuRtoOKmFAKmlPIj7mqMC3/ZFEmZ qY9d3oo0rHIdJeVqzxULg+kjrV/OQyfOdTwD02s5ar7WPzZaD2hmhcW/Oirdkgs2ET fofBZrZDzLYTZAoV0oyDeidVRrdQEEzGQ+2wTimU=
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1483717916; bh=j8EK5R+1fQVlMc7jYWqZ/BpmqjKHBdjn6f5kKEMIjSU=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=l5Dpjo1ERGh8wVKtOI5/r9LXQdvp13fnLfg2m8WhuPka5fdJ1G12X1JPwZiCnASpW n/7P9/GrVhESAF6j8H4/ErpmUoyn/05WRh41cmjJmk1c+akUrQ9QCO5C1NfuBIULOa qf0HpRDXVO08PJrvnH3WbruQwP0bxtERw0IvR8yQ=
Dmarc-Filter OpenDMARC Filter v1.3.1 smtp.codeaurora.org 90A8F611FD
Authentication-Results pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org
Authentication-Results pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=cov@codeaurora.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 39
Organization linux.* mail to news gateway
X-Original-Cc Paolo Bonzini <pbonzini@redhat.com>, Radim Krčmář <rkrcmar@redhat.com>, Christoffer Dall <christoffer.dall@linaro.org>, Marc Zyngier <marc.zyngier@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, 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
X-Original-Date Fri, 6 Jan 2017 10:51:53 -0500
X-Original-Message-ID <f5020a04-5fc7-26b5-1ded-c58e159bc722@codeaurora.org>
X-Original-References <20161229224335.13531-1-cov@codeaurora.org> <20161229224335.13531-4-cov@codeaurora.org> <20170103155756.GB14183@leverpostej>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1552909

Show key headers only | View raw


On 01/03/2017 10:57 AM, Mark Rutland wrote:
> On Thu, Dec 29, 2016 at 05:43:34PM -0500, Christopher Covington wrote:
>> Refactor the KVM code to use the newly introduced __tlbi_dsb 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.

@@ -32,7 +33,7 @@ void __hyp_text __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
 	 * whole of Stage-1. Weep...
 	 */
 	ipa >>= 12;
-	asm volatile("tlbi ipas2e1is, %0" : : "r" (ipa));
+	__tlbi_dsb(ipas2e1is, ish, ipa);
 
 	/*
 	 * We have to ensure completion of the invalidation at Stage-2,

>> @@ -40,9 +41,7 @@ void __hyp_text __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
>>  	 * complete (S1 + S2) walk based on the old Stage-2 mapping if
>>  	 * the Stage-1 invalidation happened first.
>>  	 */
>> -	dsb(ish);
> 
> Looks like this got accidentally removed. AFAICT it is still necessary.

Not removed, just hoisted above the comment block to the previous patch hunk.

>> -	asm volatile("tlbi vmalle1is" : : );
>> -	dsb(ish);
>> +	__tlbi_dsb(vmalle1is, ish);
>>  	isb();

Thanks,
Cov

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code
Aurora Forum, a Linux Foundation Collaborative Project.

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 4/5] arm64: Use __tlbi_dsb() macros in KVM code Christopher Covington <cov@codeaurora.org> - 2017-01-06 17:00 +0100
  Re: [PATCH v2 4/5] arm64: Use __tlbi_dsb() macros in KVM code Mark Rutland <mark.rutland@arm.com> - 2017-01-06 17:10 +0100

csiph-web