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 DB96AC7EE2E for ; Fri, 9 Jun 2023 15:45:28 +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=sny/Snp1RvbEGMb5u445VTKJK5ds9j/pBs86eYT1Ty8=; b=IIbqCiKc40ZAVK fjN8VAUvvbY6Xhotd4CD1ac6MUn1f1x5A14j4/8/0YKsNvrbUe8dzbn8ptwAB0NvVi5+1eVsNPtmZ 253uiF6r6/GW5aRNGEgxabFG1hD1c1KB5mRi4VbmV6bQPRy8jdm6Ktz7ve22qBGktGdlYesd/wtD4 UZvkBb3KhYsgZe3hQ6LkMuDPcc7mVi+t4ONYCW9wRPR0WBaoafHqIeju4YtmuD53zAvPaw1B3Ex2U poszO+M708ULcTp8+cfA/ofgDlWbYxFNLIakoVPGbSFzrZ7tv5g1Zl5m5q5j2mXdGJ1oW5/W2IFC9 5gHIvRm1rjbnJKOZb6Ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7eIS-00DUqd-0H; Fri, 09 Jun 2023 15:45:04 +0000 Received: from out-62.mta1.migadu.com ([2001:41d0:203:375::3e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7eIM-00DUpQ-0W for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 15:45:00 +0000 Date: Fri, 9 Jun 2023 08:44:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1686325494; 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=vPnlIRVGxj8AeQiaq3bAFwvGduBuAp2E7TLGSfDQuEY=; b=kCvdF6x5Ui7p2uYuAw8e0+ZOCZ9jdiuTfejEV/+f9FynBFrrivqpYS+WgpldF4ADxknz7n EnUpapJPqGOr4cWrWST9aM/SroIqLJ7rNerE/Kv1NsLUi4P0U9F92hSfAzcjdykt0K8vtP MSOED852Q/+yMxfDpf0O/bS5SQ8UZ34= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Colton Lewis Cc: kvm@vger.kernel.org, Catalin Marinas , Will Deacon , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev Subject: Re: [PATCH 2/3] KVM: arm64: Clear possible conflict aborts Message-ID: References: <20230602170147.1541355-1-coltonlewis@google.com> <20230602170147.1541355-3-coltonlewis@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230602170147.1541355-3-coltonlewis@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230609_084459_138842_ED8EDF4A X-CRM114-Status: GOOD ( 14.38 ) 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 Fri, Jun 02, 2023 at 05:01:46PM +0000, Colton Lewis wrote: > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 7a68398517c95..96b950f20c8d0 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -1591,6 +1591,12 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu) > return 1; > } > > + if (fault_status == ESR_ELx_FSC_CONFLICT) { > + /* We could be at any level. 0 covers all levels. */ > + __kvm_tlb_flush_vmid_ipa(vcpu->arch.hw_mmu, fault_ipa, 0); > + return 1; > + } > + This does not match the architecture. Please read DDI0487J D8.14.3 "TLB maintenance due to TLB conflict", which tells you exactly how to resolve the conflict. TL; DR: TLBI by address is _not_ guaranteed to invalidate duplicate TLB entries. vmalls12e1 is your friend. The conflicting TLB entries are local to the CPU that took the abort, so you don't need to do any broadcast. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel