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 182B6EB64D8 for ; Wed, 14 Jun 2023 23:07:19 +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=pR9OuNtAB2BteWPM8+pE9287ACWExtGqdjGB+Lm49yI=; b=vaOQNCzzSs1G7S dhBH2Ww9cT1jks/rr1qH0reSdwS/NzRwa3nKm4E6ZfilfK7K/+X2b4mHEcAkJDSiNYI+CHm/BFiMK ZxaM70tp9G9k26S1vH31uH0ld74UKlg9Vw2ptvUqzYf/F5D2GadG81deQ3ro3F3s9LuWJ7+0lBSDT Q5QgQOo2wNwp7lTsDVpPG3osDyiilLrZr7pkYMn/GQzTLY2T0Pi5GXnFkBgxdzgJeuGIqN6lFdvnS HdbPcmMwIEXaX/CmRqZwjFeV8N1xuJxqG0o2XfENwSelUCJntxXq6gXMOBvvW9OfNNTn2MVurTLud 9HB1ZcSrk+FxMvQTHcXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9ZZk-00CxJv-2x; Wed, 14 Jun 2023 23:06:52 +0000 Received: from out-7.mta0.migadu.com ([2001:41d0:1004:224b::7]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9ZZh-00CxIr-0p for linux-arm-kernel@lists.infradead.org; Wed, 14 Jun 2023 23:06:51 +0000 Date: Wed, 14 Jun 2023 23:06:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1686784004; 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=PD1AUBQIxRJCrdxHVZaId+vzfuWrvKkMXGc2KFnMudM=; b=pjwN+kdJW+l9Eogn7Pw/kv3xVQ0IAt6DE5Wqkwb5jsBFEh+u7+1V5oMSZEHuoeN+g+Fa2e 7xSxxA+2E3VDMIYkDbK2IW1CQ/PqXYQlrNcOzI3rymT89g3V+rHjteqP9kDsdl8txP73NK 68hS8e1H68YzBIoZcMsmIWvo23N8iOs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Catalin Marinas Cc: kvmarm@lists.linux.dev, Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Will Deacon , linux-arm-kernel@lists.infradead.org, Darren Hart , D Scott Phillips Subject: Re: [PATCH 0/3] KVM: arm64: Work around Ampere1 erratum AC03_CPU_38 Message-ID: References: <20230609220104.1836988-1-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_160649_721737_25855F0C X-CRM114-Status: GOOD ( 18.27 ) 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 Hey Catalin, On Wed, Jun 14, 2023 at 05:57:55PM +0100, Catalin Marinas wrote: > On Fri, Jun 09, 2023 at 10:01:01PM +0000, Oliver Upton wrote: > > Small series to work around a CPU erratum on AmpereOne. While the > > implementation does not advertise support for FEAT_HAFDBS (due to > > another erratum), the associated control bits do not have RES0 behavior > > as required by the architecture. > > > > Usage of HAFDBS at stage-1 is unaffected, since HA and HD are only > > enabled on implementations that advertise the feature. However, KVM > > relies on HA having RES0 semantics if the feature isn't implemented. The > > end result is that KVM enables a broken hardware access flag > > implementation that could lead to correctness issues. > > Just curious, what's the correctness issue here? The access flag is > mostly indicative of which pages are old for swapping out/discarding. > It's not like the dirty state which would be dangerous if we get wrong. I probably could have helped out by giving the full context. The software-observable behavior on this system is that the A or D updates could arrive after a PTE has been marked as invalid, which could corrupt software metadata stuffed into the page tables. We do exactly that at stage-2 in KVM for parallel fault handling, where a magic value indicates a PTE is being updated by another thread. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel