From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C849C7F for ; Wed, 14 Jun 2023 16:57:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4801C433C8; Wed, 14 Jun 2023 16:57:57 +0000 (UTC) Date: Wed, 14 Jun 2023 17:57:55 +0100 From: Catalin Marinas To: Oliver Upton 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> 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: <20230609220104.1836988-1-oliver.upton@linux.dev> 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. -- Catalin 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 1CD43EB64D8 for ; Wed, 14 Jun 2023 16:58:25 +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=LWDNQhhxb1P7nDT/u3UpdBriMbW0C8Ko5cVFk/E3y6s=; b=VQJ+QliGmJ5ptg mw+P6ZA+Jy8+lQyKV+4vMZ+z8qVz8cpR95/HDS58dq8iAfgkww+9nXvpAHn+XAIWnVXqRqeCLGced B/3hOJ7zTi6zLmIuRKvZqE4wRGOrH+gzp7SpRVdCvX121sxyvVf/acEbn4IDlBGJa2HlnSFgOSBQ/ Q1HUxg/T71fLS1VgL1r/HcDWzgNMLVZMh+WPe36vYfN6VnT6Jm2SrIVIKCzY1x04nM4V42ggTf2qD EUvVfJizfTbOGeqevjk7NA1pJsuhx7BfDQGMdSx9pqb1byw4OQaZbdArBjQaKwEy/lygl3Z4Kq3y0 u/bSnkeR5uolN6yAn9jQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9Top-00CHTz-0N; Wed, 14 Jun 2023 16:58:03 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9Tom-00CHT6-2K for linux-arm-kernel@lists.infradead.org; Wed, 14 Jun 2023 16:58:02 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 397CF63EC8; Wed, 14 Jun 2023 16:58:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4801C433C8; Wed, 14 Jun 2023 16:57:57 +0000 (UTC) Date: Wed, 14 Jun 2023 17:57:55 +0100 From: Catalin Marinas To: Oliver Upton 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: <20230609220104.1836988-1-oliver.upton@linux.dev> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_095800_795475_ACFC61D9 X-CRM114-Status: GOOD ( 14.15 ) 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 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. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel