From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Upton Date: Tue, 31 Jan 2023 18:05:43 +0000 Subject: [PATCH v2 2/7] KVM: arm64: Use kvm_arch_flush_remote_tlbs() In-Reply-To: <20230126184025.2294823-3-dmatlack@google.com> References: <20230126184025.2294823-1-dmatlack@google.com> <20230126184025.2294823-3-dmatlack@google.com> Message-ID: List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, Jan 26, 2023 at 10:40:20AM -0800, David Matlack wrote: > Use kvm_arch_flush_remote_tlbs() instead of > CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL. The two mechanisms solve the same > problem, allowing architecture-specific code to provide a non-IPI > implementation of remote TLB flushing. > > Dropping CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL allows KVM to standardize > all architectures on kvm_arch_flush_remote_tlbs() instead of maintaining > two mechanisms. > > Opt to standardize on kvm_arch_flush_remote_tlbs() since it avoids > duplicating the generic TLB stats across architectures that implement > their own remote TLB flush. > > This adds an extra function call to the ARM64 kvm_flush_remote_tlbs() > path, but that is a small cost in comparison to flushing remote TLBs. > > No functional change intended. > > Signed-off-by: David Matlack Acked-by: Oliver Upton -- Thanks, Oliver From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-74.mta0.migadu.com (out-74.mta0.migadu.com [91.218.175.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EB57A922 for ; Tue, 31 Jan 2023 18:14:53 +0000 (UTC) Date: Tue, 31 Jan 2023 18:05:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675188357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h53EfclF6xTMn55rYCYLJq2rEuaWHMBV+S/ooTaHdfw=; b=Pu4XWE6VT6VyVYPR/b8rZm1XPTPWiODoFlp6iD6k7q/fSRYQIWn8sQIZcuJOM9+8mvUjA0 tY6tE2HyMyNYhK/WftJyCxoqv/VXWEP74cSb6P5dHmPBw7GHJPgfeYR/xMiowx0YtmZ+c/ n/sBYT5JqeMZjNibizy9+P7DJWZVDPc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Matlack Cc: Paolo Bonzini , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Huacai Chen , Aleksandar Markovic , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sean Christopherson , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, Raghavendra Rao Ananta Subject: Re: [PATCH v2 2/7] KVM: arm64: Use kvm_arch_flush_remote_tlbs() Message-ID: References: <20230126184025.2294823-1-dmatlack@google.com> <20230126184025.2294823-3-dmatlack@google.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230126184025.2294823-3-dmatlack@google.com> X-Migadu-Flow: FLOW_OUT On Thu, Jan 26, 2023 at 10:40:20AM -0800, David Matlack wrote: > Use kvm_arch_flush_remote_tlbs() instead of > CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL. The two mechanisms solve the same > problem, allowing architecture-specific code to provide a non-IPI > implementation of remote TLB flushing. > > Dropping CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL allows KVM to standardize > all architectures on kvm_arch_flush_remote_tlbs() instead of maintaining > two mechanisms. > > Opt to standardize on kvm_arch_flush_remote_tlbs() since it avoids > duplicating the generic TLB stats across architectures that implement > their own remote TLB flush. > > This adds an extra function call to the ARM64 kvm_flush_remote_tlbs() > path, but that is a small cost in comparison to flushing remote TLBs. > > No functional change intended. > > Signed-off-by: David Matlack Acked-by: Oliver Upton -- Thanks, Oliver From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C440FC636CC for ; Tue, 31 Jan 2023 18:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vQK/A7Hr/yR8GBIIwFMcrcbfqCXqh7NPYsECZSbZBHY=; b=HhQQVRCgx+opja tLXFKQGaDQFhCVtrd0cEY7iqBC9Mm5+uGWv22r4DQ+krxGkbm6T7icVs1wdN+c3BeJK5aIL8SmweO NEx73bGgfuZfvm1vcs1sf+tvOxHlkFzvDgBdmVm9caMojvBLxt/ANnMZ8NUH4WdOhrxUiwmfnBuT6 NX1Ghc9QmrsUZvHSlFTiM92hRoqmMF9Mqxc8f6i0lfhkrAckQyAr4qfR0N7f3eEzrpJEt+tXo6G4D MtnVVK9t8t8gYWa9vp4Aq+AwwgTr4dv45MnIkQS1QRefZJivi5rwDgWzOC6FBA71aqmz7qA2Ee+zT imsStEgQg10Fag8JhaZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMv19-008vRz-BK; Tue, 31 Jan 2023 18:06:03 +0000 Received: from out-18.mta0.migadu.com ([91.218.175.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMv16-008vQ6-2q for linux-riscv@lists.infradead.org; Tue, 31 Jan 2023 18:06:01 +0000 Date: Tue, 31 Jan 2023 18:05:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675188357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h53EfclF6xTMn55rYCYLJq2rEuaWHMBV+S/ooTaHdfw=; b=Pu4XWE6VT6VyVYPR/b8rZm1XPTPWiODoFlp6iD6k7q/fSRYQIWn8sQIZcuJOM9+8mvUjA0 tY6tE2HyMyNYhK/WftJyCxoqv/VXWEP74cSb6P5dHmPBw7GHJPgfeYR/xMiowx0YtmZ+c/ n/sBYT5JqeMZjNibizy9+P7DJWZVDPc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Matlack Cc: Paolo Bonzini , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Huacai Chen , Aleksandar Markovic , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sean Christopherson , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, Raghavendra Rao Ananta Subject: Re: [PATCH v2 2/7] KVM: arm64: Use kvm_arch_flush_remote_tlbs() Message-ID: References: <20230126184025.2294823-1-dmatlack@google.com> <20230126184025.2294823-3-dmatlack@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230126184025.2294823-3-dmatlack@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230131_100600_551919_AA8B793A X-CRM114-Status: GOOD ( 11.05 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Jan 26, 2023 at 10:40:20AM -0800, David Matlack wrote: > Use kvm_arch_flush_remote_tlbs() instead of > CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL. The two mechanisms solve the same > problem, allowing architecture-specific code to provide a non-IPI > implementation of remote TLB flushing. > > Dropping CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL allows KVM to standardize > all architectures on kvm_arch_flush_remote_tlbs() instead of maintaining > two mechanisms. > > Opt to standardize on kvm_arch_flush_remote_tlbs() since it avoids > duplicating the generic TLB stats across architectures that implement > their own remote TLB flush. > > This adds an extra function call to the ARM64 kvm_flush_remote_tlbs() > path, but that is a small cost in comparison to flushing remote TLBs. > > No functional change intended. > > Signed-off-by: David Matlack Acked-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88C11C636CC for ; Tue, 31 Jan 2023 18:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nXFiJKA7547Em8Iz/f6athXEvlOoASHUAVjs3uyC8ig=; b=zQY/6odlLrKdhL K1BXhhGzXZXH7Zwcc5fR1jVEg63PBKvL0Z53kGfN8Qc/iZkEvCF6B2EaXb3cDPUnjoRNDcZR88bB6 492xka/UDkNni70KKEkkln5QwsqlCTCWDpdSpZTcFmAuHdqDqBO5GomV08/y9fMDPoMOl7Y662q5U BqDSj8yX82RpBWC/6klp8Oi/K/lwOa0OEzIIHhnNtug4X1rKfjUHXXyqvIuxCZwnMj/lo/ziTsytX MeHKa7k4icQ0BZrLz6SgtJax7YgSUJrZ4PQd9Q2jTJM5qCC/vAFxGUxzEJ3XtTxOjSKYYmPhfrwGY 5Kt5jyShxB4+3doaJUig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMv1B-008vSb-2h; Tue, 31 Jan 2023 18:06:05 +0000 Received: from out-72.mta0.migadu.com ([91.218.175.72]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMv16-008vQ7-2s for linux-arm-kernel@lists.infradead.org; Tue, 31 Jan 2023 18:06:03 +0000 Date: Tue, 31 Jan 2023 18:05:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675188357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h53EfclF6xTMn55rYCYLJq2rEuaWHMBV+S/ooTaHdfw=; b=Pu4XWE6VT6VyVYPR/b8rZm1XPTPWiODoFlp6iD6k7q/fSRYQIWn8sQIZcuJOM9+8mvUjA0 tY6tE2HyMyNYhK/WftJyCxoqv/VXWEP74cSb6P5dHmPBw7GHJPgfeYR/xMiowx0YtmZ+c/ n/sBYT5JqeMZjNibizy9+P7DJWZVDPc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Matlack Cc: Paolo Bonzini , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Huacai Chen , Aleksandar Markovic , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sean Christopherson , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, Raghavendra Rao Ananta Subject: Re: [PATCH v2 2/7] KVM: arm64: Use kvm_arch_flush_remote_tlbs() Message-ID: References: <20230126184025.2294823-1-dmatlack@google.com> <20230126184025.2294823-3-dmatlack@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230126184025.2294823-3-dmatlack@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230131_100600_553750_7AB7BEDF X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 26, 2023 at 10:40:20AM -0800, David Matlack wrote: > Use kvm_arch_flush_remote_tlbs() instead of > CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL. The two mechanisms solve the same > problem, allowing architecture-specific code to provide a non-IPI > implementation of remote TLB flushing. > > Dropping CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL allows KVM to standardize > all architectures on kvm_arch_flush_remote_tlbs() instead of maintaining > two mechanisms. > > Opt to standardize on kvm_arch_flush_remote_tlbs() since it avoids > duplicating the generic TLB stats across architectures that implement > their own remote TLB flush. > > This adds an extra function call to the ARM64 kvm_flush_remote_tlbs() > path, but that is a small cost in comparison to flushing remote TLBs. > > No functional change intended. > > Signed-off-by: David Matlack Acked-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel