Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36682240rwd; Tue, 11 Jul 2023 04:29:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlG+JIvKmGHGOTvluGM0J/bT0sgSdWH3oAaXnWCm3h0rfb3PVrdSjkpf3yxIwe5kALJVKKgC X-Received: by 2002:a05:6a00:24d5:b0:682:bd6e:b16a with SMTP id d21-20020a056a0024d500b00682bd6eb16amr12487830pfv.14.1689074941810; Tue, 11 Jul 2023 04:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689074941; cv=none; d=google.com; s=arc-20160816; b=sNHvvVb+loHzSzDBx9PSivn/9T6N5wSkkEtjOk/U2seO0MK9+Patq01Qvs14cnqL8p impwdekdM5/fFvngddh4NEIC/B2gLZZzzzFIf1pPuGW7ithEUJvPdkAY7/TOCgJaRBQ+ k/7geTrKHNuBqSIj8Zntho3QggT5bSqYNELb5+nG7PRfM92UyWezbSyrwJ+6FCsGs5Q2 +WrLvFmPIctN7LWDh+Yshp7DT0ynqX4Rm0WUSTisko/sD9IuOeNzUSgGNdAnm/VezQof pBkJdO8ShMS6KTASXGFwbdMC9GWuXL6eJ+H/VV5B3E/IUYNHygbK3BL81xP0J33J8Dp4 WwWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=gCmh7Asl0JR3H1sQDUXrI2+lMJeKeA2FPBDoQpO9wSM=; fh=pZaznGCCyrtFVmjyMJMJN6nkeNcYp4yVW1POo88DbvA=; b=Xo73azfgbu5pGbA4PVKtMnApTQqW+t+2ijdybG9vuW+UD3v5aaiXtDuZ91X7LaYuaC 0DlS3yEC39wPHrtz5/zz1eI1b8pSWtD/DDviBg/fk45vEQVKiEBSs44H/33f2vSN/Tw8 Faqk88oc9erUcdNFCYKYgjiP3G1anMzfa487D2zTNqpdxnjHRZZj2Yzb7tcXZSAdVF10 De7iTc08hXEj8Rn+9QX/Uc3WUqU//odoMrq4FOTfQCeAGdwL+cWkOiKAou9DlJCG95CN BfXuIKj+IOhiaMc16Gwg80wwlI5mbfu72Nw0F2pgmUKA4srVy+wkJKOEnudDR/QHc6xa X/Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rrbagt7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e126-20020a636984000000b00553800fe4dcsi1246456pgc.583.2023.07.11.04.28.49; Tue, 11 Jul 2023 04:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rrbagt7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbjGKKid (ORCPT + 99 others); Tue, 11 Jul 2023 06:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbjGKKia (ORCPT ); Tue, 11 Jul 2023 06:38:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDC2D1A2; Tue, 11 Jul 2023 03:38:29 -0700 (PDT) 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 7889F6145A; Tue, 11 Jul 2023 10:38:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE782C433C8; Tue, 11 Jul 2023 10:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689071908; bh=l7rA7FZ4v3VJG93gzPCayIPGspcK+RXdD4/nkf2Epag=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Rrbagt7BgQmnoFA71crth3Q3uDToM/ulNHPUdKxMCIA+RruYLdfOHz8mMsMoV3qlu vlvRlDpixXu6hQv+BPN83euKpTLR1V4uotSyXkt8mV1Xvzll42V1YriLBIXOeog4N/ TtvzPI3RKtXzg5BI6HU2Y3MWdNDyCcSn03BAye/0b27YTGxvzk5bpVumeCErnDiNdC sEtunQbSEp74BbumZq89/q3Y3epS7XON8yNY520jpOHcmzX7pguzj9hNzqSCEYHL1o 0Vr+TljqLWkq7Cq7wDLK4UVes50/vGcR3cp1/DP3AmYlGzbhLPm0xjGHwTaC1DYDVQ zWkmUfVcfzSkQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qJAlG-00C5gY-Cc; Tue, 11 Jul 2023 11:38:26 +0100 Date: Tue, 11 Jul 2023 11:38:26 +0100 Message-ID: <86cz0ywx5p.wl-maz@kernel.org> From: Marc Zyngier To: "Aiqun(Maria) Yu" Cc: , , , , , , , , , , Subject: Re: [PATCH] arm64: Add the arm64.nolse_atomics command line option In-Reply-To: <8a950aa5-fdd8-f983-0411-4b39ade596f4@quicinc.com> References: <20230710055955.36551-1-quic_aiquny@quicinc.com> <875y6s8bwb.wl-maz@kernel.org> <32f442e3-3d5c-4cec-9791-0da039f88287@quicinc.com> <874jmc8654.wl-maz@kernel.org> <6e07ad52-2629-346e-6217-ec07777ebc5b@quicinc.com> <86lefnvsto.wl-maz@kernel.org> <8a950aa5-fdd8-f983-0411-4b39ade596f4@quicinc.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: quic_aiquny@quicinc.com, will@kernel.org, corbet@lwn.net, catalin.marinas@arm.com, quic_pkondeti@quicinc.com, quic_kaushalk@quicinc.com, quic_satyap@quicinc.com, quic_shashim@quicinc.com, quic_songxue@quicinc.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Jul 2023 11:12:48 +0100, "Aiqun(Maria) Yu" wrote: > > For the KVM part, per my understanding, as long as the current feature > id being overriden, the KVM system also get the current vcpu without > the lse atomic feature enabled. > KVM vcpu will read the sys reg from host arm64_ftr_regs which is > already been controled by the idreg_overrides. You're completely missing the point. The guest is free to map memory as non-cacheable *and* to use LSE atomics even if the idregs pretend this is not available. At which point the HW throws a fit and the system is dead. Is that acceptable? Of course not. So there are two aspects to your problem: - for Linux, there is nothing to do: the kernel will correctly behave, and as long as you don't expose non-cacheable memory to userspace. Out of tree drivers are none of our concern here. - for guests, it looks like the HW doesn't provide the basic requirements for virtualisation, and you should always disable KVM on this HW (or even better, enter the kernel at EL1). In both cases, nothing to do in the kernel, which is good news. M. -- Without deviation from the norm, progress is not possible.